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

Mike Jones <Michael.Jones@microsoft.com> Fri, 08 May 2020 01:42 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 432133A0AE6 for <oauth@ietfa.amsl.com>; Thu, 7 May 2020 18:42:44 -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 MF7qzr9tJ2Li for <oauth@ietfa.amsl.com>; Thu, 7 May 2020 18:42:42 -0700 (PDT)
Received: from NAM06-DM3-obe.outbound.protection.outlook.com (mail-eopbgr640123.outbound.protection.outlook.com [40.107.64.123]) (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 E76883A0AE4 for <oauth@ietf.org>; Thu, 7 May 2020 18:42:41 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l1d3pDY4tg2dEPVrPsWxgxUObKNhQpIWaG3W9phuivOITtKDdNDPXC9YraxEjW4bT3hdNgjcH/haKh/DjvgF0Iwu5ulkAxOStG2pj5d3+3oalm1964sRzxyJnLBxDmx591TD0h8HDsyn5n3ZuFdJELCLsP2WU1xuSMy7YklqPbK9aVIzu1Baz2WhWWzUvF2Asa+VqQhK1ebT8uBNwUwsZPUgH81ryR4lU/9UtQmsXlvjaUo9tcNSMuAi+qhgs7f/zhuCC/5MRMzoE/CUCFJ1ioUjhW7x6oRVTHOqXxrBEXAEEVo6kTEEKvKybRgcCUlb0+8iiufq/qBnWzBTO5f1DQ==
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=btKIvsxbkipySqW+k+HhSUCtxuWv4at9MvU3OBqM3fA=; b=hW2vkuIjzmrGw0mRKtrD2TbQHYKo7A70+N0TYNoRdugVGD0fWfmus49xwgcpsiJ4Fohq8spAvH37vv+0quGeyYeyR5puQrc6yvjnyxXf4K2hzl0VZlnuBR83KcUpokGwCxCz2SeM2ZV+58rwJKmX2oZXO+FEyyz8fN73H93UAvvQL/K5Ck5Vr1K2WoOmAAAjYDituQ2tqOwT8B7m1iTRI8af0EdJyi41xsGAx4hUSCuysOrXaLApIT2FPFPZT2ndZ/VxOhdq5mk6osSZxQKvXAavA9nhUj4zjXMOO0RbzB2Wx58qS5BM949N+iwG2I1rz0Gy1MI0wxwU2KACC0uu8Q==
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=btKIvsxbkipySqW+k+HhSUCtxuWv4at9MvU3OBqM3fA=; b=PLnDV+35707BWnztou1vvdUqaO/nhxMRXtxR5OzAA1KZwiEYFFUHBwV9kgQN7HZo1mjb3GU87F+4sVw28BOmApeno9h3qpBnD/LwBW69DxhfqIc8M9QTWTxqsxlgd1aaY7ro5rM3Z27pIpIEVPcdoQIOO2nYmrQO2wWh9+f9/Sk=
Received: from BY5PR00MB0676.namprd00.prod.outlook.com (2603:10b6:a03:20c::15) by BY5PR00MB0808.namprd00.prod.outlook.com (2603:10b6:a03:1c6::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3010.0; Fri, 8 May 2020 01:42:34 +0000
Received: from BY5PR00MB0676.namprd00.prod.outlook.com ([fe80::7d21:c7e9:3141:cf8d]) by BY5PR00MB0676.namprd00.prod.outlook.com ([fe80::7d21:c7e9:3141:cf8d%9]) with mapi id 15.20.3020.000; Fri, 8 May 2020 01:42:34 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Aaron Parecki <aaron@parecki.com>, Dick Hardt <dick.hardt@gmail.com>
CC: OAuth WG <oauth@ietf.org>, Torsten Lodderstedt <torsten@lodderstedt.net>
Thread-Topic: OAuth 2.1 - require PKCE?
Thread-Index: AdYk2e3isCGyBFqJR6KJhTwCOhG/oA==
Date: Fri, 8 May 2020 01:42:34 +0000
Message-ID: <BY5PR00MB06766F71775C01E586CD1C12F5A20@BY5PR00MB0676.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=e6bd1af8-cf02-4b28-bba9-00002cff9155; 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-08T01:07:28Z; 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: d5d18573-5490-4c72-7ecb-08d7f2f114ee
x-ms-traffictypediagnostic: BY5PR00MB0808:
x-microsoft-antispam-prvs: <BY5PR00MB080872D3EF5ED200377E5B1AF5A20@BY5PR00MB0808.namprd00.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:4941;
x-forefront-prvs: 039735BC4E
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 7Vrzw5H6N5nFcAKqd3Qa1M2UiAe2tQaqDWlC5arsMhHKC7AkWwOUbALp4evTh3q6iFn0c1ttmFKAdqchDZlP0mwOAusifAr345rvqxt6kxW++PCFOvUEO5Hf1aQNhveFBLG/gy++2fe4JBsW/h/BCn35uwCcZd+2m/XT3PF2vwV3ogY2h4o27c6zoWFGDh8hCWuuwlqux/eUc3QFtZQNa6RaEQgGR0WMpnG3Ti90tvQ009PzaYofKn7NoZtRfZjbHk6cm3drIpxKANf+Gc+Ec/rogUTv2+2NaDi7CiaeHZCH1KYE6BkeiGQgE+o3+v0Rhls3pwjUtp9Q03LXVd9bRONUJe9Lrw6DgsUbFeMNHBa1mhT6VrWgtcA+kvzja2BAwYEXTgXgaDjQcVBGz1aC5ccp/DkI/gpi1c+sNWPuUcsdpS+imkhm+8LPNB5aMuMR
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR00MB0676.namprd00.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(376002)(346002)(39860400002)(136003)(396003)(33430700001)(5660300002)(478600001)(9686003)(4326008)(55016002)(86362001)(66574014)(33656002)(2906002)(8990500004)(54906003)(26005)(53546011)(110136005)(64756008)(7696005)(6506007)(10290500003)(186003)(316002)(66946007)(83320400001)(83280400001)(83310400001)(83290400001)(83300400001)(33440700001)(8676002)(66556008)(76236002)(76116006)(8936002)(66446008)(82950400001)(66476007)(71200400001)(82960400001)(52536014)(99710200001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: teCzTAJundwRVL7LBjEQnFjnObnGDC8okt2hsHpwiDmODVF3RUUVuGKuUg/rMBTd1SX0umAuyfkjj2o0IREAvvbFvU7TwlQ0804nWLyL8wS/5otNv5PQ2OD/fYAeKrriuWd5vjlT+v6NKnDhuuB/tGmTK+W51f8Z1T5hhPtSsr6EHpvrBIrdmHtOq9n6eZZDK3rfyU4gYYStn3U4mQeS5Z3P7SH3gIfN5goIhh/zW7IIlmEiYhQI4ZUTDsit+0vRBEw7Oalfg+s3B4yAhPlRwKOsply+6dXW9yGo7cLaC547H7YNRScaXFMo5rovyIMc8mld0TiICN4Hj0jsBGOqw5Vg4I4kl1dbMtNfOdAWwsPJ5FXKpzpvcNO7IboFHB5DTXZAs2U9/aKFoYJCrLIwaYpu+3kEpqL/5L2/yPEB3hK8Q+q2N220fhr7luHs7YKolaSiQiF5BzxS5wjbC1DRgzTJCK00tfeNpK5jaoZffOOJhohqXpagfR2opBaOP2uQuNqCJ+FZorKX7sIKcGN1/vMQuTeXt1jZv5ZkHz68GiEuVUVasYthb8vUGoGnMU48Hkm47+BbK9Nz4WMw189DkaFFu5/UVI0SWWUcJP4zdfmBDJGOK+JKLnfiw6IqFry1J5i3xCoGrX1AUCWEvriI7Nm6mgGYtGc3vETvC4zi8aIC3wLtFh+WuDANTFXzhOx0wYQRP7eE3Za9jrkibQpJ92e9lLND8cnWnwwDy/RrFmu2paBuBiQVt7t0687tZE21sRR+lBkvMDAl7NdCJNe3i40dl+3VtH9egf6N1sNaaWI=
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_BY5PR00MB06766F71775C01E586CD1C12F5A20BY5PR00MB0676namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BY5PR00MB0676.namprd00.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: d5d18573-5490-4c72-7ecb-08d7f2f114ee
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2020 01:42:34.6597 (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: VX8xaqc7HpqZ+D2gUBxX21fiYHDd5GuT0wbIdnMVyyAOlnFB3rFSLwl4BGYVcIOkiGv6nyYZBGV0OBU0If8yXg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR00MB0808
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/4phYwwoT1F0lT6by5XtUICnvM90>
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: Fri, 08 May 2020 01:42:46 -0000

Aaron, I believe you’re trying to optimize the wrong thing.  You’re concerned about “the amount of explanation this will take”.  That’s optimizing for spec simplicity – a goal that I do understand.  However, by writing these few sentences or paragraphs, we’ll make it clear to developers that hundreds or thousands of deployed OpenID Connect RPs won’t have to change their deployments.  That’s optimizing for interoperability and minimizing the burden on developers, which are far more important.

As Brian Campbell wrote, “They are not equivalent and have very different ramifications on interoperability”.

Even if you’re optimizing for writing, taking a minimally invasive protocol change approach will optimize that, overall.  If we proceed as you’re suggesting, a huge amount of writing will occur on StackOverflow, Medium, SlashDot, blogs, and other developer forums, where confused developers will ask “Why do I have to change my deployed code?” with the answers being “Despite what the 2.1 spec says, there’s no need to change your deployed code.”

I’d gladly write a few sentences in our new specs now to prevent ongoing confusion and interop problems that would otherwise result.  Let me know when you’re ready to incorporate them into the spec text.

                                                       -- Mike

From: Aaron Parecki <aaron@parecki.com>
Sent: Thursday, May 7, 2020 4:39 PM
To: Dick Hardt <dick.hardt@gmail.com>
Cc: OAuth WG <oauth@ietf.org>rg>; Torsten Lodderstedt <torsten@lodderstedt.net>et>; Mike Jones <Michael.Jones@microsoft.com>
Subject: Re: OAuth 2.1 - require PKCE?

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

ᐧ