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

Phillip Hunt <phil.hunt@independentid.com> Fri, 08 May 2020 19:45 UTC

Return-Path: <phil.hunt@independentid.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 F40CC3A0DF2 for <oauth@ietfa.amsl.com>; Fri, 8 May 2020 12:45:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.894
X-Spam-Level:
X-Spam-Status: No, score=-1.894 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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=independentid-com.20150623.gappssmtp.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 VQCeaNwJ3P-p for <oauth@ietfa.amsl.com>; Fri, 8 May 2020 12:45:34 -0700 (PDT)
Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) (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 E76563A0CC9 for <oauth@ietf.org>; Fri, 8 May 2020 12:45:33 -0700 (PDT)
Received: by mail-pl1-x633.google.com with SMTP id f15so1183640plr.3 for <oauth@ietf.org>; Fri, 08 May 2020 12:45:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=independentid-com.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=7keUDgniwQ31af4kJER8Esz+5AQ6TytioDByXnaZS34=; b=Ne0yXWG3ZroFcB/ppt6M4LEaMu4Hihu4NUeQROplsBpwoAi16nBAUfBc5HXCCsCQRo hAUZH3VhahZmmgvkYdH6VyyQzNoapDgcZKdUt4ElM2Hi2//k1qL7p5Qi1TOSFEJqXg5L Ou1ExDhI8Xpte/SdKpWBHpvJFQ0fpbPPaHGSCivXrosU0N8xPF+zAcIFdoc9KwZbtIow w7l/3mLRHcmdkqde3xzTnagN2tvJfC4fpxSjyS9cEQw2Ir2dJ/lre3JvrHMQIiMEfPza 1NFecQPWuas/tRmqUAcZzpx/Wjlbfwh8wvQsGd37JTSVkJIQz33SRlawoIWv1iocSED4 9l/g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=7keUDgniwQ31af4kJER8Esz+5AQ6TytioDByXnaZS34=; b=phR2Ke/s8UYtRPMeode6w8RdD9eLtRzQU8AKjVbAn/4x+OQLxPR6/+mpF6q+3NPfok fPGx+d/7siq3bgodQuRBXiCCR66LB7wH+/cJmqO9JJNAFr4UqmuaKP7jTTmgR2U0HhQe taiv2AnHojb5qS0ggjPqSi2JRZiQDcEhtiiVWZZW49jZUMVzvUETv4yD+JIYoRBOAqr8 TW+MfEpjfam7e2oGSSmgmeegkL9ZCuED95o7GwK8YXx2OYtKt5Y6Bgez3Ab2euCeG0Io hmmJ1fRJTlm0YCWmF7tv58EnvVUBBAM6br6cbOIPbH3rrNv39Hpp0IkcAS08AW/7FLb8 AS5A==
X-Gm-Message-State: AGi0PuY+/4I4VJISol705ZxSva9dvEIVyT18t24yLDyxP+QgCltNzAIB sWLIZoMohd1zh4ukNGm4KZOL0Q==
X-Google-Smtp-Source: APiQypKYkdGKOLDFxHV+wfZJUqIefMARGsjcc9JF2zLpGifKZJt4GwpHx0Eogjeda9rBNeCVe2aHrg==
X-Received: by 2002:a17:902:b7c9:: with SMTP id v9mr3961525plz.197.1588967133048; Fri, 08 May 2020 12:45:33 -0700 (PDT)
Received: from ?IPv6:2605:8d80:446:a45b:fca2:5799:6003:37be? ([2605:8d80:446:a45b:fca2:5799:6003:37be]) by smtp.gmail.com with ESMTPSA id 207sm1918755pgh.34.2020.05.08.12.45.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 May 2020 12:45:32 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-2AFEB999-6A9D-4159-9BA2-0ACC741106E4"
Content-Transfer-Encoding: 7bit
From: Phillip Hunt <phil.hunt@independentid.com>
Mime-Version: 1.0 (1.0)
Date: Fri, 08 May 2020 12:45:28 -0700
Message-Id: <4BEF6231-6D2B-43A0-8E73-21FC9E45BBC4@independentid.com>
References: <CAD9ie-vosKtF2jSLtZSKk4E2-6BEOGZzvzNeH=HQy2L6DCuonw@mail.gmail.com>
Cc: Philippe De Ryck <philippe@pragmaticwebsecurity.com>, Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org>, OAuth WG <oauth@ietf.org>
In-Reply-To: <CAD9ie-vosKtF2jSLtZSKk4E2-6BEOGZzvzNeH=HQy2L6DCuonw@mail.gmail.com>
To: Dick Hardt <dick.hardt@gmail.com>
X-Mailer: iPhone Mail (17E262)
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/42T53BFhuzweVhFfkltl5FA8FiE>
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 19:45:39 -0000

We are not discussing anything new here. We are discussing adoption of best practice. 

The disconnect appears to be that one dependent standard’s “typical” use (nonces) does not have the ietf consensus as best practice. 

This lack of consensus needs to be resolved. 

Phil

> On May 8, 2020, at 12:37 PM, Dick Hardt <dick.hardt@gmail.com> wrote:
> 
> 
> 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 <philippe@pragmaticwebsecurity.com> 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 <Michael.Jones=40microsoft.com@dmarc.ietf.org> 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 <aaron@parecki.com> 
>>> Sent: Thursday, May 7, 2020 4:39 PM
>>> To: Dick Hardt <dick.hardt@gmail.com>
>>> Cc: OAuth WG <oauth@ietf..org>; Torsten Lodderstedt <torsten@lodderstedt.net>; 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> 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