Re: [GNAP] Secdir last call review of draft-ietf-gnap-core-protocol-16

Justin Richer <jricher@mit.edu> Wed, 29 November 2023 20:23 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 DEFFBC151545 for <txauth@ietfa.amsl.com>; Wed, 29 Nov 2023 12:23:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.406
X-Spam-Level:
X-Spam-Status: No, score=-4.406 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_DNSWL_MED=-2.3, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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 HLgrY3JY2QfC for <txauth@ietfa.amsl.com>; Wed, 29 Nov 2023 12:23:47 -0800 (PST)
Received: from outgoing-exchange-7.mit.edu (outgoing-exchange-7.mit.edu [18.9.28.58]) (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 33787C151543 for <txauth@ietf.org>; Wed, 29 Nov 2023 12:23:46 -0800 (PST)
Received: from w92exedge4.exchange.mit.edu (W92EXEDGE4.EXCHANGE.MIT.EDU [18.7.73.16]) by outgoing-exchange-7.mit.edu (8.14.7/8.12.4) with ESMTP id 3ATKNLiR004185; Wed, 29 Nov 2023 15:23:34 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1701289419; bh=lRIx97U/t0XCyJAuNbZWpb8LNCngPc1caJADUUiF33U=; h=From:Subject:Date:Message-ID:Content-Type:MIME-Version; b=lR976qsk7AM9p0pLS4TlYAiwCiSpNjcyXOEXZFZu2xfsmijb9xnExdWs9uqgFvBAU 8fkT/Thk0WJcEuMu38DstD2VepYjWMeVhjeo2PuAaOHHJwO1x21b6YpSqwvhPKG2CG xa7zSo+kG2quv8IlEpo2iZOasDn2yrR07mRcZHphcBASAcgW/YPdir2MfZpThW/JU1 stpnAYoSR5mCb3XxyWglGRSY21qGVwEidv0Cjx3/kzZwtTtAgIyvKZvCnsbPm2IIt7 vOyj0tPi4A23KrZ572vzBtE9oD1GbiWuJfBqXk/3gdHyEGs24wrOCcLpL+utXrIRjQ ymurPDKYHUeXQ==
Received: from oc11exhyb6.exchange.mit.edu (18.9.1.111) by w92exedge4.exchange.mit.edu (18.7.73.16) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 29 Nov 2023 15:22:12 -0500
Received: from oc11exhyb2.exchange.mit.edu (18.9.1.98) by oc11exhyb6.exchange.mit.edu (18.9.1.111) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 29 Nov 2023 15:22:40 -0500
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by oc11exhyb2.exchange.mit.edu (18.9.1.98) with Microsoft SMTP Server (TLS) id 15.0.1497.48 via Frontend Transport; Wed, 29 Nov 2023 15:22:40 -0500
Received: from DM6PR01MB4444.prod.exchangelabs.com (2603:10b6:5:78::15) by BN0PR01MB6943.prod.exchangelabs.com (2603:10b6:408:16b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.23; Wed, 29 Nov 2023 20:22:29 +0000
Received: from DM6PR01MB4444.prod.exchangelabs.com ([fe80::ca8a:608d:8318:d40b]) by DM6PR01MB4444.prod.exchangelabs.com ([fe80::ca8a:608d:8318:d40b%5]) with mapi id 15.20.7046.015; Wed, 29 Nov 2023 20:22:29 +0000
From: Justin Richer <jricher@mit.edu>
To: Russ Housley <housley@vigilsec.com>
CC: GNAP Mailing List <txauth@ietf.org>, "rdd@cert.org" <rdd@cert.org>
Thread-Topic: [GNAP] Secdir last call review of draft-ietf-gnap-core-protocol-16
Thread-Index: AQHaDz8R7+7LoZ3NE0KoSZcWfTwc0bCOwqQAgAF8OICAAaYlAA==
Date: Wed, 29 Nov 2023 20:22:28 +0000
Message-ID: <1DD64BE1-416C-41B3-AC12-8A243E22CFD9@mit.edu>
References: <169911663900.41972.11831973094949906170@ietfa.amsl.com> <B8805330-B9C8-436D-BCC1-D332715D5F02@mit.edu> <95D5AC0D-F554-4F8E-BC2D-5DC2A5BF6E8C@vigilsec.com>
In-Reply-To: <95D5AC0D-F554-4F8E-BC2D-5DC2A5BF6E8C@vigilsec.com>
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_|BN0PR01MB6943:EE_
x-ms-office365-filtering-correlation-id: 4570f295-6adc-48d4-3481-08dbf118e8c7
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: czLDwVG2Ao0lTzz2I8BAqXpZhQ3ZIyA7iCaYc1zpcx14nlsB9TLDqNOk/DUnCU+rae99Sn8/ovpeFbbCUBEjFXUnfTHeW1KBxN7hNu8pwtLg/jHOL6dYix2H2PqWCCB2II1wU1Xs3igW2g9QjnxmY8Cy6qX0jN2Ytk/lAhoGkaHnH+l/wQKEFoU50VBzs9vBKN6ycrXddHx/ZnmrVQ2Ml6VF5JDqcHxGhrLfa7Um/YvO/TqGOa/RKRra8VM/UMIQUscPF929dmf4QGQ1I+aGUKKcbXK0kDxBRD6IrEqwoKzvwGCDwdvpQ5EL4Hi8qanHRuITmy9UTWwIoVILeCHsrPJGDv8YhQGS3l97ueii0G9/kLiSLrvZJJzfqHL38sxDRgGMw8X8mJ7gsBgKNPsxc+ShGDRgTTSsdb54aB4D6+U1kITpItr6LNG/B8ka1XznMrj5I3kVuAcOR2tHQE9ZRnnK1A/vbjAKZX+n5VUjzkqiUUsTyeRumbewRNLiLPHNcleeT+jQiaas+Mhg1u2aqiJAKAA37rkae0HJt61uXweXX2x7a0nDxjK4CWdjpd00GUg8EsJ4aRwJIqTIlXYunLVG7lDe1oO33RGGCIjYez3cP03er06RMR2ORrH16KXNhejp7/KBwUR/5FWDVFLYG99HNPKAmhfOLGqkL7mlGNOC9O/OlkbfTXmhPTPpMUrN
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)(346002)(396003)(39860400002)(366004)(376002)(136003)(230922051799003)(186009)(451199024)(1800799012)(64100799003)(122000001)(38100700002)(166002)(202311291699003)(75432002)(83380400001)(91956017)(2906002)(86362001)(5660300002)(8936002)(8676002)(4326008)(6916009)(66556008)(66476007)(66446008)(64756008)(54906003)(66946007)(6486002)(478600001)(71200400001)(41300700001)(6506007)(33656002)(786003)(76116006)(316002)(36756003)(6512007)(26005)(38070700009)(2616005); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: hx8l3JORUkkVdbnCeFQioN33XXigVjoxD1e1W5KUokTKgVnCu2GdRRXcdpLkJMrZAWVezS0tgRp3o6wCxhuiGAUbPqWPW7Nwsq29Gi1NfpMRfiNCy8a9rGZ/u5QYeirJxn3eR6M5UU25T7tN2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78wg/TgCp0vYH1oDDf6kedfLwadaRiAgPqTWmxnxZXQHnWCJvylqBOkNPOd4kOOzUJHSbmoyyKoXiK4/aLQdKs/kFwChE9TUYbuHw/q/weQV5K9JIoCQpijPs4Yc/8PesreAyirPU5iBn7mlOKu/Ze/aokIx7XNfsE26srrsm2cA8BGEizgZBRdiallbluNEB382zc4aZX3qchp2obR04snlpYq1/VSv/DBCTit5Zh1QhoIBMZbweiZwxm5x0MeRY6NBIY5GsJyNpA9+0QK7JZNJa2fM2h7bqygG1rHaETCOB0wPMFtusUMH92QXUGpICARe02CsQwfvU7O19pnRA9Oiuns3YqnQdeJ/paV+11arYNKt+0HWvu++
Content-Type: multipart/alternative; boundary="_000_1DD64BE1416C41B3AC128A243E22CFD9mitedu_"
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: 4570f295-6adc-48d4-3481-08dbf118e8c7
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2023 20:22:28.9358 (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: nHKLqGdbsTvnaurUwjg231gy9H2KRAMMsoxi1tOQ+uYfP9khtkwMdALXI64Hu7qh
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR01MB6943
X-OriginatorOrg: mit.edu
Archived-At: <https://mailarchive.ietf.org/arch/msg/txauth/Ek0NCQeiUfuiJv7EdSFzPq2s-ao>
Subject: Re: [GNAP] Secdir last call review of draft-ietf-gnap-core-protocol-16
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: Wed, 29 Nov 2023 20:23:49 -0000

Hi Russ, Responses below with the items that seem clear to me pulled out.

Maybe there can be some text up front that provides this context to the fresh reader.

Section 1.3: Elsewhere in the document, there is a careful distinction
between software that acts on behalf of a subject and the natural person
that uses the software.  This distinction is missing in the definition
of Subject.  It is made worse by including organizations.  Please say
how people and organizations "decide whether and under which conditions
its attributes can be disclosed to other parties."  I believe this is
done by interacting with the software or initial configuration of the
software.

It’s outside the scope of GNAP how these decisions are made, and not for this section of concise definitions to go into any detail, even by example.

Since this distinction is made elsewhere in the document, I have a real problem with that response.

The "subject" is not equivalent to the "end user" or the "client software/instance". Instead it’s the party — whoever or whatever they are — that the "subject information" returned is about. This isn’t conflating these items at all, and how the release decision is made is out of scope of GNAP — which is not in conflict with the rest of the spec.


Section 1.5: Is the AS the only stateful role?  If not, Section 1.2
should say which ones are stateful and which ones are not.  If so,
please clarify the 2nd para of Section 1.5.

This section isn’t about statefulness of the AS, client, or any other components — it’s about the statefulness of the grant request itself. How any of the components handle that statefulness is a development decision. I believe the current text is clear that this is speaking about the grant process.

Section 5.1 says:

   _Processing_:  When a request for access (Section 2) is received by
      the AS, a new grant request is created and placed in the
      _processing_ state by the AS.

So, the AS is keeping state in some fashion.

The figure toward the beginning of the section is the state machine for the AS, right?  If not, please provide a paragraph after the figure that says more.

Again, the statefulness here is about the grant request. The AS and client instance both need to have some notion of the statefulness of this grant request as it goes through the system. The state machine is not for the AS, it’s for the grant request itself.


Section 2.1.2: I expected a parallel structure to Section 2.1.1.  I
think it would really help the reader if the sections had the same
structure.

I don’t understand the request here - section 2.1.2 is activated by sending an array of the objects defined in section 2.1.1, with some additional constraints (label is required, namely). So to me, they are already deeply interrelated. How would you suggest parallelizing these more?

Here is the part that confused me in Section 2.1.1:

   access (array of objects/strings):  Describes the rights that the
      client instance is requesting for one or more access tokens to be
      used at the RS.  REQUIRED.  See Section 8.

Section 2.1.1 is about "Requesting a Single Access Token", and this allows the request of one or more access tokens.

Maybe the fields need to be explained in Section 2.1, and then the subsections explain their use for requesting a single access token or multiple.

Ah, that sentence was pointed out in a separate review — the "one or more" is a holdover bug from a previous syntax. This array — and indeed this entire structure — is about a single access token, as described in the section’s introduction. The subsequent section is how you use that within an array for multiple tokens.


Section 2.3.2: I am not worried about logo_uri if only data: URIs are
allowed, but that does not seem to be the case.  Since the logo might
be fetched, there need to be an integrity protection mechanism to
ensure that the web server does not provide a different image than
was intended.  RFC 3709 has this same concern and it uses a hash of
the image to ensure that the intended image was provided.

One of the goals of having a remote URL for this field is to allow the hosted URL to change its contents without updating any stored or registered values with the AS. Therefore, an integrity hash would negate the usefulness of this feature.

Related to this: impersonation and related issues are listed in §13.13 (https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-16.html#name-client-instance-impersonati), SSRF in §13.33 (https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-16.html#name-server-side-request-forgery).

My concern is not addressed in either Section 13.13 or Section 13.22.  I cannot see any benefit for allowing the web server to change the logo.  This enables The URL remains the same, but the admin of the web server can decide what logo is reurned at various points in time.

The client should be able to update its self-hosted resources without updating the registration at the AS.
So yes, letting the admin of the web server ( where the URL is hosted ) decide what to return is exactly the use case here. If you want to have a fixed value, use a data url, as suggested in the text.



Section 2.5.1: I do not understand what an implementer is supposed to
do based on this MUST statement:

 "All interaction start method definitions MUST provide enough
 information to uniquely identify the grant request during the
 interaction."


The "implementor" here is someone defining a new interaction start method. Whatever information passed to that method would need to uniquely identify the associated grant request that the interaction is associated with. For example, the "redirect" mode uses a unique URI, the "user_code" modes use the user code, etc.

I am even more confused than before.  This section is about user interface.  If you want to impose requirements on people that will extend the protocol in the future, that seems to be a separate topic for a separate section.

The section is about starting user interaction. I think it’s sensible to include requirements for extensions in the section that describes the extendable portion — which we’ve done elsewhere in the document.


Section 9.1: I do not understand what an implementer is supposed to
do based on this MUST statement:

 "client instance MUST check its value to protect itself"

The client instance checks whether the value of the `referrer` parameter is the URI of the resource server that it made the request to. The rationale for this is discussed a little more in §13.36 (https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-16.html#security-compromised-rs).

What checks MUST the client instance perform?  Section 13.36 does not address my concern.  Section 13.36 is about protections that are implemented at the resource server.

The client instance compares the referrer parameter returned to the URL of the RS.


Section 13.24: This section does not seem like a Security Consideration.
If the calculation of the interaction hash is not done the same, then
there will be interoperability issues.

I’m not sure what the concern is with this comment - the section serves to expand the security discussion around the need for properly calculating the interaction hash as defined in §4.2.3 (https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-16.html#name-calculating-the-interaction), and it illustrates how an attacker could leverage a bad implementation that skipped this required step.

I don’t understand the comment about interoperability problems - the AS and the client instance always calculate the hash the same way. The problem described in this section only occurs if the client instance is lazy and does not calculate the hash at all.

Consider step (6), where hash IH1 calculated from (CN1 + SN1 + IR1 + AS).  If the attacker manipulates one or more of these values, then IH1 will be different.  This can lead to a denial of service or an interoperability problem.

That’s not an interoperability problem, that’s the protocol failing to function when an attacker changes one of the values. This is the intent of having and checking the hash. I see no issue here.


Section 3.3: This seems like a throw away statement:

 "The AS MUST NOT respond with any interaction mode that the AS does
 not support."

It would me much more helpful to say what ought to happen is the client
asks for an unsupported interaction mode.

It’s not throwaway - a lazy implementation could try to always respond to everything, or throw an error if something is asked for that is not supported. Neither is the correct behavior: instead, the AS returns only interaction modes that it supports. It’s essentially a set intersect operation:

Let’s say a client software supports [ Foo, Bar, Baz ] methods and the AS supports [ Foo, Baz, Qux ] methods.

Client -> AS : I can do interaction modes [ Foo, Bar, Baz ] for this request

AS sees this and doesn’t support Bar at all, so it won’t respond using that. It does support Qux, but since the client didn’t ask for that it won’t return it. It will probably decide that Foo and Baz are both OK:

AS -> Client : I can support [ Foo, Baz ] for this request

If the client asks for things the AS doesn’t support (or doesn’t want to honor for any other reason for this request), then the AS responds with an empty set.

Better:

   If the client requests an interaction mode that the AS does not
   support, then the AS MUST respond with an empty set.

Your suggestion is incorrect. If you see the example above, the AS does not return an empty set when the client requested "Bar" — it returns with the subset that it understands and supports (Foo and Baz), which never includes a method that the AS doesn’t support (Bar). That’s the intent of the language.



Thanks again for your comments,
 — Justin