Re: [OAUTH-WG] OAuth 2.1 - require PKCE?

Mike Jones <Michael.Jones@microsoft.com> Wed, 06 May 2020 20:51 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 833453A0A69 for <oauth@ietfa.amsl.com>; Wed, 6 May 2020 13:51:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, 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 3iAtTTvnMAvV for <oauth@ietfa.amsl.com>; Wed, 6 May 2020 13:51:19 -0700 (PDT)
Received: from NAM06-DM3-obe.outbound.protection.outlook.com (mail-eopbgr640110.outbound.protection.outlook.com [40.107.64.110]) (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 E01C03A0B43 for <oauth@ietf.org>; Wed, 6 May 2020 13:51:18 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iqUGscLVG3fbSmU5FfQWHxiDrnlef90RqxPpdEQkUQPEnJabmm35/975Lqqd9rRfpsNQ8qFbMncbBvp8R9BnFhvJO0G8vUyMKvOcGk12/f0g2XwK5mA4ltvXUqA6nwDmMoKWuN0/6N5x0JDQk+/9yquE3HGXaXzvRHvvSrfIWXKS/GbML/W6NBn4rwvhHGXQPSHsnIjeJURHT7gYSzyRopcHVxIKOYWgZUyFbunJjwG4x0srMPa/w6INWlA8YIBYFOwkGVoq4T+DyBtirm9zmCItKeph8f9fyXugAgKOsQ2CD7bgASPlGIRGxSzI9mPgncwLBYMYM9r3u4xKLkJatA==
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=cUFHV41rtwAZINGRXlUKSMoR5Ui2hlTfv1NmnN3EgQ8=; b=MX7o3SONs5+E80WIhgsso6yvAqGmY3GZvfzRzr8EfEfNQocS1h5HsQaEEX7uwlJzvX8o1lgZr2JheguOvu1WTnsm8k0PguCRnItWsaYb2vGXenGEJQ5/Da3vSbZGP4wY4chBCdUTTx8+5JDOP3+/WeelgclaauYIGfrBk6SmWkjuhpNuvc87nZZqZ/2oKmYcM7BRwBc8Pj7cDC6W2hgbQyF/DnkbSFlQ/5EyctIok5jBBlmT7MU+l11l4vjF4OHBhp5TC57XeLxWV4Oa0Q5oNj3Z+4W7Oa6wctsJBW2BqKn6RHIKe1txc1GOj0VW1Fau1lSpOR1TGckwWD2mkY3ycA==
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=cUFHV41rtwAZINGRXlUKSMoR5Ui2hlTfv1NmnN3EgQ8=; b=XdTzGVzLFDSsn1lMsJkM328K7WXAF826DG7emkWOkeHz098ZSpLS6AEkZbSumjrLtrYYIlTADDhtsfQAUnS36sAHSxzjarezBSK3vDUh4y/bJ/as1FZvulnF2D2B0VR9Y6kGlDG7KVLgjl9oqzSp8Kh+tVKlQRi5lXOUW4ofupo=
Received: from CH2PR00MB0679.namprd00.prod.outlook.com (2603:10b6:610:af::7) by CH2PR00MB0664.namprd00.prod.outlook.com (2603:10b6:610:ac::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3011.0; Wed, 6 May 2020 20:51:12 +0000
Received: from CH2PR00MB0679.namprd00.prod.outlook.com ([fe80::c8f1:c1e0:dcd6:53b8]) by CH2PR00MB0679.namprd00.prod.outlook.com ([fe80::c8f1:c1e0:dcd6:53b8%9]) with mapi id 15.20.3015.000; Wed, 6 May 2020 20:51:12 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Aaron Parecki <aaron@parecki.com>
CC: Dick Hardt <dick.hardt@gmail.com>, "oauth@ietf.org" <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] OAuth 2.1 - require PKCE?
Thread-Index: AdYj6BLITTZ1xD2qT2mwE3FiY+UuOA==
Date: Wed, 06 May 2020 20:51:12 +0000
Message-ID: <CH2PR00MB0679EC6188095591526B518FF5A40@CH2PR00MB0679.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=cb2c463d-21ed-40f7-84c9-000006a0ca7f; 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-06T20:46:47Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;
authentication-results: parecki.com; dkim=none (message not signed) header.d=none;parecki.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: fa8ef016-0558-4284-436e-08d7f1ff367b
x-ms-traffictypediagnostic: CH2PR00MB0664:
x-microsoft-antispam-prvs: <CH2PR00MB066432E6653F7C92C0F4CAA5F5A40@CH2PR00MB0664.namprd00.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:7691;
x-forefront-prvs: 03950F25EC
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: MwzDr9CXZJM6ZMpB1SAwOqsvCAXrCtxAsxYxHrlhK3tXO1uHrhBWSUpiBHPpLgnHdl4pDuapzuBdlAxONHfteJ9IjTpmJHIKo9JvTt2tFynhqhgvTHece+emKWdxxSRdBGbKCKwH8BvvWmnu59lv7rqg2nrMsBRY7Nnlf686y51nR0iaSz5aVGYOCXHz2XuvAogpB99q+vgfmUpX+nyVLlLTxp0yQQ75Oe+LUIQEmSYyZ/NLQXfAJJVd75UwF3h/0R4MBmNhvKb59sR//x5N1LBkQ4N43jp+YkGIQhGT/UqsDq5+Mm9ownrnpl4ILUWjfvr3MEsKap/jsHZ3cfZRR6RoZF9xr2XWmfDgTBHS5ipUgXL1Sn4k+cKVc8n0KU+jsKPbeEd1Ir03hfAW9lsLN/W14UjzT4qalmSIJTwEudYgRBgciyBVykVgTpYcd/YZj9tws8Li+5w9Uf7Bbv3tVgfNTjaC39OtrZEEwaPZMILTnbM4bDBqXTZXOmr5K4hFoZuYKnuLa5bqXRexD1ErJg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR00MB0679.namprd00.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(136003)(346002)(366004)(39860400002)(376002)(33430700001)(82950400001)(82960400001)(4326008)(55016002)(966005)(66556008)(66446008)(8936002)(8990500004)(66476007)(64756008)(6916009)(33440700001)(86362001)(5660300002)(52536014)(33656002)(10290500003)(478600001)(8676002)(9686003)(76116006)(71200400001)(26005)(186003)(6506007)(7696005)(53546011)(66946007)(316002)(2906002)(54906003)(66574014)(166002)(99710200001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: JlQ9W+sNogMM7gyaOm4OWqXHAAM/5/kIVOe4JqnoDVhJslaDV2XmHnKXJbLFQBnj1i6Mtcu5Odur1GOuTqS+ol3kqc69GyG7323fuCG8YCvOHpA//mEXIGMxTRpvPkAOKyXPd5gvYABgUN2aJx9VIoCUDNg/QlN9FyFT2oRnuXTJMGketo8CdIh9MtIN+hVMmeE3jyKa+JbV8yPvu+lmNHb18AdbCPIBzj8bNCmlwidbeAvDjjyHMbfJS1BsQMypL3m76dF31Yqxrhgm1WuiwH1oUbxKcWMyHZVJmfY1vANQtk8L6t4LL2ULg7AaSnYMwv0jwdclWiaXl3ht8twVr6nL3AoZ9iux9bChI34cvX4mu7l4Z9xS10JGsYkzm2+KLJTMsKpgxEYKWzxhtJ9z30/ijBl+7i9D3XxyR4fdi9QEHU0pKxR9lEDhgLf8Yhyry7ffLz9NeyGtuoYYQEYZ+BCuY5jbYUsqYuMy9gujKLwvaqwuVTig223LbkDn7CM0U+d3Mli0+4mfhgB/4lZWILcpdUT25uwNXCQlPEVz9XWZDu9w7PwFpsneZUxy4ebVzyLNmRFJ+Of1FbFq8u5f9jSLKWCRanGuXTs/JUHxEMv+elHyC9xMSCHUHlonZH646ijCAnLqtJFygJTIijigRe372xxUr7X5enPt7la1sRLp3KisHQ9CQ4b6YawCiPGP9Rt9JRSdpVFF2QegqpKGu2J5cvtxwUoDp5HhiSusNte28v0OhuHfNs0NLiHXRf7lOr17olHKbFsaBB5AcwwL8JPqpqkqupWMMNG4LfywxhY=
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_CH2PR00MB0679EC6188095591526B518FF5A40CH2PR00MB0679namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CH2PR00MB0679.namprd00.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: fa8ef016-0558-4284-436e-08d7f1ff367b
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 May 2020 20:51:12.7633 (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: RjGbPhLyC4r+sYj8aGDunV8MzjXpijVcOj1O/d/bc4g6US9NGg3owTRayTPB78RFaTn5+aDscawI+0K/anaB5w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR00MB0664
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/MpQNvGvqxeoAQRjufLigr9rgsvM>
Subject: Re: [OAUTH-WG] OAuth 2.1 - require PKCE?
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: Wed, 06 May 2020 20:51:23 -0000

Requiring a change to every deployed RP is not “a very small leap”.  It’s an invasive big deal, introducing a breaking change and bifurcating a well-functioning ecosystem without sufficient cause.

What this actually points out to me is that we should modify the language in the Security BCP to say something like “OAuth Servers MUST support PKCE unless they are only used for OpenID Connect Authentication Requests”.  I’d thought that that was already the case, as that mirrors the client requirements and I apparently failed to read it closely enough.  I’ll submit a separate request for the change to the Security BCP to make it self-consistent.

                                                       -- Mike

From: Aaron Parecki <aaron@parecki.com>
Sent: Wednesday, May 6, 2020 1:43 PM
To: Mike Jones <Michael.Jones@microsoft.com>
Cc: Dick Hardt <dick.hardt@gmail.com>; oauth@ietf.org
Subject: Re: [OAUTH-WG] OAuth 2.1 - require PKCE?

Going back to this point about server vs client requirements, since both the Security BCP and OAuth 2.1 currently say that ASs MUST support PKCE, isn't that already imposing additional requirements on OpenID Connect providers that don't currently exist in OpenID Connect alone?

OPs that want to be compliant with the Security BCP will need to add PKCE support if they don't already have it (many of them already support it so for many of them this will not be any change), so it seems like a very small leap to also require clients implement PKCE as well.

On Wed, May 6, 2020 at 12:31 PM Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>> wrote:
I realize what it says about servers.  My point is that OAuth 2.1’s requirements on clients should match those in the security BCP and not try to go beyond them.

                                                       -- Mike

From: Aaron Parecki <aaron@parecki.com<mailto:aaron@parecki.com>>
Sent: Wednesday, May 6, 2020 12:24 PM
To: Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>>
Cc: Dick Hardt <dick.hardt@gmail.com<mailto:dick.hardt@gmail.com>>; oauth@ietf.org<mailto:oauth@ietf.org>
Subject: Re: [OAUTH-WG] OAuth 2.1 - require PKCE?

Yes, the BCP says *clients* may use either PKCE or nonce to prevent authorization code injection. Shortly after that quoted segment is the below:

> Authorization servers MUST support PKCE [RFC7636].

On Wed, May 6, 2020 at 12:22 PM Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>> wrote:
Aaron, the section you cited at https://tools.ietf.org/html/draft-ietf-oauth-security-topics-15#section-2.1.1 makes it clear that clients can support EITHER PKCE or the OpenID Connect nonce.   The text is:

   Clients MUST prevent injection (replay) of authorization codes into
   the authorization response by attackers.  The use of PKCE [RFC7636<https://tools.ietf.org/html/rfc7636>]
   is RECOMMENDED to this end.  The OpenID Connect "nonce" parameter and
   ID Token Claim [OpenID<https://tools.ietf.org/html/draft-ietf-oauth-security-topics-15#ref-OpenID>] MAY be used as well.  The PKCE challenge or
   OpenID Connect "nonce" MUST be transaction-specific and securely
   bound to the client and the user agent in which the transaction was
   started.

We should not attempt to change that in OAuth 2.1, as doing so would needlessly break already working and secure clients.

                                                       -- Mike

From: Aaron Parecki <aaron@parecki.com<mailto:aaron@parecki.com>>
Sent: Wednesday, May 6, 2020 11:56 AM
To: Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>>
Cc: Dick Hardt <dick.hardt@gmail.com<mailto:dick.hardt@gmail.com>>; oauth@ietf.org<mailto:oauth@ietf.org>
Subject: [EXTERNAL] Re: [OAUTH-WG] OAuth 2.1 - require PKCE?

> In particular, authorization servers shouldn’t be required to support PKCE when they already support the OpenID Connect nonce.

The Security BCP already requires that ASs support PKCE: https://tools.ietf.org/html/draft-ietf-oauth-security-topics-15#section-2.1.1 Are you suggesting that the Security BCP change that requirement as well? If so, that's a discussion that needs to be had ASAP. If not, then that's an implicit statement that it's okay for OpenID Connect implementations to not be best-practice OAuth implementations. And if that's the case, then I also think it's acceptable that they are not complete OAuth 2.1 implementations either.






On Wed, May 6, 2020 at 11:21 AM Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org<mailto:40microsoft.com@dmarc.ietf.org>> wrote:
The disadvantage of requiring PKCE for OpenID Connect implementations is that you’re trying to add a normative requirement that’s not required of OpenID Connect deployments today, which would bifurcate the ecosystem.  There are hundreds of implementations (including the 141 certified ones at https://openid.net/certification/), none of which have ever been required to support PKCE.  Therefore, most don’t.

Per feedback already provided, I believe that OAuth 2.1 should align with the guidance already in the draft Security BCP, requiring EITHER the use of PKCE or the OpenID Connect nonce.  Trying to retroactively impose unnecessary requirements on existing deployments is unlikely to succeed and will significantly reduce the relevance of the OAuth 2.1 effort.

In particular, authorization servers shouldn’t be required to support PKCE when they already support the OpenID Connect nonce.  And clients shouldn’t reject responses from servers that don’t support PKCE when they do contain the OpenID Connect nonce.  Doing so would unnecessarily break things and create confusion in the marketplace.

                                                          -- Mike

From: OAuth <oauth-bounces@ietf.org<mailto:oauth-bounces@ietf.org>> On Behalf Of Dick Hardt
Sent: Wednesday, May 6, 2020 10:48 AM
To: oauth@ietf.org<mailto:oauth@ietf.org>
Subject: [OAUTH-WG] OAuth 2.1 - require PKCE?

Hello!

We would like to have PKCE be a MUST in OAuth 2.1 code flows. This is best practice for OAuth 2.0. It is not common in OpenID Connect servers as the nonce solves some of the issues that PKCE protects against. We think that most OpenID Connect implementations also support OAuth 2.0, and hence have support for PKCE if following best practices.

The advantages or requiring PKCE are:

- a simpler programming model across all OAuth applications and profiles as they all use PKCE

- reduced attack surface when using  S256 as a fingerprint of the verifier is sent through the browser instead of the clear text value

- enforcement by AS not client - makes it easier to handle for client developers and AS can ensure the check is conducted

What are disadvantages besides the potential impact to OpenID Connect deployments? How significant is that impact?

Dick, Aaron, and Torsten

[https://mailfoogae..appspot.com/t?sender=aZGljay5oYXJkdEBnbWFpbC5jb20%3D&type=zerocontent&guid=452438ba-d429-4656-ace9-b284744bc171]ᐧ
_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth