Re: [GNAP] AD review of draft-ietf-gnap-core-protocol-15

Justin Richer <jricher@mit.edu> Tue, 03 October 2023 21:25 UTC

Return-Path: <jricher@mit.edu>
X-Original-To: txauth@ietfa.amsl.com
Delivered-To: txauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A6F48C151095 for <txauth@ietfa.amsl.com>; Tue, 3 Oct 2023 14:25:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mit.edu
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gr1cU9wISV8z for <txauth@ietfa.amsl.com>; Tue, 3 Oct 2023 14:25:04 -0700 (PDT)
Received: from outgoing-exchange-1.mit.edu (outgoing-exchange-1.mit.edu [18.9.28.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F171CC1782B5 for <txauth@ietf.org>; Tue, 3 Oct 2023 14:25:03 -0700 (PDT)
Received: from w92exedge4.exchange.mit.edu (W92EXEDGE4.EXCHANGE.MIT.EDU [18.7.73.16]) by outgoing-exchange-1.mit.edu (8.14.7/8.12.4) with ESMTP id 393LOpVq015615; Tue, 3 Oct 2023 17:24:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1696368298; bh=HrcwTxACoO6nz91Fk0eOZxQMAjYfXcrgf7G7cauX5a4=; h=From:Subject:Date:Message-ID:Content-Type:MIME-Version; b=XS6P7uWvVrbTCQa+FIR1GwdqepcgCrE1pWBZMZXddoWPJIONFuFVzrj0h6Xh0ohE4 Zp9hRTY0hUrp5KFTLlCaoXrScum4mLGWWNb+fbNBnHY0Wh1Giw5S0mBVMdvVW0v9Tc O4O7QHEn5gRocVMTHPcHpUAVOo9hRxBLJVClzmtwYRO7g+exAFvBHV15DHgNKU0vkv U/K0Z7TNKbnZdKwz5bhqaZ9qX6zIw1wyf1IclvlR9xq9Ti3Z6XPJmE6IwIvOMoPLRz DqWx8SxC3xvROWrp+tvj7Xyp28Hjybel7YZvAQORgrYvjOEClW0SDIzWNVYccX5m4y LulFx4nwIteuQ==
Received: from OC11EXPO27.exchange.mit.edu (18.9.4.98) by w92exedge4.exchange.mit.edu (18.7.73.16) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 3 Oct 2023 17:24:20 -0400
Received: from oc11exhyb7.exchange.mit.edu (18.9.1.112) by OC11EXPO27.exchange.mit.edu (18.9.4.98) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 3 Oct 2023 17:24:51 -0400
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) by oc11exhyb7.exchange.mit.edu (18.9.1.112) with Microsoft SMTP Server (TLS) id 15.0.1497.48 via Frontend Transport; Tue, 3 Oct 2023 17:24:50 -0400
Received: from DM6PR01MB4444.prod.exchangelabs.com (2603:10b6:5:78::15) by CO1PR01MB7276.prod.exchangelabs.com (2603:10b6:303:153::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.28; Tue, 3 Oct 2023 21:24:48 +0000
Received: from DM6PR01MB4444.prod.exchangelabs.com ([fe80::f8f3:7e77:4517:6b13]) by DM6PR01MB4444.prod.exchangelabs.com ([fe80::f8f3:7e77:4517:6b13%3]) with mapi id 15.20.6838.029; Tue, 3 Oct 2023 21:24:48 +0000
From: Justin Richer <jricher@mit.edu>
To: "rdd@cert.org" <rdd@cert.org>
CC: "txauth@ietf.org" <txauth@ietf.org>, Fabien Imbault <fabien.imbault@acert.io>
Thread-Topic: [GNAP] AD review of draft-ietf-gnap-core-protocol-15
Thread-Index: AdnhEGaZz7I/z31LSuKdCt/5BASAXwK64eeAApEFTgA=
Date: Tue, 03 Oct 2023 21:24:48 +0000
Message-ID: <F3135CCA-58F7-4D8E-B614-3AA370DCA4FD@mit.edu>
References: <BN2P110MB1107AE91B428DE2FEAC1C378DCEFA@BN2P110MB1107.NAMP110.PROD.OUTLOOK.COM> <9465D39C-1E7C-4C97-9F17-83A215830BD4@mit.edu>
In-Reply-To: <9465D39C-1E7C-4C97-9F17-83A215830BD4@mit.edu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mit.edu;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DM6PR01MB4444:EE_|CO1PR01MB7276:EE_
x-ms-office365-filtering-correlation-id: 47277ff7-c441-4372-e65f-08dbc4572c16
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 6vmw6UU67YcRy8s+OLvlg047jmPWoWgxom7Lm/pjBkCdFQ7HdEUg0UbM/GQ4sTAx38FMpXUeZMnyzGv4rSlhlr9OwTXTrnoNKlS1GfrUAtmnLcFIS9x1wCXtj12u43K+OxlKwIH+9lEQD1JeqN1VkyIF7E+Gvp7qHADE/U84abLFEV0iKs2fm/iVUg17vyUSVnymUdLOyOLk4qDO8HJFp4X5AlZ+TsUSWRN0XOwBMQ0L2PJFeaD5w7mC6JolKtALlx1c96p7XgdEOy+3o57JZIvx2VjbmdaHxtoYpftwQD/TYR8S3CGJBbYPEP+pd3BKLdVLNHD2abMb8hibypGh4a+umtJOc0kBR/KH+3mnsbIJ/ilEpreNxAhSVngllylvMnqjXgGR2ayy5NMI1vuCoHzLe7hcqKrcFEXM4762/V4uYXvzJUMKE4T7yTI4LF9O++080fjXAZi4KR4snV7w4LAqzHiZoEIj11MMxUwxZxe3q2r0PeMcEfGiI4If3SBOjn4h340S4fQKxYHk5dFrZIxrrtUEFoN11DblH6hLFssvziSHEWSB8BsyfVAQvyu6vIXLWTrQY8cP7fy1c37u9Tsajxvd2VHInJ9YhRv1yNZ5XoRHULO82/K2CcdRSUUxBLpquWsUIxJBYxWSfV17DQ==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR01MB4444.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(39860400002)(346002)(366004)(136003)(376002)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(54906003)(6506007)(6512007)(2906002)(5660300002)(786003)(75432002)(41300700001)(4326008)(316002)(36756003)(8936002)(8676002)(33656002)(26005)(71200400001)(6486002)(6916009)(966005)(478600001)(64756008)(66556008)(66476007)(122000001)(66446008)(38070700005)(66946007)(91956017)(76116006)(38100700002)(66574015)(166002)(2616005)(83380400001)(86362001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: uVNbMzK/xqfm1o8TFuBA+6mhwQiRH1KMtQ8R3uCvhyAM6RhrtVkggG2RfR8spfZhI6Os6dpji0MlUG61Wh3C0ihuSDU0uS/DtrZx1Nu7optu3ctKkeL3jygdLjkHJ5Er5qvkdVNGGV32vHNmSkNYqTAzIoU+pTtBaj00/yQ5homI0E/SP9blIAnBST9MXKMGRPpu/n6K+UK0hJenK1njMQLIewK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rsfV7qF5cG8EbGq/zlWx0W0RPqfcI4x/y+pNFRVaNY5cl1KKQitu8AfgLBy3mdhRcePVovfk2FBzFc9P4Bm5pJd1LUK3RgDHg+lQKNRf4OQrRGy2K2FRm+KDZbjv+hEH6YpsOiuLjjP2kxWawFVeRIDn5ywBPArL+pWP9uOMCb/O62p80c7YqO5JQSiS3h2MoBlCGfdDEwT7o4fTk1AzN+2iua8dh8JK44PeIyLl0GLDBr2bWRT46GQCMB7ZNEG9cFDxnzbRCIBWIWOuul7NhN5XzUZNWVLjzGB2f8o/Y2ByTrgtDu
Content-Type: multipart/alternative; boundary="_000_F3135CCA58F74D8EB6143AA370DCA4FDmitedu_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB4444.prod.exchangelabs.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 47277ff7-c441-4372-e65f-08dbc4572c16
X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2023 21:24:48.3547 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 64afd9ba-0ecf-4acf-bc36-935f6235ba8b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: JQM5VSPZAJBLqrUaW+WtX6sUPajLm6UPEG5NX22K+10TeC05Vq8glMEvTCOnTK/T
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR01MB7276
X-OriginatorOrg: mit.edu
Archived-At: <https://mailarchive.ietf.org/arch/msg/txauth/GEwDaGT9m26D5AayjVGIPFJTntI>
Subject: Re: [GNAP] AD review of draft-ietf-gnap-core-protocol-15
X-BeenThere: txauth@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: GNAP <txauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/txauth>, <mailto:txauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/txauth/>
List-Post: <mailto:txauth@ietf.org>
List-Help: <mailto:txauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/txauth>, <mailto:txauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Oct 2023 21:25:08 -0000

Hi Roman, I’ve made a pull request that hopefully addresses the majority of your comments:

https://github.com/ietf-wg-gnap/gnap-core-protocol/pull/513

I’ve snipped out a handful of places where no changes were made or where I had additional questions about the approach. Thanks again for the thorough review!

-- How does GNAP work is the end user doesn’t engage the AS? I ask because the text is written … “when the client support its …”, which would suggest a client at time when it does not.  What happens then?

This is most notably the autonomous case, where the end-user (if there is one) doesn’t talk to the AS, as well as cases where no additional interaction is necessary (the client instance can provide attestations or other claims directly to the AS, for example a VC proof from a wallet), or the asynchronous case where the end-user and resource owner are different and the RO can approve the end-user’s request out of band from the GNAP protocol flow. The “when supported” is meant to echo text about interaction methods, as GNAP does not define a mandatory set of interactions.

We didn’t change the text here, but the upshot is that there isn’t the same kind of relationship between the end user and the AS and so the promises don’t really apply. Should this be called out?


** Section 2.3
it SHOULD return an
  invalid_client error (Section 3.6) or choose to return lesser levels
  of privileges.

Given the significant flexibility afforded to the “class_id”, is there confidence returning a lesser level of privilege is a normative SHOULD?

I believe so - especially because it’s going to be very API-specific what a “lesser level” is going to mean for any AS.


This was expanded to explicitly call out the fact that the AS could ignore a class_id it doesn’t understand and treat the client software as if it had never heard of it.



** Section 2.5.2.  nonce.  Is there a minimal or recommended nonce size?

I don’t have one but I’m open to suggestion on what good guidance would be here, especially if we can point to another document to establish that.


I don’t have good advice for what random values like nonce, instance_id, interaction_ref, or the like would want to have in them.


What is envisioned with “equivalent”?  This phrase is used a few other times.

This is a pattern I’d pulled from other specs to allow for protections other than TLS, like a VPN tunnel or a localhost connection -- something where you could use a plain HTTP URL that you know the connection wouldn’t be sniffed otherwise.

This was called out explicitly in a number of places where similar language was used.


** Section 3.3.4.  Please use one of the example domains instead of  “srv.ex”

I was trying to show a shortened URL as an example of what you’d expect here. Do we have an example domain that’s fairly short? All of “example.com<http://example.com/>”, “example<http://example.com/example>.net”, and “foo.example” feel too long for this. If these are the only real options, we can use one.

I ended up with “s.example” but would love to be able to have something even shorter if anyone knows of a good candidate.



** Section 4.1.2 and 3.3.3.  Could the text please be clearer on the permitted “alphabet” for the user code.

-- Section 3.3.3 says “To facilitate usability, this string MUST consist only of characters that can be easily typed by the end user (such as ASCII letters or numbers)”

-- Section 4.1.2 says “To facilitate this, it is RECOMMENDED that the AS use only ASCII letters and numbers as valid characters for the user code.”

The guidance in Section 3.3.3 seems subjective and doesn’t seem like it would lead to consistent implementations.

Same comments apply for Section 4.1.3.

Since this is a user-facing value that we expect people to type in by hand, it really should be contextual to whatever the target deployment is. For a lot of folks that’s printable US-ASCII, but that’s not a universal assumption, I think. From a protocol perspective, it’s a JSON string, so as long as the string can be displayed and entered unambiguously, it should be fine. It’s the AS that generates and receives the code, so the AS gets to make the decision of what goes in it. The considerations here are somewhat subjective because you need to account for people.

I think in practice, the US-ASCII recommendation is what we’ll likely see.

We’ve expanded the discussion here to say that it’s really about consideration of what the user needs to read and type, hopefully this is more clear now.


** Section 4.1.3.  Editorial.  Much of this guidance seems to be verbatim repetition of section 4.1.2.  Is that needed?

That seems right - these were originally one section with options, now it’s two sections. Unless we wanted to extract a common section again, I don’t think it’s good to cut down the text. Especially if an implementor is going to read just the one piece that they’re building, we’d want them to have all the guidance right there.


This was left as it stood for the reasons stated.



** Section 5.4
  The AS SHOULD revoke all associated
  access tokens, if possible.  The AS SHOULD disable all token rotation
  and other token management functions on such access tokens, if
  possible.

Wouldn’t the use of SHOULD instead of MUST here present an issue.  If a client issues a “DELETE” for its access tokens with an AS how does it know that all of it’s tokens have been removed if this flexibility is provided?

Sometimes it’s not possible to proactively revoke a token already in flight, depending on the nature of the deployment of the overall system. GNAP doesn’t presume stateful or stateless access tokens as the result of the delegation process, so it’s revoke-if-possible, which to me feels like a SHOULD. Even in that case, it’s possible for the AS want to treat the grant request and its results separately — so revoking the grant request could still leave the tokens around as artifacts. You can’t alter the grant or use it to make new tokens, but the old tokens could time out and die of natural causes.

The client never can know for sure if all the tokens have been deleted, it can only make a best effort request to delete them, and then stop using those tokens itself. The same kind of pattern is found in OAuth’s token revocation (RFC7009) which this piece (6.2) is based on.

This was left as a SHOULD if possible.



** Section 7.3.1

  The signer
  SHOULD include the nonce parameter with a unique and unguessable
  value.  When included, the verifier MUST determine that the nonce
  value is unique within a reasonably short time period such as several
  minutes.

How does the verifier determine that the freshness of the nonce to a “short time period”?

This is meant to be guidance for implementors of the nonce check. We don’t expect people to store all nonces for all time, but instead to have a bunch around for a reasonable time period to prevent replay within that window. Can you suggest a better way to accomplish that?


Would appreciate some input on this, along with the nonce and other random value length requirements.



** Section 8.
 Specific API
  implementations SHOULD re-use these fields with the same semantics
  and syntax.

Why wouldn’t deviations from the semantics defined here require custom labels from being defined?

Because ultimately they’re custom to the API. The common fields are provided as guidance for common usage. If an API designer wants to use “actions” to represent something else entirely, that’s not going to affect interoperability with other APIs, it’ll just be confusing for developers to make sense of.


We removed the normative SHOULD here, and like RAR are silent on the use of these in API design.



** Section 11.  The OAuth registries (FWIW, all OAuth registries are specification required -- https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml.) were all very particular about having a change control column.  Do the circumstances that necessitated that apply to GNAP?

I don’t know the story of why that was required in OAuth or whether it would also be required here. I would appreciate input from those that know better how to manage this.

I haven’t received any feedback on this, so I’m inclined to believe the same circumstances do not apply.


** Section 13.1.  Editorial.  This section seems to repeat itself a lot.

(a)    All requests in GNAP have to be made over TLS or equivalent as
  outlined in [BCP195] to protect the contents of the request and
  response from manipulation and interception by an attacker.  This
  includes all requests from a client instance to the AS, all requests
  from the client instance to an RS, any requests back to a client
  instance such as the push-based interaction finish method, and any
  back-end communications such as from an RS to an AS as described in
  [I-D.ietf-gnap-resource-servers].  Additionally, all requests between
  a browser and other components, such as during redirect-based
  interaction, need to be made over TLS or use equivalent protection.

(b)    The use of key-bound access tokens does not negate the requirement
  for protecting calls to the RS with TLS.

(c)    TLS or equivalent protection also needs to be used between the
  browser and any other components.

The text in (a) seems helpfully clear that all GNAP communication regardless of the parties needs to be over TLS.  (b) and (c) seem to repeat that.


Thanks, we’ll review and see if we can trim this down. We were trying to make it explicitly clear that “all” means “all”. I do think it’s worthwhile to point out (c) as a developer might not consider the browser-to-service connections as part of the protocol proper, but they need to account for this.

I didn’t see a good way to remove the repetition, apart from a little bit of editorial cleanup. The (a) is the requirement, the (b) and the (c) are more specifics as to why (a) is the requirement.




 — Justin