Re: [OAUTH-WG] proposed resolution for PKCE in OAuth 2.1
Mike Jones <Michael.Jones@microsoft.com> Thu, 14 May 2020 23:02 UTC
Return-Path: <Michael.Jones@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 B09563A00DC for <oauth@ietfa.amsl.com>; Thu, 14 May 2020 16:02:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.273
X-Spam-Level:
X-Spam-Status: No, score=-2.273 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.173, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QPex7FMdse2o for <oauth@ietfa.amsl.com>; Thu, 14 May 2020 16:02:00 -0700 (PDT)
Received: from NAM06-DM3-obe.outbound.protection.outlook.com (mail-eopbgr640103.outbound.protection.outlook.com [40.107.64.103]) (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 515BB3A00D8 for <oauth@ietf.org>; Thu, 14 May 2020 16:02:00 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vtajyoeglawmdu+7ID1S6guiRPlEo3yNITfUBP35IDPW1THIl3DbR1KKS7Qj1a1xANtoQe8D4twxJzIRXVaPKT2TJgw4KEim5VfvROQ9xW14v3PSWl8ZkJrG4JE1b4ZiQp6/DAk2zbGU63RdIUtjEGYpsnq95OwBTa69Y/bOdDkxnjF6h17lTEQBm/YcSwgYX2azC0dvpjeXXaaqRtR6dwaoyszUrAQtHunZZKSnJ7UIVpErkgR23cvv59vx+i3PALNzuWyI3xapj74TiJkzLUAkKrj5KGHsZBm9fyDnuscONF3CwZRsxplP3W1bqJMghlO7T3kbYqF88FFfVptqjA==
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-SenderADCheck; bh=Bi4q3S2ayH7wfjLVD/FrlEuUv1feFLDRgVtZNIn9/lQ=; b=krtHxnRTOMIc0/MM8tkMdOyF02YFQqv0dGUkohMkhkME2roApHcg7DAP3MD3eeKhG+p02aaf9dCTQUaDp2s4robBUEWpjU8ZuscHsCYTAsBiniwDLbzT0BTfYnvYk3p7K//y7dY0StKVKj6AByMDNEfawabQCv/UYMG6yd8ioKKbkgX950JEuI0f7LoJMy9iEYEkTfL5b0im+QEONbmu6HXbrzlP7MZUKaObKOY+YhEYzCo+i7X97OTVThjZugNk6ZNp+vAzRa9ItH0soXVbfo/m/IOM7eZ4vVEMRQQxuYklw+LaEaN7uQ25zcQGqDyi/zdz9fTopmAPTWL/Glz/4g==
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=Bi4q3S2ayH7wfjLVD/FrlEuUv1feFLDRgVtZNIn9/lQ=; b=Dpv1GUOAPNeT1tuxLEbdLN4aYw2RR1qHagRVC+C59zu6kB/i3XOivJT+/0WjMmqQ2EMe95Ky4XD8GVxkhliEaMDo731/3pxm9tUTBlCMQ1Fpt1lrEqbMBN7BGD1+1uEhn8V9o3fVgj6CM8kS545CHvnDL5ZlfZfyQOJBvLhAQrg=
Received: from MN2PR00MB0686.namprd00.prod.outlook.com (2603:10b6:208:15f::13) by MN2PR00MB0477.namprd00.prod.outlook.com (2603:10b6:208:c6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3035.0; Thu, 14 May 2020 23:01:58 +0000
Received: from MN2PR00MB0686.namprd00.prod.outlook.com ([fe80::68f6:b54c:8d5e:d283]) by MN2PR00MB0686.namprd00.prod.outlook.com ([fe80::68f6:b54c:8d5e:d283%7]) with mapi id 15.20.3035.000; Thu, 14 May 2020 23:01:58 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Nov Matake <matake@gmail.com>, Torsten Lodderstedt <torsten@lodderstedt.net>
CC: OAuth WG <oauth@ietf.org>
Thread-Topic: Re: [OAUTH-WG] proposed resolution for PKCE in OAuth 2.1
Thread-Index: AdYqQ6mP+sjI2ivKQUaZ77sbm4USDw==
Date: Thu, 14 May 2020 23:01:57 +0000
Message-ID: <MN2PR00MB0686CF5B850104F0BCCC5202F5BC0@MN2PR00MB0686.namprd00.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=d8e7b79f-5374-4899-8867-0000dc177252; 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=2020-05-14T22:47:59Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;
authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=microsoft.com;
x-originating-ip: [50.47.87.252]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 6ebadbb1-c95d-4806-ab79-08d7f85acdda
x-ms-traffictypediagnostic: MN2PR00MB0477:
x-microsoft-antispam-prvs: <MN2PR00MB04777DAC3BB068C74F135CA4F5BC0@MN2PR00MB0477.namprd00.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 040359335D
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: HfGFh+JzpHO30PUsmqT3jBRHBVsNyTkYSo+fqyOQDwKBqG6ksDWvQB6Lq7bSRWyZ0Qy5hz0Mt+E1KzfxzjKRb10Q7C+l+EvLTC8Jo8QI6eWZX5dWh9jBbv+AslF/so8cOBpxogebOCE5V9uuvwSD06ybUUxRhDVqFvBzUoKOG9l/C6Y/X+uLPux49HjbPx3mWUnhL5KwoNiZZMxpfcD9bu87rSjkaIetklvGxesEah+4cirAoVzBih4Kdo8KizpJRw/1aAusWoQp/c/p2qJ8AKpoNj+aZ5ktRwkMtEIH/qvbErw0pRxdDYsfUqrYCiKWAIxy1d8j3VtwOF+Cf5UUKzgOPXIQR6UXpqaKdQbNz4uK759NQUJw8b8PNAGv7eM7nwqemkkjdPu4NRvN6TGqSg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR00MB0686.namprd00.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(136003)(39860400002)(366004)(396003)(376002)(53546011)(52536014)(110136005)(66476007)(966005)(76116006)(5660300002)(478600001)(64756008)(71200400001)(66556008)(10290500003)(6506007)(316002)(86362001)(26005)(8990500004)(33656002)(7696005)(66946007)(82960400001)(82950400001)(9686003)(66446008)(2906002)(8676002)(8936002)(55016002)(4326008)(186003); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: TZcSn3dznLiWbahkE1w4KSpDHsoJZoWhFE28LErI7zjUZtQU5QDjfr6NpOJaZHdH3g+v0N5T98OYkGIRVg9a3EeUfaetPr1nekcaouBQwQY+jhsYs2+YuDVZGRnS1W44hzczYOY5XaqNqlGwGVSRlXEn/TJiA81AoyhjXu6pOLoWiH5eZVWtO/J0SBYP/7EbOUN7HsQIExC27sp2Ww/MGeYmSNoLKyUtFJ0FJ/k1S9nieQ1kJCcaA7FUtH42cQp7xKML0qC9Ctm1KoyKu7OqRyqjVwWKSax3gCtW3LY93u5e/SX3tdZLGqNvHwnXdzBclnSIjgIaoEnssWGLyuLLxhr8LPV/jSjXkv90BrWGP98VOp5sZ81KseTxTaCabKVmqqUrly5KfNZuTBvvxE+n3TVTjQv1gZfLjVYgGvnWlzouzrNb+d8M383YLh4GIpgAF+nha6Uv7C4qo2BzmcEs8nkZrAvYmwHYRHuTxpva4mc=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: MN2PR00MB0686.namprd00.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 6ebadbb1-c95d-4806-ab79-08d7f85acdda
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2020 23:01:57.9614 (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: 6KngrogljvLtZjGDoUp/j8epXj1M2sWgdNO4AiXjqtFcybDsKAK1951LinVradLQA4rMLujhcE4xOGVuII/5dQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR00MB0477
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/Acz48E70IXSZ8rtlqylam82x9hA>
Subject: Re: [OAUTH-WG] proposed resolution for PKCE in OAuth 2.1
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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, 14 May 2020 23:02:03 -0000
I agree with Nov that obscuring the language in 9.7 would be a disservice to developers. The Security BCP, which has already going the WGLC, explicitly calls out the use of nonce as part of the best practices. OAuth 2.1 should do no less. The 9.7 language that Aaron proposed was the result of many people's contributions and a vigorous discussion. Let's publish the next version of 2.1 with that language intact, as I believe it represents at least a local point of hard-won consensus. Let's get that language into the record of drafts. There's always time to debate it and change it later in subsequent drafts, but let's not now lose what it took a lot of effort to achieve. Thanks, -- Mike -----Original Message----- From: Nov Matake <matake@gmail.com> Sent: Thursday, May 14, 2020 3:18 AM To: Torsten Lodderstedt <torsten@lodderstedt.net> Cc: OAuth WG <oauth@ietf.org>; Mike Jones <Michael.Jones@microsoft.com> Subject: Re: [OAUTH-WG] proposed resolution for PKCE in OAuth 2.1 There is no specific mechanism right now. But future developers won’t be able to read the reason why the extension point is given only for confidential clients. > On May 14, 2020, at 18:32, Torsten Lodderstedt <torsten@lodderstedt.net> wrote: > > Are you aware of any suitable mechanism? I’m asking since from my perspective this clause is mainly intended to allow existing OpenID Connect deployments to use nonce instead of PKCE in combination with OAuth 2.1. It’s a compromise. I think we should not encourage others to invent their own OAuth security mechanisms. > >> On 14. May 2020, at 09:37, Nov Matake <matake@gmail.com> wrote: >> >> Hi, >> >> Why not allowing public clients use "other suitable mechanisms” then? >> OAuth WG can allow both type of clients do so, then OIDF will define nonce as the alternative only for confidential clients. >> >>> 2020/05/14 15:56、Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org>のメール: >>> >>> Hi all, >>> >>> I would also like to thank everybody for the substantial discussion. >>> >>> The proposed change for Section 4.1.2.1 works for me (as already stated). I’m not fully comfortable with the proposed change for Section 9.7 for the following reasons: >>> >>> - The text is weaker than Section 4.1.2.1 since it RECOMMENDS use of PKCE instead of requiring it (with a well-defined exception). >>> - Given the latest findings re nonce I don’t feel comfortable with recommending any mechanism that this WG is not responsible for and thus did not conduct the security threat analysis for. I think the better way for us as WG is to define the extension point for other mechanisms. The OpenID Foundation (or any other body) can then fill in and issue a statement that nonce (or another suitable mechanism) fulfils the requirements of the extension point. >>> >>> Based on this considerations, I propose the following text for Section 9.7: >>> >>> Clients MUST prevent injection (replay) of authorization codes into >>> the authorization response by attackers. Public clients MUST use the >>> "code_challenge” with a transaction-specific value that is securely >>> bound to the client and the user agent in which the transaction was >>> started. Confidential clients MUST use the “code_challenge” in the >>> same way or other suitable mechanisms to mitigate authorization code >>> injection. >>> >>> This text follows the logic in Section 4.1.2.1 and allows use of the nonce for confidential clients. >>> >>> best regards, >>> Torsten. >>> >>>> On 12. May 2020, at 02:21, Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org> wrote: >>>> >>>> That works for me. Thanks all for the useful back-and-forth that got us to this point of clarity. I suspect many of us learned things along the way; I know that I did! >>>> >>>> Cheers, >>>> -- Mike >>>> >>>> From: Aaron Parecki <aaron@parecki.com> >>>> Sent: Monday, May 11, 2020 4:55 PM >>>> To: OAuth WG <oauth@ietf.org> >>>> Cc: Neil Madden <neil.madden@forgerock.com>; Mike Jones >>>> <Michael.Jones@microsoft.com> >>>> Subject: Re: [OAUTH-WG] proposed resolution for PKCE in OAuth 2.1 >>>> >>>> Thank you Neil. >>>> >>>> To address Mike's concerns in the previous threads, I would like to also update section 9.7 with the following text: >>>> >>>> Clients MUST prevent injection (replay) of authorization codes into >>>> the authorization response by attackers. The use of the >>>> `code_challenge` parameter is RECOMMENDED to this end. For >>>> confidential clients, the OpenID Connect `nonce` parameter and ID >>>> Token Claim {{OpenID}} MAY be used instead of or in addition to the >>>> `code_challenge` parameter for this purpose. The `code_challenge` >>>> or OpenID Connect `nonce` value MUST be transaction-specific and >>>> securely bound to the client and the user agent in which the transaction was started. >>>> >>>> This change better clarifies the specific circumstances under which the "nonce" parameter is sufficient to protect against authorization code injection. >>>> >>>> Aaron Parecki >>>> >>>> On Mon, May 11, 2020 at 11:55 AM Neil Madden <neil.madden@forgerock.com> wrote: >>>> I am happy with this proposed wording. Thanks for updating it. >>>> >>>> — Neil >>>> >>>> >>>> On 11 May 2020, at 19:52, Aaron Parecki <aaron@parecki.com> wrote: >>>> >>>> Thanks for the lively discussion around PKCE in OAuth 2.1 everyone! >>>> >>>> We would like to propose the following text, which is a slight variation from the text Neil proposed. This would replace the paragraph in 4.1.2.1 (https://tools.ietf.org/html/draft-parecki-oauth-v2-1-02#section-4.1.2.1) that begins with "If the client does not send the "code_challenge" in the request..." >>>> >>>> "An AS MUST reject requests without a code_challenge from public clients, and MUST reject such requests from other clients unless there is reasonable assurance that the client mitigates authorization code injection in other ways. See section 9.7 for details." >>>> >>>> Section 9.7 is where the nuances of PKCE vs nonce are described. >>>> >>>> As Neil described, we believe this will allow ASs to support both OAuth 2.0 and 2.1 clients simultaneously. The change from Neil's text is the clarification of which threats, and changing to MUST instead of SHOULD. The "MUST...unless" is more specific than "SHOULD", and since we are already describing the explicit exception to the rule, it's more clear as a MUST here. >>>> >>>> Aaron Parecki >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> OAuth mailing list >>>> OAuth@ietf.org >>>> https://www.ietf.org/mailman/listinfo/oauth >>>> >>>> _______________________________________________ >>>> OAuth mailing list >>>> OAuth@ietf.org >>>> https://www.ietf.org/mailman/listinfo/oauth >>> >>> _______________________________________________ >>> OAuth mailing list >>> OAuth@ietf.org >>> https://www.ietf.org/mailman/listinfo/oauth >> >
- [OAUTH-WG] proposed resolution for PKCE in OAuth … Aaron Parecki
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Neil Madden
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Aaron Parecki
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Mike Jones
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Torsten Lodderstedt
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Nov Matake
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Torsten Lodderstedt
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Nov Matake
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Mike Jones
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Aaron Parecki
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Nov Matake
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Daniel Fett
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Torsten Lodderstedt
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Nov Matake
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Daniel Fett
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Nov Matake
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Mike Jones
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Nov Matake
- Re: [OAUTH-WG] proposed resolution for PKCE in OA… Aaron Parecki
- Re: [OAUTH-WG] [EXTERNAL] Re: proposed resolution… Mike Jones
- Re: [OAUTH-WG] [EXTERNAL] Re: proposed resolution… Dick Hardt