Re: [OAUTH-WG] Review of draft-ietf-regext-rdap-openid

Justin Richer <jricher@mit.edu> Thu, 28 September 2023 23:45 UTC

Return-Path: <jricher@mit.edu>
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 A30F9C15154D for <oauth@ietfa.amsl.com>; Thu, 28 Sep 2023 16:45:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.094
X-Spam-Level:
X-Spam-Status: No, score=-2.094 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_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01, 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 4Kv9P-77mtRM for <oauth@ietfa.amsl.com>; Thu, 28 Sep 2023 16:45:52 -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 98384C15154A for <oauth@ietf.org>; Thu, 28 Sep 2023 16:45:51 -0700 (PDT)
Received: from oc11exedge1.exchange.mit.edu (OC11EXEDGE1.EXCHANGE.MIT.EDU [18.9.3.17]) by outgoing-exchange-1.mit.edu (8.14.7/8.12.4) with ESMTP id 38SNjjQd004787; Thu, 28 Sep 2023 19:45:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1695944748; bh=e1ADCLMUYhhVxA1puKXNjhMectnb/vreyGYakjlKVp8=; h=From:Subject:Date:Message-ID:Content-Type:MIME-Version; b=i2O8xyS1Kqe37DXOsr9qTG9M7bBVPP+0JOInToqBioVX43d5Ss4aIZeiU1n8k4IgK gFtOUsKyNh5iFyYkyoAYAIdcnQjldB2YHxm9SQg8YOYBfVFKwvB33ijSWsBbMmyFVF rsdvCYHluafV9P7VbUUD644nrHNj3z7CHjN//hXXFvZ2SeYuxVwgrCp3DmJe8qVBcM ubPtQ8cePvQUmrG/BGGpx9EsD0SLAEVxI840jpxLVyboQ7NN+7xwj/L5jTAzqqrhPf MADZhYHztImsSPWH+aIcB3XN0LxpNDiL1kArQb2T7nugwcy/uAI45kC+I9CUCpuLD/ yNKPnAExm6RlQ==
Received: from oc11expo20.exchange.mit.edu (18.9.4.51) by oc11exedge1.exchange.mit.edu (18.9.3.17) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 28 Sep 2023 19:45:03 -0400
Received: from oc11exhyb5.exchange.mit.edu (18.9.1.110) by oc11expo20.exchange.mit.edu (18.9.4.51) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 28 Sep 2023 19:45:45 -0400
Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.43) by oc11exhyb5.exchange.mit.edu (18.9.1.110) with Microsoft SMTP Server (TLS) id 15.0.1497.48 via Frontend Transport; Thu, 28 Sep 2023 19:45:45 -0400
Received: from DM6PR01MB4444.prod.exchangelabs.com (2603:10b6:5:78::15) by PH0PR01MB6455.prod.exchangelabs.com (2603:10b6:510:a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.27; Thu, 28 Sep 2023 23:45:43 +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.6813.027; Thu, 28 Sep 2023 23:45:43 +0000
From: Justin Richer <jricher@mit.edu>
To: "rdd@cert.org" <rdd@cert.org>
CC: oauth <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] Review of draft-ietf-regext-rdap-openid
Thread-Index: AdnyIQtBpOgmNF42THa6OQrH2LJYygARNMUA
Date: Thu, 28 Sep 2023 23:45:42 +0000
Message-ID: <D18E2B2B-7D3E-475A-8719-903079D3FB71@mit.edu>
References: <BN2P110MB11074A4EF525AEE86077CD2CDCC1A@BN2P110MB1107.NAMP110.PROD.OUTLOOK.COM>
In-Reply-To: <BN2P110MB11074A4EF525AEE86077CD2CDCC1A@BN2P110MB1107.NAMP110.PROD.OUTLOOK.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_|PH0PR01MB6455:EE_
x-ms-office365-filtering-correlation-id: 3b43e97b-fe8e-49e8-87a5-08dbc07d0755
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: ET+KOIJ9wb3+sNnQgBzAslXpL3GkNWE10CrA9koFnIkHjPdhb5yn0ykGD+85UYpSODAz237HIlj0rhcJe1pmu8PIN+P3NgDvlaOhq3htLoMhFmN30YJkxEZVpOoc+9rYVy/Vq5nzyFNm7kBF854zEQ3rzT2buZHuJyUCMRK5afzFFerYtvTJjCWaTdSuuFJpuEP7k2vQ6wKKzVqrZBdvNHxWkucH25+6A47kntNkic9AhY+YDF2DUmdLl+XecBbqkOmtaZ6zGNCUnJZlpHgQmQRwWJEwk5H2KK5mvfJmnkKr/c5uE7NZ+YaBRRWiKCjgdT7ib0gg+z7BOxVid+vnNukaXz3YwlsKjAdh8XA0v7J5NnmK3ko0wncRfKDRG+YB3hIxuRZMyt9hoKaCAP3AdkAkoJA1UgR7hqiy+Vws+rCXJsOne0WNs5257RGrIxJaTVaKUSnXeOiYLCDgp4ctp2XbGXkfEvuONghziwF8TYuUYfLyE0wMh2Nk9aZCFWnVkYJ7ehi8z21j+msKrGqi7r279iOBO3/tzaLkMOQXiN6as/x1+dhIg4stjp5m4wcKNde/y6d3JjqTROiWnYtmNwgvJuqSlKBpiu+1dcAwYlw=
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)(39860400002)(396003)(366004)(376002)(346002)(136003)(230922051799003)(64100799003)(1800799009)(451199024)(186009)(26005)(71200400001)(122000001)(6486002)(478600001)(75432002)(2616005)(38070700005)(33656002)(66899024)(966005)(83380400001)(36756003)(86362001)(166002)(6506007)(5660300002)(38100700002)(53546011)(4326008)(6916009)(8676002)(8936002)(786003)(316002)(2906002)(66446008)(41300700001)(66946007)(66556008)(91956017)(66476007)(76116006)(64756008)(6512007); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: XgfNPupCKUQNADFY3CEQv8o8rBH27Qf87T+QzORO66E1Z2pvSELzrZ7/xJ8r7PdvWCBgDHsmCwz8muWdyj2xfeVLTXpghD7bnPFLuSF91WtXO0jVNkhNHHk3ytUi9RV3kjlAO7PZ/mtUGQJbXjSrr+IdnAGuvryZACNFbkIbhX8aLFiS/Qm9Daf+mnfvmoXsgHRGipL8J7BqO9EPN/rh95OVLQIIuC1VMcLwnRTwyCD7+xbW+nt0TfWOWxGz4idIlYeNmFr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paGsWkWyqcgvgwk1K728B6kmvcVLmcJf9rC3MsRBn3Gs5JNcWXax7qFduz3TOzxszJCJ+BjOPs1XIkCyS8DuZKn5Nu58/DLoI8PGCWOjsdv5yBeQ4atdPciCI6kMeXhDYdMxRcBiC08xtsh19yumvREyMrBz3sshbkhV55JB3lPSY7pxkMKFRghA/LpxA0MNwqwKB261chy5SAvJ3aoWMz/z1wLtqx3BUb2cbphXCjbeEtYZIpLTkQXTMUrxMRB4PXnyUiiJ+i2I7QKtjxGasWQ8
Content-Type: multipart/alternative; boundary="_000_D18E2B2B7D3E475A8719903079D3FB71mitedu_"
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: 3b43e97b-fe8e-49e8-87a5-08dbc07d0755
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2023 23:45:42.9106 (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: jscwvYJDo3uDQoIcE7FETT3jZ6aqjoKbfYQbRTzXLqOfDuzEAYijfFn+qA+p2/HQ
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR01MB6455
X-OriginatorOrg: mit.edu
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/33Ci5v7EHDLRC7pvvK85uarXutY>
Subject: Re: [OAUTH-WG] Review of draft-ietf-regext-rdap-openid
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: Thu, 28 Sep 2023 23:45:55 -0000

Hi Roman,

The concerns of this document are largely specific to OpenID Connect, and not vanilla OAuth, but of course many of us in the community overlap and I’m happy to help provide some feedback here. I’m not familiar with RDAP, so if any of my concerns are addressed by other aspects of the RDAP ecosystem, I would be happy to be corrected.

That said, I believe parts of the approach are fundamentally flawed as it conflates the RS and client roles in a potentially dangers and certainly confusing way.

Some thoughts as I read through this:


§3.2.1:

 - there seems to be some conflation of the RP and RS roles here in the RDAP server; it seems more proper that the RDAP server is the RS, and the RDAP client is the RP (the same as the OAuth client); this seems to stem from a problem with how the RDAP server actually gets user claims, see paragraph below for more

§3.1.3:

 - this seems to assume the authorization code grant type; though this is explained a little bit more in 3.1.4.2, it’s not clear that other grant types are supported here within this protocol
 - the first section on “session-oriented clients” conflates the end-user with the client (to wit: "An RDAP client (acting as an OpenID End-User)”); consequently it’s unclear who is getting “redirected” or interacting at any step; more properly, it seems that the end-user is interacting with the RDAP client to initiate the flow, which is borne out in the diagram

More importantly, in this section it becomes clear that the core of the specification’s “token-oriented” approach relies on the RDAP client passing the access token to the RDAP server and then having the RDAP server replay that same token to the OpenID IdP in order to get user claims. It is not considered good practice to have the RS replay the access tokens it receives to an external party, and on the surface this could potentially be exploited by an attacker. This also fails under sender-constrained token usage, wherein the RDAP client would need to also share key material with the RDAP server in order for the latter to use the token.

A better pattern would be a profile of OAuth Token Introspection (RFC7667) wherein user information could be specified. This would also allow the RDAP server to authenticate its call to the OpenID IdP. Introspection was designed specifically to allow the RS to call back to the AS to determine what (and who) a token is for, and it provides an extensible mechanism for doing so. An alternative would be to profile the access token itself to contain user information in a format readable by the RDAP server. More on this in the note for §6.3 below.

§3.1.5.1

- The registry information here should be in a separate IANA section that is forward-referenced from here
- which parties are responsible for validating the allowed purposes claims? Does the IdP need to know the list of allowed purposes applicable to the RS (RDAP server)?

§4.1

 - I appreciate that the fav1 data structure separates the applicable flags into a clear substructure, which will be easier to process as an extension to existing code

§4.2

- RFC3986 doesn’t actually specify the key=value format normatively; these days, that belongs to the HTML URL specification from WHATWG and so I would recommend that this reference be used instead: https://url.spec.whatwg.org/#application/x-www-form-urlencoded<https://url.spec.whatwg.org/>


§4.2.1

 - is it really the case that a client can only request a single purpose, but multiple can be authorized? I’m not an expert in the RDAP world, but this would seem to be quickly turn insufficient as purposes are not required to be completely separate and distinct from each other in the registration section

§4.3

- I think this section was probably meant to be a subsection of 4.2?

§5.1.1

 - OpenID Connect does not define a single global string value for a user identifier; instead only the tuple of issuer and subject are considered suitably unique; ergo, the UserID value in the data structure would need to have either a construction method or some other specification, or to have this declared as RDAP-server-specific explicitly

§5.1.2

 - this seems to replicate RFC8628, OAuth Device Flow, without any of the implementation detail or security considerations of that specification; furthermore, the device flow isn’t specified in OpenID Connect (which is being profiled here) though its use is far from unheard of in practice; this use is further expanded in §5.2.4, but it’s unclear that that’s why this is here

§5.2.1

 - I’m unclear when reading this whether the identifier in question is an OAuth client_id or a user identifier, as the text seems to indicate it can be either; these represent drastically different things, and one could argue that separating the identity of the client software from the identity of the end-user is the entire point of OAuth and protocols like it
 - Ultimately this seems to be a discovery step for RDAP, and so I would expect to see more types of identifiers that could be used for discovery purposes, such as user-facing identifiers like email addresses or phone numbers if that’s the goal
 - Significant effort is currently being proposed in the OAuth WG for dealing with the inherent security issues of multi-device authorization issues like this; this draft would do well to incorporate some of that

§5.2.4.2

 - the device code is included here as a query parameter instead of a body parameter, what’s the purpose of that? As written it’s incompatible with RFC8628, which is claims to be a profile of (eg, "This request performs the polling function described in...”)

§6.3

 - if the token is intended to be used in proxy as stated in §6.2, then the validation here is redundant as an invalid token would not return claims listed in this step; I would suggest that the pattern in §6.2 be removed entirely and instead the validation patterns in §6.3 be expanded into a full profile

§6.4

 - Token exchange is generally targeted for access tokens, not ID tokens; it seems that this is part of the conflation between RS and RP in this mode

§11

 - The security considerations section is remarkably thin for a protocol of this nature, and I would especially expect more discussion on how to select which mode of operation and for which purposes




In closing, I think the “token-oriented” approach has major problems in that it seems to be encoding an anti-pattern without a lot of guidance for why it would be applied. But to reiterate, I am not an expert in the RDAP ecosystem, so if any of these concerns are addressed by that ecosystem I am ignorant of those considerations.

 — Justin




On Sep 28, 2023, at 11:32 AM, Roman Danyliw <rdd@cert.org> wrote:

Hi!

I deferred this document to Thursday, October 5 telechat.  If anyone has time to review this document, it would be appreciated.

Roman

-----Original Message-----
From: Roman Danyliw
Sent: Friday, September 15, 2023 3:29 PM
To: oauth <oauth@ietf.org>
Subject: Review of draft-ietf-regext-rdap-openid

Hi!

I wanted to raise awareness that on next week's IESG telechat draft-ietf-regext-rdap-openid will be reviewed.  See https://datatracker.ietf.org/doc/draft-ietf-regext-rdap-openid/.  This document provides normative guidance on using OpenID and OAuth to secure the RDAP ecosystem (https://datatracker.ietf.org/wg/regext/about/).  Given that this is the core expertise of the WG, if there are cycles, additional reviewed would be welcome.

Thanks,
Roman
_______________________________________________
OAuth mailing list
OAuth@ietf.org
https://www.ietf.org/mailman/listinfo/oauth