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

Dick Hardt <> Fri, 08 May 2020 19:36 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 618E33A0E08 for <>; Fri, 8 May 2020 12:36:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Status: No, score=-2.096 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, FREEMAIL_FROM=0.001, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id QUOYFOvFxgPV for <>; Fri, 8 May 2020 12:36:47 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4864:20::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 5C5153A088E for <>; Fri, 8 May 2020 12:36:47 -0700 (PDT)
Received: by with SMTP id e25so2889046ljg.5 for <>; Fri, 08 May 2020 12:36:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b5qG9XqH2UJHwozvd2cA+ls8DE625bzCDhukRin4DE0=; b=NytgR+A3jOZDvArGBl1kh02Dpa+W4nqt5F7G4qa27eflCFJWr+Qw697YSY2N1KY0oy NI0IXo37J7TZj7myGPVsa6DCeamqmobwNfgyBiaJMDW9iltG8u55X1VnmDNlcOqFPjxY FDX6R/I+Goi8Y1h5mIg014SgyLZ7vbNTBEYDtAVpcBE/NGQoQLh5WydDcen2xMnKXSIh r+YJeMlokqFCZCtoHD9nX8vch1r1JDkfS0piGAUGRNcrjWrWGSga0xslccmSAhzYci79 DF4r/uu71h+OIKXzZbnnETkCYsLA+E6EWnobcaijitC8zerNKPTU62SIOy2pQGACia49 CnQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b5qG9XqH2UJHwozvd2cA+ls8DE625bzCDhukRin4DE0=; b=kUqmInRcV1U/5uCe/7yvYXYiZdRrkDX85YB5U6hYdy7bizW6rsw81GMfIvrb0G6wBH s/9sw8tRC+p5QXSOlXL6NWYI5oKgaW+rCbc/kDkHLJMMVuOClj5I70c4DYyjHQULv6zG 26LdCPoogDR4hh5q13fABZ57Pq3z+ngqyZcSnWaAbUH2V6xrYM3G6Vc4onU+PSoGw2Do xzyzuX0lnDVd1cLAio+w62RPz0eMnE8k+jNeIT5Nae9JQcbFtqbiKLecBwTcsNej3DTh PdKBJA+ieKpS101R19gvLQAAWF+PdtpOOaHCDAYre8Ig62SWY9uUZtGZzSUiAbFSR07d Jugw==
X-Gm-Message-State: AOAM531CfeV2OsSKL3B8QbB6sAJKCy2AKY7Q+8FrcxSKCT9UyCz04wXu YVtCcYnbe7CkNNW7fOxucLpGcoRe3BgUGt39lq+f0cic
X-Google-Smtp-Source: ABdhPJzye4dzSSAC6MfeCk54+ZlnOmGlVa3zujxgtTOdbKLP9v9tHYYMgOeEKFoTKYGdmnSWavkwSybiLldwhbxluYE=
X-Received: by 2002:a2e:b891:: with SMTP id r17mr2782595ljp.34.1588966605461; Fri, 08 May 2020 12:36:45 -0700 (PDT)
MIME-Version: 1.0
References: <> <>
In-Reply-To: <>
From: Dick Hardt <>
Date: Fri, 8 May 2020 12:36:17 -0700
Message-ID: <>
To: Philippe De Ryck <>
Cc: Mike Jones <>, Aaron Parecki <>, OAuth WG <>
Content-Type: multipart/alternative; boundary="000000000000141c8505a5281ec6"
Archived-At: <>
Subject: Re: [OAUTH-WG] OAuth 2.1 - require PKCE?
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 08 May 2020 19:36:51 -0000

FYI: An objective of OAuth 2.1 is not to introduce anything new -- it is
OAuth 2.0 with best practices.

On Thu, May 7, 2020 at 10:36 PM Philippe De Ryck <> wrote:

> From working with a lot of developers on understanding OAuth 2.0 and OIDC,
> I definitely vote for simplicity. Understanding the subtle nuances of when
> a nonce is fine and when PKCE should be used is impossible without in-depth
> knowledge of the flows and their properties. Misunderstandings will cause
> security vulnerabilities, which can easily be avoided.
> Since OAuth 2.1 is a separate spec, I don’t really see a problem with
> existing code not being compliant. They support OAuth 2.0, and if they want
> to be OAuth 2.1 compliant, they add PKCE. If I’m not mistaken, other
> requirements of OAuth 2.1 would also clash with existing deployments (e.g.,
> using non-exact redirect URIs).
> I believe that optimizing for making OAuth 2.1 easier to understand will
> yield the highest return.
> Philippe
> On 8 May 2020, at 03:42, Mike Jones <
>> wrote:
> 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 <>
> *Sent:* Thursday, May 7, 2020 4:39 PM
> *To:* Dick Hardt <>
> *Cc:* OAuth WG <>rg>; Torsten Lodderstedt <
>>gt;; Mike Jones <>
> *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 <> 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