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

Torsten Lodderstedt <torsten@lodderstedt.net> Sun, 10 May 2020 10:15 UTC

Return-Path: <torsten@lodderstedt.net>
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 83A7A3A0870 for <oauth@ietfa.amsl.com>; Sun, 10 May 2020 03:15:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lodderstedt.net
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 nnlpHVKwIMf3 for <oauth@ietfa.amsl.com>; Sun, 10 May 2020 03:15:17 -0700 (PDT)
Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6DCEE3A086D for <oauth@ietf.org>; Sun, 10 May 2020 03:15:17 -0700 (PDT)
Received: by mail-vs1-xe31.google.com with SMTP id x6so3812190vso.1 for <oauth@ietf.org>; Sun, 10 May 2020 03:15:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lodderstedt.net; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eQ3N5ZDKTUZhWd7sW/9P26PAe9BB7+QOUy3Sd2kcP4I=; b=PeNiJDG94hMByLU+mqB4gIgiVPSngjYu0a5I5F9iFRLjuvVJUXh3PQ9b6p+WTT587D j6mN5hG8ckVauJT2bsGcJnFUw7Rkw+9c4gN24o1Z8VAUWHfCAJPzOeMdxEMPoVGHE9WU e808gqi7ppu7Ipr5u+pM2hF3h8VI/brZk3YtFqruHDJJLZ+I5jTUwAsdlRbvI+IgigaF sm9YIR2/Sp4LBfxmFJO0nFdJ5TriKJSyIu/zqmgQFSHdurL2ZOKIH/GJfz+KCyJkN/A4 WGPvvzuI75ZmJudokJ+pjwZtw6DSffTONf1nBC2xtC1iKwKLY+XO2/thWTGc2HXj0rpr Nm5g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eQ3N5ZDKTUZhWd7sW/9P26PAe9BB7+QOUy3Sd2kcP4I=; b=r5bfWdVVU/S6D1p1VhH1w+sbCal41mZlnMk7DwtaSpPRY+gOlh6bQtPk87lcMOWOZx I9aI0g2qYmD0KzvObAVoyoyufbkXC+WwhcHy0Hbte/dOCs3hzT8RjrbJDTa7ivt51OBr F/LONZAW+lp6ljD8f+I5nlhlHXG6yT6FIOX+PH/1O/IV83MgY5KTDdceVo6fUBgn3FqI KSrLwLyC4Fr5yR/mRqyNZR3Gdhv0MEbd5KtQRmQGxpi0FIKHJw4B3Kx+FaiwVkpfvqzs AoG6cHzuX5iHNAjho81H3LdxA1u4s/95xBriVwNbBCKJh3Fi5EXkFgTcXPPj8kYj0fpE wC9Q==
X-Gm-Message-State: AGi0PuZjmKuM1sr7D6H0afTc9CbMAk0ZXhdCbKk1R+fOkrZs62sSw6mi pkSeZabRvBQhZLdXu+7OJYluMoiUOLyA3fJYaHldMRpT
X-Google-Smtp-Source: APiQypJZdY4gxWqjNE2ak5bUo5vG3IxHjvGaetZid4XpC7ihgmzjL7IfOrKaCRmladyJ/MS7QdDiKkCfiv1X1BHQ9/c=
X-Received: by 2002:a67:6889:: with SMTP id d131mr7763085vsc.25.1589105716358; Sun, 10 May 2020 03:15:16 -0700 (PDT)
MIME-Version: 1.0
References: <DM6PR00MB0684CD35E5A1E7F4309983B0F5A20@DM6PR00MB0684.namprd00.prod.outlook.com>
In-Reply-To: <DM6PR00MB0684CD35E5A1E7F4309983B0F5A20@DM6PR00MB0684.namprd00.prod.outlook.com>
From: Torsten Lodderstedt <torsten@lodderstedt.net>
Date: Sun, 10 May 2020 12:15:05 +0200
Message-ID: <CAHOkhHENFD+LD_pO+n5Zwj1cc6GacRwKtBrSmUKZ2E4AyfV0rA@mail.gmail.com>
To: Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org>
Cc: Daniel Fett <fett@danielfett.de>, "oauth@ietf.org" <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000bc041505a5488162"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/XSL6DjYJ3e740cr8O2ZzkQxOdDk>
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 10:15:22 -0000

Hi Mike,

Mike Jones <Michael.Jones=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> *On Behalf Of * Daniel Fett
> *Sent:* Thursday, May 7, 2020 11:50 PM
> *To:* 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> 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
>
> https://www.ietf.org/mailman/listinfo/oauth
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>