Re: [OAUTH-WG] WGLC for OAuth 2.0 Protected Resource Metadata

Pieter Kasselman <pieter.kasselman@microsoft.com> Fri, 05 April 2024 11:50 UTC

Return-Path: <pieter.kasselman@microsoft.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 84818C15108C for <oauth@ietfa.amsl.com>; Fri, 5 Apr 2024 04:50:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.076
X-Spam-Level:
X-Spam-Status: No, score=-2.076 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.08, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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 (1024-bit key) header.d=microsoft.com
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 QNYM50qmbS_e for <oauth@ietfa.amsl.com>; Fri, 5 Apr 2024 04:50:54 -0700 (PDT)
Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2116.outbound.protection.outlook.com [40.107.104.116]) (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 0D945C151071 for <oauth@ietf.org>; Fri, 5 Apr 2024 04:50:53 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K9wt/b8LoalGrAgwGQaec/2dQxUwBN/yulo10H8kuIjOotlePuPifsNuTez80mHMBugdgzQTNURI9eZE7oWnvdA/MxRaD9DJ1eVIlD0zOSNgZqIrrLOTQfE9tkSe0ade8DWJx4m8l5330J8Xxi6jIKHdI6nJF77fdY3xaI38usqo+Iywe7jaIefyhJEy5VdHSSBJVx4KgtXqE6Sfj5pacwwH/Wys8rW/9hQhAsW1Ut5hzd2VL0F+Zi71e6nUOjEGOdykr5xOcpzOy+yHUP3ahlACkHanNlpdlM7TXBW6lacCew+MxyEnDEXt7s/6CQSANohEsUl00BQEM2Gd6Lpusw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=p23F22wu8C4i1/LOrLEGUy6oLo79tgTa6R0BKoG9qrI=; b=P+j7MzJaR/aCejRf1mHu/IbWuXM5K9IJKd7lT0FYMNkLTLdik7DbutRffHX2EpzF4Uqd5Zis+1YFl33+JhKx/A6fW+yBI6xMbzhN8ptGm9PuFbOqd8ixQ5zAMcAr1m9Q8LgiNH6XsoHISV3l8BZmcPySfDJWswG7eYf5OQy5tIEjq2fAE5WYBhQBP6ZFuSYDU6tKXv3TOD/P+Ck6y7fZC6YfhAtSrgn1ISgVgaOmQT9h3SOHNBO1mUlzzfDP0B9vC5uIB9G5zMOMTaQ/16kGgydMBt0zNYjga2/ixnpLlfKlBvQJR+CJBOXraAELRHXajj/O9/3iIdUi9QMc4U9FEA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p23F22wu8C4i1/LOrLEGUy6oLo79tgTa6R0BKoG9qrI=; b=Coki6mMF/igmVoy+rMkJmUyjc7kEtKO9S//mXa9rE8kZpJsphwg9+NYQvQ/22izSu7YkpSQYO8ZbDkmQ9NOJOUF1O+6+vENFrr/Y8lgMTGLpE5y3iF25HNN2vgkng6bW3bvMS/T4lPMbfj5vbnF2ttOICsoatVeJVG0Tq3rv0Ps=
Received: from DB9PR83MB0519.EURPRD83.prod.outlook.com (2603:10a6:10:302::19) by DBAPR83MB0389.EURPRD83.prod.outlook.com (2603:10a6:10:17c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22; Fri, 5 Apr 2024 11:50:50 +0000
Received: from DB9PR83MB0519.EURPRD83.prod.outlook.com ([fe80::6230:21ba:a5d2:63ce]) by DB9PR83MB0519.EURPRD83.prod.outlook.com ([fe80::6230:21ba:a5d2:63ce%6]) with mapi id 15.20.7452.019; Fri, 5 Apr 2024 11:50:50 +0000
From: Pieter Kasselman <pieter.kasselman@microsoft.com>
To: "rifaat.s.ietf" <rifaat.s.ietf@gmail.com>, oauth <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] WGLC for OAuth 2.0 Protected Resource Metadata
Thread-Index: AQHagEXfKmu6Y4d7tEOaOucqI9IrWbFZmh4A
Date: Fri, 05 Apr 2024 11:50:50 +0000
Message-ID: <DB9PR83MB0519C736F842D6CAEAB229D891032@DB9PR83MB0519.EURPRD83.prod.outlook.com>
References: <CADNypP9QRjmgs5Si4Fj+hSmScwx+4ihQmxfznCCVE4+8F2UFkw@mail.gmail.com>
In-Reply-To: <CADNypP9QRjmgs5Si4Fj+hSmScwx+4ihQmxfznCCVE4+8F2UFkw@mail.gmail.com>
Accept-Language: en-IE, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=1156e7d9-1404-4b5c-aa6e-1a47e9bdbe0a; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2024-04-05T11:35:16Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DB9PR83MB0519:EE_|DBAPR83MB0389:EE_
x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: l8z+8bWIRQ15rU+Bw3v+8sjrRtEF8mzfERkyp1T0kecvWn92oQQFwGnSOOOdUnlrg9tKQTlUj4oK+0wjjpv/2bzhz7R1jDCjwXdBBU8zkSZUb51asz252FFh3AW0My+haHsTGCrs5S3KVWKuLyaU7tenu+wkFx6DM70scyrSwlu1y1E+vEiy2E8MiKD73IInc2kaiiHf0y77qhSrPW+xSP7hcB0X3BoUyPZu/+BT79nBnDhynoFGgzkE91l0aQ+ZqfsoIqOjbdit/H/DFjv7VUV/LmwsSpUwU8gqOb8/0ZZVBdWRAWKUmbrBeh/dbXwqHjOQl12a8iJmWp0baKP4c8kgSG/FnLW2EwJfwDFHzh2QLu5ekl1W3M3oU5BGnX/ZAD47DKKhh6yusPo719fT+My5buxi1N87g2Zvog6OHkpkBK2d43Faq56DxkJnsZ6zV+CMdWfxDHwDXoSa6EwPaFgl1Qdd8bw59rPir05m0jDWswqrq5G0rm+MstQLsYtmrTImUgugu5nBcWmpq3pQPzCHknTSMFPve8DhJddai3lDrypaoLAFTDQkn6ZIONfgS8sRiyddF3Vh/7lhHR2eLRwCHgiL3ONejyTh4vojL3I=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR83MB0519.EURPRD83.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(1800799015)(376005); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: Kn5YwjFMHJ1LK7KbnHyjcslVWAP321fOHyXzgaYHgEfD7EVVYfCLLSIqWTn7ZO+xTZGc/VCbWuavTughKhHsc0FXFA7/VU+SwbZj1E5J0cwS6p+kMdKUKEZ8CrdLQD69BMPK2LgVkDQ78HTCl0wuDUgyo5y3RJTtg1FKfHZzlGe63hlfP7wt9l/ygibqU+/FAZ80ZfoosZKoQBe5mSkgLoUk7GQKqa1CFThhv4FcMXBkAhQnSWyyIEE80WS3JrYaQLt4yEcwreoH651pLNaNnVWo7/+8txwPdmgYqXTrXZWgaePovONo3+BZvXSfdOqyQ7+Rk3Itgm+yxTwCRoE+gOyt8KxD1MbZUVdjblxDNwhqWooZibIZHyhhk29mi2obGjeo7Lo1L13BqWnXxbjPQPKnv4tnfOzAbQEDurJKHxjdJ+BFKwiOU/qGXu2t/7pDlc/ZB/DgWAKm1CtRS56OfHhIngX6TifavP2qOuutdbuy566EwKiPI+XPWssfuKbhX+ZeHoHkDdQtAcUgKbfOAlRcY9CF9guwsAg947LRMISpIs5VaLHCOVPTCLqNBw9vlFChiqBIUVEuAXcMrpxXXJeiNcTtVQn8+8LoyR/++J93gruvFVa/RnU6R2QNNmbdNz5shVnHjUVr7rpKNpIKceUV0Y/jTCHznpZVnd6tXs5iaxF8Ku27r9Gta3pnEd1Za82BVBgJRBF4PlxCJyZklNPEVW5G2YjY76EllMeMCLD07NpXs2YLASHH3ZnBaCMn4BDFBaIE09QZ9w8mh3vYkqe8P1cQZx+my0o8ZJJs4O8+9PI3A3NQd58JvX1ytHT/jFryxoQo1MrNXy/zArwp/F+ZvcUfTTN6VCIx819j9jCjBofTxJqGILGcZB6QSFfpeuRi8tYy0jfyy+yKqMdW7Pto3p1u8DECcUcYNeJIXig9Jc8DNEiWEqpRJveWP/aZk2QTqnCratYaYSutCtXF/kJPQdWyvdeMmYkx2rlE33ho6DOArI9t4bj/96QIhofgRkRKxXq29DfZXGPwMcb2ynBoLxhaeNAW2TqtBy2HEeRU2XyRW2b7+U/p1o3STQEo8Ja0VHkafr68q6rXO2eN8cI0p5bGbaofPqHZ2X/AsLalLjEd3RxSeJemVIMxzHMNRF357sn7Q2WSJLMwuy27N8wD4JPwob2MKSFDqQfOHQiH/7m1KRwQLyLGsEYvhDleS72FZWg5E8jSaSbaUhXKrFhHhYvNkjP+UkvODkF1wWGuxQn9o9tIIHRx1CqrBhZ9xYseOkZkRZnrRzP8XZwISId8AzMsWDQIn096MFzWftPKRcMy7LC+7RfAGTJn75dScSgxi7qbFFRYTSXosMbXJ2wtcKuXy/6miT7mZTlU+jhaGbQwKqTKNFRLwjal9Yyp1NXjDpJSu+SbiYhabCiAHFFN82yWQN5qpcR0gJr4FTLGNPq7Sg51SeHOVqipHPicdDVStVlid3pBDu0qrgmPpvtCbyE48eor7cVDQ46RT/nxyoPW/f3Xm6rlMZAoYWGt
Content-Type: multipart/alternative; boundary="_000_DB9PR83MB0519C736F842D6CAEAB229D891032DB9PR83MB0519EURP_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DB9PR83MB0519.EURPRD83.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 339e5017-4846-4163-eec0-08dc5566a3ce
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2024 11:50:50.2597 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: HSrnC94cn40q04wGP0CQQV84ztfueL78I19EQ5uMZQSkeEHUeaW8QfIPBJUohodjtlj8+Jz23DiiCHgMBNR6mdQgqeFF3efuekm2fC+bxm4=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR83MB0389
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/VDcdWH2B8sl6KbB65QwTq6wr2-s>
Subject: Re: [OAUTH-WG] WGLC for OAuth 2.0 Protected Resource Metadata
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/oauth/>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Apr 2024 11:50:55 -0000

I volunteered to review the OAuth 2.0 Protected Resource Metadata (https://www.ietf.org/archive/id/draft-ietf-oauth-resource-metadata-03.html) at the IETF 119 meeting.

First, I would like to thank the authors, Mike, Phil and Aaron, for creating this draft. It solves an important problem and I believe this will find wide adoption. We are already referencing it in the OAuth Identity and Authorization Chaining Across Domains (https://datatracker.ietf.org/doc/draft-ietf-oauth-identity-chaining/01/) draft for example.

Below are my comments, feedback, questions and the occasional suggestion. I tried to scrub items that were already brought up elsewhere in this thread, but may have missed one or two. Once again thanks for doing this important work.

Section 2

  1.  jwks_uri - The text only requires the "public key use" parameter if both signing and encryption keys are included. It was not clear to me what the assumed usage is if only a single key type is present (are they assumed to all be signing keys or all encryption keys). To avoid any possible confusion, why not make the "public key use" parameter mandatory even when only encryption or signature keys are included.
  2.  bearer_methods_supported - Reading the parameter name created a different expectation and only after reading the text was it clear that this was about the way in which the bearer token is presented, rather than different types or formats of tokens. Consider renaming this parameter to be a bit more descriptive. For example bearer_presentation_methods.
  3.  resource_signing_alg_values_supported - I was unsure whether this parameter was meant to describe signatures types that the resource server could verify, or whether this was for signature types it could generate (and presumably held keys for signature generation).

     *   Does it cover algorithms for both verification and generation?
     *   Given that this is an optional value, is it necessary to allow the value of "none". If no signing algorithms are supported, is a better approach to just not include this parameter (I reflect on security issues that may arise from alg:none type parameters)? If it has to be included, are there security considerations that can be called out regarding this parameter set to none?

  1.  Parameter names suggest URIs (jwks_uri, resource_policy_uri, resource_tos_uri), but the description always scopes this down to URLs. I suspect there is some history behind these parameter name choices, but was curious if there are ever a case when the parameter value is expected to not be a URL? If this parameter value is always a URL, should the parameter name be changes to reflect this (again, I suspect there are reasons for the current choices, but curious about the inconsistency)?

Section 3

  1.  I found paragraphs 1-3 of this section hard to parse. I think the intent here is to say that an application may be composed of different protected resources, and each of those may have their own protected resource metadata and then specify how that might be done.

     *   Although paragraph 2 describes the way to do it, and illustrates it with an example, it does not show the final result of such a construction. Would it be possible to include the final result of what the path would look like when inserting the "/.well-known/example-protected-resource" between the host and path components of the protected resource's resource identifier just to remove opportunity for misinterpretation (is this the same as the second example given in Section 3.1, if so, perhaps refer to that example)?

  1.  I was unsure how to interpret this sentence in paragraph 3: "An OAuth 2.0 application using this specification MUST specify what well-known URI string it will use for this purpose."

     *   Is this meant to refer to the IANA registration in paragraph 1, or is there some other specification mechanism an OAuth application should use that consumers of the metadata can use to determine where to find the resource metadata?
     *   Is this related to the inclusion of the URL for the protected resource metadata as described in Section 5?

  1.  It looks like the validation rules in section 3.3 is intended as a mitigation for the attack described in section 7.3 (Impersonation Attacks). Perhaps add a sentence at the start of Section 3.3 to establish this connection for implementors less familiar with different types of attacks. For example: "The following validation rules mitigate against impersonation attacks described in section 7.3."

Section 4

  1.  Consider changing the first sentence to make it clear that the "protected_resources" metadata value is used as part of the Authorization Server Metadata.

     *   For example: "To support use cases in which the set of legitimate protected resources to use with the authorization server is fixed and enumerable, this specification defines the protected_resources metadata value, which enables the authorization server to explicitly list them as part of the authorization server metadata"

Section 5

  1.  For step 5 in the end-to-end flow, add a reference to the validation steps described in Section 2.1 (validation of signed resource metadata if it applies) and Section 3.3
  2.  Representing this as fishbone diagram or flow-diagram showing the interaction between the three parties may be helpful, perhaps even earlier in the document, similar to other drafts.
  3.  Section 5.2: Perhaps rephrase the following sentence: "If the client receives such a WWW-Authenticate response, it is expected retrieve the protected resource metadata again, and SHOULD use the new metadata values obtained." as "If the client receives such a WWW-Authenticate response, it SHOULD retrieve the updated protected resource metadata and use the new metadata values obtained."

Section 6

  1.  I was unsure on how to interpret the reference to Section 8.3 in RFC 8259. The way it is written creates the impression that all three string validation rules in Section 6 is represented in section 8.3 of RFC 8259, but I could not find any reference to removal of JSON escaping or prohibitions on normalization. Section 8.3 seems to only refer to code point to code point comparison (the third validation rule).

     *   Should the reference to RFC 8259 be limited to validation rule 3?
     *   It may be helpful to adopt the same language RFC 8259. RFC 8529 talks about comparing code units, while the draft refers to code points. I assume they are the same, but perhaps just cleaner to use the same description if they are.

Section 7

  1.  Section 7.3: Similar to an earlier comment, if these attacks, especially the attack in paragraph 2 is mitigated (fully or partially) by the validation rules in section 3.3, it may be good to reference back to that section.
  2.  Section 7.5: It is good to call out that the resource metadata could be used by an attacker (its information they did not have before), however the guidance to use "the same defenses against attacks that might be mounted that use this information should be applied" feels a bit vague. Is there a resource or a reference that describe those "same defenses"?
  3.  Section 7.6: The readability of this section may be improved by first stating clearly what use cases are supported (as described in paragraph 3) and then calling out that all other use cases are not supported and why (paragraph 1 and 2).
  4.  Section 7.8: Not sure if this falls under phishing or if there needs to be a separate section on malicious resource servers that uses resource metadata to direct users to an authorization server under their control in order to collect credentials (it is kind of hinted at, but not explicitly stated). Defences would be similar to those typically deployed against phishing sites as outlined in the last sentence of section 7.8

Cheers

Pieter

From: OAuth <oauth-bounces@ietf.org> On Behalf Of Rifaat Shekh-Yusef
Sent: Wednesday, March 27, 2024 12:53 PM
To: oauth <oauth@ietf.org>
Subject: [OAUTH-WG] WGLC for OAuth 2.0 Protected Resource Metadata

All,

This is a WG Last Call for the OAuth 2.0 Protected Resource Metadata document.
https://www.ietf.org/archive/id/draft-ietf-oauth-resource-metadata-03.html<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Farchive%2Fid%2Fdraft-ietf-oauth-resource-metadata-03.html&data=05%7C02%7Cpieter.kasselman%40microsoft.com%7C357b9c804c444b4a873d08dc4e5cfea1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638471408549324339%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=l3qRXme8ywpfuSzOCxZR3VX5WbBzoLNqZJA9KrQ8r7I%3D&reserved=0>

Please, review this document and reply on the mailing list if you have any comments or concerns, by April 12.

Regards,
  Rifaat & Hannes