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

Mike Jones <Michael.Jones@microsoft.com> Sun, 10 May 2020 20:24 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 149BB3A0B8C for <oauth@ietfa.amsl.com>; Sun, 10 May 2020 13:24:06 -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 mQUGaVmwKiQk for <oauth@ietfa.amsl.com>; Sun, 10 May 2020 13:24:02 -0700 (PDT)
Received: from NAM06-DM3-obe.outbound.protection.outlook.com (mail-eopbgr640136.outbound.protection.outlook.com [40.107.64.136]) (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 0EB703A0B8B for <oauth@ietf.org>; Sun, 10 May 2020 13:24:01 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NdRGdwdqouNvznRSFH0RZM13y7d8MHH+53uMKZucLqPAV/fUo/SCn26qrCx+X0MovGZLDtmtxwUlmXzSdc6XwQm8YBi+PVc9vmp6QmbkVf8R3jgcR3dsrfVepKedKaqw4fN6Q6YNh4fbFR+vgnRVpx1bPhjNSuCUC3hC9rTITx3ziRxTwkUV65H8aVi32q9sIfAtM4O5hfJB1d/xewC4GzDANuegZT1PG8IylKNa/+6umbuuN2LYfldveahMecwEbnkW8j/xCHtcqTqjzKrqd0VyY/LXst2BkYFgx9LblwwRQmHZyqogeiC6ldw44YODw2cQl0Pfesza0phrmAQmfw==
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=fgA6Tkx3i7uRwtgPq2ZUqZstJggteHCJUReIjYFTtLE=; b=cIyaTgaBtXuzipNsJ8r93Y9Zw9A16g/X/nnv4RsZQcmgcqz3NEwKqc9Xff2zSJPU3lAB/2JmiyE0UEt5KESuJClRciFUT9nnxSdt3lcFNesAssLMae93r6yk/fgZ3VM0o2yFQJr6svl61Rs+0YBeC4/LcWNplcoASYXzmY+xmJLuJwSRqo1M6lxL5FEbLuPuII/7yyCYaxxT0xeHEDeWdRzz2SCt4zleVoTuHKtteG+dXSjv3tN8ZIEMZssjKxFUXB0su36fEOs8kb4orCRkXuKFhg91XEOJ+XAJ8bX7DlgAQNRonI6etilCBg8cTbPJuY+UYGyBNOZ6Vv3pvvWICw==
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=fgA6Tkx3i7uRwtgPq2ZUqZstJggteHCJUReIjYFTtLE=; b=SIz/k6d+6GkDcBXCU4KelxV+BB6nBUhg/OgbIdr0OI66gCWv5/PuwQB/It0X89c1njAfwlnutg0UHTVDkHCc/X93YsEYbAZ/9beeejOIxkzFQRACpruTkoyYSGnLfKXRsIeD7/z4OKcsBUdrDUXb0MTW3RlcEg+cPT1YkNVpa2Q=
Received: from MN2PR00MB0688.namprd00.prod.outlook.com (2603:10b6:208:199::23) by BL0PR00MB0817.namprd00.prod.outlook.com (2603:10b6:208:1c8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3032.0; Sun, 10 May 2020 20:23:57 +0000
Received: from MN2PR00MB0688.namprd00.prod.outlook.com ([fe80::d8ef:3352:9393:c073]) by MN2PR00MB0688.namprd00.prod.outlook.com ([fe80::d8ef:3352:9393:c073%7]) with mapi id 15.20.3031.000; Sun, 10 May 2020 20:23:57 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Dick Hardt <dick.hardt@gmail.com>
CC: Torsten Lodderstedt <torsten@lodderstedt.net>, "oauth@ietf.org" <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] OAuth 2.1 - require PKCE?
Thread-Index: AdYnCOz2ZWcGVYdMTY2lND/nBCHDyQ==
Date: Sun, 10 May 2020 20:23:56 +0000
Message-ID: <MN2PR00MB0688A376C44B8236B7F50F30F5A00@MN2PR00MB0688.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=6f86ef27-4090-4484-888d-00009a3dd372; 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-10T20:22:12Z; 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: 36e98abd-f334-432d-21d7-08d7f5201120
x-ms-traffictypediagnostic: BL0PR00MB0817:
x-microsoft-antispam-prvs: <BL0PR00MB0817BA57E6B62F6F5FA4AFC2F5A00@BL0PR00MB0817.namprd00.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8273;
x-forefront-prvs: 039975700A
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: jrgPrjJXCBdvJepFV428ErIG85AxMZMi153H4eFgiLHRizGwGbm/VHT2xUHD8GudBvMKsNnMvAkJ/2sSZBXn9UCR8Cturr2Z64sBAMxs4BEbaTLRWV4n+7sHLUFBFHEPV8OLyOaWTt30Mhbcf8FGHjPCxOJWgQfE5ufHSPI+hwEAwM5Vu/FCmZQULiEzX78j5sqBbzAf+KFASoa9rO27Wyd/aMdmP80Jp21KAtuF625OULTNgAD0vlWt2Y7atzT/8v4lXRae66F5AqEF7IayPo2UcRuEDa1KWK6Zqj/k1TxfRdfR++g6Bxv7oezNcFZ6C+MyU8Xv8uaI7F5o7UtadkI0AW6N45E3YgeqZES6rt4d4lcOOfJLrcScgMAcT31Kh9IRVHpgIBkbBbOm/9AFToRy824JIcPOAhPWw7CiKRC8KjApRVHq1z8Iai4HLrHqyKhmLHyCgjB/tW7x3cI+gNRPrKOjdkmhYwOBR99ilTWInbo/zgEf1upucA7c9N6HiWgBOrl7pCUGOXcMQ8KFmA==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR00MB0688.namprd00.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(346002)(376002)(39860400002)(366004)(396003)(33430700001)(76116006)(82950400001)(66946007)(64756008)(66556008)(66446008)(66476007)(316002)(53546011)(6506007)(966005)(2906002)(8676002)(86362001)(8936002)(9686003)(54906003)(6916009)(33656002)(55016002)(52536014)(7696005)(478600001)(5660300002)(71200400001)(8990500004)(33440700001)(82960400001)(4326008)(10290500003)(166002)(66574014)(186003)(26005)(76236002)(99710200001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: GtVVRZ1EGA9CW2aaUyL46U+jGWSLB9jiGVltonwMs9LlWyOcvmV4RhlMsNVzbgsLl9njFxtlaJjRMo6PZwwvGb586y9CqsHI+Mi7nnhOEeKjve8CS14yS65HtjQ6mY8x+xfGsjNFEVIOcGLNXzLS5CbU0IH1CsVKTFutbrNRk8ogTciplKtJCbdAiQHlP7MHC0NxZSvnSWjHhJd1txmckNQGxCs/u5ypxiRw+07RSrxkBKIHUSV9zG54PM8DqRgU64FwWQdQozcfPKuBF6pv0XhG268j+hskUEpM+U0XKobRDqYWAvyH9Pxut5fLCihbvdBU52zkdW0FTOOZH65UlWulCz7DRnoOjtmiNHSyAWYnztJW9bROWP7NaFgh5v6ZU4lMJQ1ij1AMO58G9CGYmtcWHBvxWqH1Sfo9shNYjAbmluSY1+KN1ux6SMgfuVYa2Ttp+TXGNY2e24UAC+dc5OWC1DA1402mnRMxwbsOUK4=
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_MN2PR00MB0688A376C44B8236B7F50F30F5A00MN2PR00MB0688namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: MN2PR00MB0688.namprd00.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 36e98abd-f334-432d-21d7-08d7f5201120
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2020 20:23:57.0445 (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: SzxgxZyyJ5NCyYQ//ImWlOhLMmPbY4OaLUPTQO1xB2Cs5Ia2KqqAAa9AvixKtvs8wvuQAb5tFtj47/p88mxuRg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR00MB0817
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/s6CvFNv0cJq6ZaeXwlZcXgN3k2Q>
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: Sun, 10 May 2020 20:24:06 -0000

The difference is that OAuth 2.1 is supposed to compatible with OAuth 2.0 (which is my whole goal here), whereas OAuth 2.0 was incompatible with OAuth 1.0 by design.

From: Dick Hardt <dick.hardt@gmail.com>
Sent: Sunday, May 10, 2020 12:58 PM
To: Mike Jones <Michael.Jones@microsoft.com>
Cc: Torsten Lodderstedt <torsten@lodderstedt.net>et>; oauth@ietf.org
Subject: Re: [OAUTH-WG] OAuth 2.1 - require PKCE?

Just as upgrading to OAuth 2.0 from OAuth 1.0 was voluntary, why is upgrading to OAuth 2.1 not voluntary?

OAuth 2.0 obsoleted OAuth 1.0, just as OAuth 2.1 is obsoleting OAuth 2.1. Our goal is for new deployments, that are reading the drafts, to use the best practices.

If existing deployments don't want the advantages of a new version or extension, there is nobody forcing them to upgrade -- hence my confusion on your statement that it is "mandatory". Upgrading to OAuth 2.0 from OAuth 1.0 was not mandatory, and some deployments still use OAuth 1.0 today.



ᐧ

On Sun, May 10, 2020 at 12:51 PM Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>> wrote:
If I’m not mistaken, the OAuth 2.1 draft is intended to make OAuth 2.0 (RFC 6749) obsolete, just like OAuth 2.0 (RFC 6749) made OAuth 1.0 (RFC 5849) obsolete.  That’s what makes me think developers would view updating as mandatory.  If you’re willing to remove the “replaces 6749” clause from the draft, then there would be no perception problem, as it would be clear that adoption of 2.1 would be voluntary, just like the other extension specs.

From: Dick Hardt <dick.hardt@gmail.com<mailto:dick.hardt@gmail.com>>
Sent: Sunday, May 10, 2020 12:38 PM
To: Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>>
Cc: Torsten Lodderstedt <torsten@lodderstedt.net<mailto:torsten@lodderstedt.net>>; oauth@ietf.org<mailto:oauth@ietf.org>
Subject: Re: [OAUTH-WG] OAuth 2.1 - require PKCE?

Hi Mike, I would consider upgrading to OAuth 2.1 to be voluntary, just as the other extensions. Similarly, OAuth 1.0 deployments upgrading to OAuth 2.0 was voluntary.

Would you clarify why you think upgrading to OAuth 2.1 would be mandatory?


On Sun, May 10, 2020 at 12:02 PM Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org<mailto:40microsoft.com@dmarc.ietf.org>> wrote:
I agree with actively maintaining and improving the OAuth 2.0 specs by adding enhancements that are voluntary to use.  I’ve worked on many such improvements, including Dynamic Client Registration, Authorization Metadata, the Device Flow, Token Exchange, DPoP, and support PAR and RAR, etc.  The issue that’s the subject is the current discussion is whether to make use of another enhancement, PKCE, mandatory in cases where it’s actually not needed, rather than making its use voluntary like the other enhancements, which I certainly support.

                                                       -- Mike

From: Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org<mailto:40lodderstedt.net@dmarc.ietf.org>>
Sent: Sunday, May 10, 2020 3:15 AM
To: Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>>
Cc: Daniel Fett <fett@danielfett.de<mailto:fett@danielfett.de>>; oauth@ietf.org<mailto:oauth@ietf.org>
Subject: [EXTERNAL] Re: [OAUTH-WG] OAuth 2.1 - require PKCE?

Hi Mike,

Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org<mailto:40microsoft.com@dmarc.ietf.org>> schrieb am Fr. 8. Mai 2020 um 18:55:
OAuth 2.1 was supposed to not introduce breaking changes.
I cannot remember the WG met that decision. Can you please refer to the respective thread?

Requiring exact redirect URI matching is already a breaking change. Do you oppose against this as well?


If you want to do that, please do it in TxAuth instead.

Interesting statement. Does it mean you want to conserve OAuth 2.0 and force any enhancements/improvements to go into TXAuth? This would cause huge migration efforts for existing deployments wanting to benefit from those enhancements.

I think existing deployments are better served by actively maintaining and evolving the 2.x line. For example, PAR and RAR are attempts to improve OAuth 2.x and make it usable for new use cases. That’s better protection of existing investments than sending them of to TXAuth.
Kind regards,
Torsten.


                                                       -- Mike

From: OAuth <oauth-bounces@ietf.org<mailto:oauth-bounces@ietf.org>> On Behalf Of Daniel Fett
Sent: Thursday, May 7, 2020 11:50 PM
To: oauth@ietf.org<mailto:oauth@ietf.org>
Subject: Re: [OAUTH-WG] OAuth 2.1 - require PKCE?

+1 to all what Aaron said. Thanks for pointing this out!

We need to address this in the security BCP and this will be a normative change that affects OpenID Connect Core (just as our current recommendation on the usage of nonce).

We would then have:

- use PKCE, except if you use OIDC with a nonce, then you don't need PKCE, except if you are a public client, then you still need PKCE.
- use state, except if you use PKCE, then you don't need state.

I think there are very good reasons to simplify this down to

- use PKCE
- you may or may not use state

First and foremost, not many people will understand why there are cases when the BCP/OAuth 2.1 mandate PKCE and some where they don't. However, understanding why you have to do something is key to compliance. The short version "PKCE protects the code; there is a specific case where it is not needed, but its better to use it all the time" is easy to understand. We will not see many implementations following the long version above correctly.

Second, we dramatically reduce technical complexity by reducing cases that need to be handled. We reduce correctness and compliance testing complexity in the same way. We reduce the cost of security analysis, which scales really badly to more cases.

And finally, using nonce to protect against code injection is less robust than PKCE. AS have a better track record than clients when it comes to correctly implementing security mechanisms.

Yes, this will make a number of implementations non-spec-compliant, but I do not think that this is a huge problem. Software needs to adapt all the time and a software that has not been changed in a while is probably not one you would want to use anyway. We are setting a new goal for implementations to meet and eventually, maintained implementations will get there.

-Daniel


Am 08.05.20 um 01:38 schrieb Aaron Parecki:
Backing up a step or two, there's another point here that I think has been missed in these discussions.

PKCE solves two problems: stolen authorization codes for public clients, and authorization code injection for all clients. We've only been talking about authorization code injection on the list so far. The quoted section of the security BCP (4.5.3) which says clients can do PKCE or use the nonce, is only talking about preventing authorization code injection.

The nonce parameter solves authorization code injection if the client requests an ID token. Public clients using the nonce parameter are still susceptible to stolen authorization codes so they still need to do PKCE as well.

The only case where OpenID Connect clients don't benefit from PKCE is if they are also confidential clients. Public client OIDC clients still need to do PKCE even if they check the nonce.

OpenID Connect servers working with confidential clients still benefit from PKCE because they can then enforce the authorization code injection protection server-side rather than cross their fingers that clients implemented the nonce check properly.

I really don't think it's worth the amount of explanation this will take in the future to write an exception into OAuth 2.1 or the Security BCP for only some types of OpenID Connect clients when all clients would benefit from PKCE anyway.

Aaron



On Wed, May 6, 2020 at 10:48 AM Dick Hardt <dick.hardt@gmail.com<mailto:dick.hardt@gmail.com>> wrote:
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

ᐧ


_______________________________________________

OAuth mailing list

OAuth@ietf.org<mailto:OAuth@ietf.org>

https://www.ietf.org/mailman/listinfo/oauth


_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth
_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth