58°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • It's Time for OAuth 2.1

    December 12, 2019

    Trying to understand OAuth often feels like being trapped inside a maze of specs, trying to find your way out, before you can finally do what you actually set out to do: build your application.

    While this can be incredibly frustrating, it’s no accident that OAuth is actually made up of many different RFCs, building upon each other and adding features in different ways.

    In fact, the “core” OAuth spec, RFC 6749, isn’t even called a specification, it’s technically a “framework” you can use to build specifications from. Part of the reason for this is because it leaves a lot of things optional, and requires that an implementer makes decisions about things like which grant types to support, whether or not refresh tokens are one-time use, and even whether access tokens should be Bearer tokens or use some sort of signed token mechanism.

    This has often been quoted as the biggest failure of OAuth, but is also a large part of the reason OAuth has been successfully deployed at the largest companies at scale over the last 10 years.

    OAuth has been patched and extended a lot in the last decade of experience deploying systems using it. It’s been extended in ways the original authors could never even see coming. Keep in mind that when OAuth 2.0 was published in 2012, the iPhone 5 was brand new, the latest browser from Microsoft was Internet Explorer 9, single-page apps were called “AJAX apps”, and CORS was not yet an established W3C standard.

    Since 2012, the web and mobile landscape has changed dramatically. More people access the internet from mobile devices than desktop devices, single-page apps are an extremely common way of creating web apps, and countless password database breaches have time and again demonstrated that storing passwords is dangerous.

    The Evolving OAuth 2.0 Landscape

    To address this changing landscape, the OAuth community has patched and added to the OAuth spec over the years. The OAuth core spec (RFC 6749) defines four grant types: Authorization Code, Implicit, Password, and Client Credentials. It used to be the case that the Implicit grant was recommended for both JavaScript apps as well as native apps.

    It became apparent that a better solution was needed for mobile apps, so PKCE (RFC 7636) was created to provide a way to use the Authorization Code flow without a client secret.

    Later, “OAuth 2.0 for Native Apps” (RFC 8252) was published, which recommends that native apps use the Authorization Code flow with the PKCE extension.

    A new class of device arose along with a need to use OAuth with them: devices that have no browser or lack a keyboard, such as an Apple TV or YouTube streaming video encoder. An entirely new OAuth grant was created to address this, called the Device Grant, published as RFC 8626.

    There are even more patches currently in the works. I am writing a draft for best practices for single-page apps, and the latest Security Best Current Practice (BCP) is currently in the final call. The single-page apps draft recommends using PKCE with JavaScript apps and says you should no longer use the Implicit flow. The Security BCP effectively deprecates the Implicit flow as well as the Password grant out of OAuth entirely, and further recommends using PKCE even for web server apps.

    So what started out as a list of four grant types has had things added and removed, and now looks more like this.

    Which, if you look closely, actually ends up distilling down to this:

    So what we’ve effectively done is taken the core OAuth RFC, added and removed things, and turned it into an entirely different set of recommendations. The problem is that it requires reading far too many RFCs to understand this landscape.

    If you want to implement a secure OAuth solution today, it requires reading: RFC 6749 (OAuth 2.0 Core), RFC 6750 (Bearer Tokens), RFC 6819 (Threat Model and Security Considerations), RFC 8252 (OAuth for Native Apps), RFC 8628 (Device Grant), OAuth for Browser-Based Apps, OAuth 2.0 Security Best Current Practice, RFC 7009 (Token Revocation), RFC 8414 (Authorization Server Metadata), and if you’re also implementing an OAuth server, then you need to read RFC 7519 (JWT), JWT Best Current Practice, JWT Profile for Access Tokens, and probably some others that I forgot. That’s a lot of material.

    Why not OAuth 3?

    So why am I suggesting an OAuth 2.1? Surely we should instead scrap this existing work and create something simpler and more streamlined?

    As it so happens, that effort is already under way as well, being led by Justin Richer under the name Transactional Authorization, or TXAuth, and likely to end up as OAuth 3. That effort takes a completely greenfield approach, rethinking how OAuth and all its related specs and extensions such as UMA might look if everything were not tied to being an extension of the original OAuth 2.0 RFC 6759. I’m definitely in support of this effort, there are a lot of nice patterns that emerge when you look at it this way, but as we all know, creating a new spec from scratch is not a quick process, much less getting broad adoption within the industry. So while effort on OAuth 3 is under way, which will take literal years to finish, there is room to tidy things up with OAuth 2 in the mean time.

    Creating OAuth 2.1

    At the OAuth working group meeting in Singapore last month (IETF 106), I led a discussion about OAuth 2.1 and what it should encompass.

    My main goal with OAuth 2.1 is to capture the current best practices in OAuth 2.0 as well as its well-established extensions under a single name. That also means specifically that this effort will not define any new behavior itself, it is just to capture behavior defined in other specs. It also won’t include anything considered experimental or still in progress.

    There was a general agreement from folks in the room that something like this is needed, and following the official meeting, I led a two-hour breakout session where a dozen or so of us dove into more details and started making a plan.

    Torsten, the author of the Security BCP made a comment which I thought framed the discussion well. His goal for OAuth 2.1 is that it should make the Security BCP irrelevant because it already includes everything the Security BCP says. In other words, there should be no need to document the most secure way to implement OAuth, since that should be the only option available when you read the spec.

    What is OAuth 2.1?

    We still need to discuss the specifics about what form this document will take, whether that is going to be an entirely new RFC that replaces RFC 6749, or a BCP that references the other specs, or something else entirely. However, the overarching goals are:

    • Give people a starting point which lays out a clear path for what they will need to read
    • Reduce the number of documents people have to read to understand OAuth and implement it securely
    • Get rid of the irrelevant content in old RFCs that has been deprecated, so that readers don’t get through an entire section only to discover a later RFC deprecated it
    • Labeling libraries or products as OAuth 2.1 is a lot simpler to understand than having to figure out whether it accurately implements OAuth 2.0 and all the desired extensions

    The specifics of what will be included in OAuth 2.1 are still up for discussion within the group, and will be in the agenda of the upcoming IETF meetings. The starting point for these discussions is roughly the below.

    • Start with OAuth 2.0 Core, RFC 6749
    • Include OAuth 2.0 Bearer Tokens, RFC 6750
    • Adopt the Security BCP, which removes the Password grant and the Implicit flow
    • Require PKCE for all client types, not just public clients (defined in the Security BCP)
    • Adopt the native app and browser-based app BCPs
    • Include the Device Grant as a top-level grant option available (RFC 8626)
    • Include Token Revocation (RFC 7009)
    • Include Authorization Server Metadata (RFC 8414)

    If an authorization server intends to interoperate with arbitrary resource servers, such as OAuth services and open source projects, then there is an additional set of requirements that includes:

    • Token Introspection (RFC 7662)
    • JWT Access Tokens (current working group draft)
    • JWT Best Current Practice (current working group draft)

    Of course all of these points are currently up for debate, so if you have feelings about them, you should definitely join the mailing list and discuss them!

    Currently the biggest question for the group is whether or not OAuth 2.1 should make technically breaking changes. It definitely won’t define anything new itself, but if you look at what the Security BCP says, it requires PKCE for all authorization code grants, even for confidential clients. Since most current deployments of OAuth 2.0 only support PKCE for public clients, that means most current deployments will not be compliant with OAuth 2.1 out of the gate. There are arguments on both sides of this, which was a large part of the discussion during the breakout session last month, with no clear consensus.

    These are the kinds of questions that will be discussed in the coming months within the group. If you have thoughts, I would be more than happy to hear them! Feel free to send an email to the list directly, or even write a blog post in response!

    I’m excited for this work to kick off, and looking forward to many more discussions going forward!

    Please visit oauth.net/2.1 for the latest information about the OAuth 2.1 effort.

    Portland, Oregon • 49°F
    Thu, Dec 12, 2019 6:10pm -08:00 #oauth #oauth2 #oauth21
    107 likes 58 reposts 1 bookmark 2 replies 24 mentions
    • Marty McGuire
    • Zachary Dunn
    • Tomáš Jakl
    • keithzg
    • sonicrocketman
    • Candle
    • Evan Prodromou
    • Matt Raible
    • Dmitri Shuralyov
    • 刘亚涛
    • Thomas gratier
    • Mike VanDelinder
    • 陳建勳
    • 56
    • Stephen Doxsee
    • Abimaran Kugathasan
    • Andreas Toom
    • kazuki229
    • Ramazan AYVAZ
    • lhl722
    • 🐓 まったり 🐓
    • Justin Richer
    • Shane Becker Ⓐ 🏴 🖤
    • Tim Cappalli
    • Jim Kalafut
    • OktaDev
    • Jovan Kostovski
    • Manuel Hr
    • Ashok George
    • Swapnil Madavi
    • Randall Degges
    • Adam DuVander
    • raupach
    • Pedro Félix
    • Clemens Diebold
    • Partha Paλ
    • jmballes73
    • Nico Kaiser
    • Thomas Hunter II
    • ShrekOverflow
    • ゆき
    • Tsuzu
    • Sylvere Richard
    • Scalanjava
    • Mark Diskin
    • Steve Tian
    • Jan Jaap Z
    • upsilon
    • FSantos
    • わっさん(੭ ᐕ)੭
    • ぐむ夫
    • とよさん
    • Jon Kåre Hellan
    • Amirsh
    • ころちゃん
    • Shailendrapandey
    • Martin Gallo 🇦🇷 💚
    • Anand Sharma (आनंद)
    • Karl McGuinness
    • José Netto
    • nsao
    • Bolesław Dawidowicz
    • nhosoya
    • Sam
    • Øyvind Horneland
    • lef/HAYASHI, Tatsuya
    • Alexandre Yukio Harano
    • 根無草
    • Mike Pulcini
    • FrailWords
    • Azara/nori
    • Nitesh jain
    • Michael
    • Eric Wallace
    • Friedhold Matz
    • Torbjørn Nerbøvik
    • Carlos Andreu
    • Emanuel Indermühle
    • Nico TRIBALLIER
    • Sourabh Kumar Jha
    • Víctor RB
    • Jacky Wu
    • Nicolas Tisserand
    • むさしん
    • Erik Smith
    • fanghui
    • Jennifer Galvin
    • つばめ
    • ΛDΛM
    • Laurence Gellert
    • Devin Price
    • Ryoya Tamura
    • Oleg Kovalov
    • Justin Hendricks
    • beyondeado
    • Mehdi Medjaoui
    • D. Munch
    • Jonathan Jouty
    • Vedran Pavić
    • Duncan Godwin
    • AximusQualm
    • marco schrieck 🇪🇺
    • epc
    • Dad
    • Brian Broom
    • Yang Lin
    • Bertrand Carlier
    • Bertrand Carlier
    • Jaime Lopez
    • Tim Burks
    • Ville Kurkinen
    • Jasha 👨‍💻
    • Loeiz
    • Pete Johanson
    • Jeremiah for Warren
    • Mehdi Medjaoui
    • Abimaran Kugathasan
    • Fabien Arrault
    • Nicolas Tisserand
    • Michael Duergner
    • むさしん
    • Guillaume Tuloup
    • 森
    • Guillaume Gillon
    • Martin Irigaray
    • Rob Winch
    • Torbjørn Nerbøvik
    • Friedhold Matz
    • OAuth 2.0
    • FrailWords
    • Azara/nori
    • lef/HAYASHI, Tatsuya
    • 根無草
    • Alexandre Yukio Harano
    • OktaDev
    • Michael Herman
    • José Netto
    • Karl McGuinness
    • Anand Sharma (आनंद)
    • Shailendrapandey
    • ころちゃん
    • Amirsh
    • FSantos
    • Ravi Teja Pothana
    • Takashi Kawasaki
    • ゆき
    • 👹秋田の猫🐱
    • Sylvere Richard
    • David Fdez.
    • Jared Hanson
    • Randall Degges
    • srmoore
    • Michael van Niekerk
    • Zeihan Aulia
    • 🐓まったり🐓
    • Justin Richer
    • 陳建勳
    • 刘亚涛
    • Macho Pirate Mick Rackam
    • Peichao Yu
    • Dmitri Shuralyov
    • Kushal Dave
    • django
    • Evan Prodromou
    • mooreds
    • Jamie Tanna
    • Michael twitter.com/jMchael
      Great article !
      Fri, Dec 13, 2019 4:58pm +00:00 (via brid-gy.appspot.com)
    • Govner twitter.com/oidc6
      Bravo
      Fri, Dec 13, 2019 2:55pm +00:00 (via brid-gy.appspot.com)

    Other Mentions

    • Frank Pientka☁️ twitter.com/fpientka
      Escape the #OAuth maze of specs, It's Time for OAuth 2.1 aaronparecki.com/2019/12/12/21/…
      Fri, Aug 6, 2021 1:18pm +00:00 (via brid.gy)
    • Metnёw twitter.com/vladimir_metnew
      aaronparecki.com/2019/12/12/21/… How many RFCs have you read from this list? I remember I tried to make OAuth scanner for bug bounty based on RFC6819😂
      Sat, Apr 25, 2020 4:45pm +00:00 (via brid-gy.appspot.com)
    • Luciano Mammino twitter.com/loige
      It's Time for OAuth 2.1 aaronparecki.com/2019/12/12/21/…
      Thu, Apr 2, 2020 4:50pm +00:00 (via brid-gy.appspot.com)
    • Ivan Novakov twitter.com/ivannovakov
      OAuth v2.1 draft is out - what is changing: aaronparecki.com/2019/12/12/21/… #oauth #API
      Thu, Apr 2, 2020 1:48pm +00:00 (via brid-gy.appspot.com)
    • Stuart Winter-Tear twitter.com/StegoPax
      The draft for OAuth 2.1 Authorization Framework has been published. tools.ietf.org/html/draft-par… Blog post by @aaronpk explaining the changes: aaronparecki.com/2019/12/12/21/…?
      Thu, Apr 2, 2020 7:53am +00:00 (via brid-gy.appspot.com)
    • 투명모자 twitter.com/untilinotzero
      oauth.net/2.1/ aaronparecki.com/2019/12/12/21/… OAuth 2.0 의 오래된 부분들을 걷어내고 베스트 프랙티스를 정리해서 2.1로 내놓는다는 얘기구나
      Wed, Apr 1, 2020 3:11am +00:00 (via brid-gy.appspot.com)
    • /brúno antúnɛs/ twitter.com/b_antunes
      It's Time for OAuth 2.1 • Aaron Parecki aaronparecki.com/2019/12/12/21/…
      Tue, Mar 31, 2020 7:18pm +00:00 (via brid-gy.appspot.com)
    • Owain Lewis twitter.com/owainlewis
      It'S Time For Oauth 2.1 (2019) aaronparecki.com/2019/12/12/21/… #programming
      Tue, Mar 31, 2020 3:53pm +00:00 (via brid-gy.appspot.com)
    • Lobsters twitter.com/lobsters
      It's Time for OAuth 2.1 (2019) lobste.rs/s/76f4pl #programming aaronparecki.com/2019/12/12/21/…
      Tue, Mar 31, 2020 2:20pm +00:00 (via brid-gy.appspot.com)
    • Alexander Holbreich twitter.com/aHolbreich
      Yes it's time to for #Oauth2.1 ! aaronparecki.com/2019/12/12/21/…
      Fri, Feb 7, 2020 5:55pm +00:00 (via brid-gy.appspot.com)
    • Mr Musale twitter.com/musaletweets
      It's Time for OAuth 2.1 • Aaron Parecki aaronparecki.com/2019/12/12/21/…
      Mon, Jan 6, 2020 9:38am +00:00 (via brid-gy.appspot.com)
    • Dad twitter.com/GeekAndDad
      YES!
      Mon, Dec 23, 2019 10:12pm +00:00 (via brid-gy.appspot.com)
    • Vladimir Dzhuvinov twitter.com/dzhuvi
      #OAuth 2.1 - time to consolidate the patchwork of specs and BCPs into one clean RFC, with all deprecated stuff removed?
      Tue, Dec 17, 2019 5:45pm +00:00 (via brid-gy.appspot.com)
    • Heiko Scherrer ⚜️ twitter.com/openwms
      Time for a consolidation of all draft RFC #OAuth2
      Fri, Dec 13, 2019 9:56pm +00:00 (via brid-gy.appspot.com)
    • Thomas Vitale twitter.com/vitalethomas
      OAuth 2.1 - “There should be no need to document the most secure way to implement OAuth, since that should be the only option available when you read the spec.” #OAuth #AuthZ #AppSec @aaronpk aaronparecki.com/2019/12/12/21/…
      Fri, Dec 13, 2019 4:09pm +00:00 (via brid-gy.appspot.com)
    • Farasath Ahamed twitter.com/farazath619
      aaronparecki.com/2019/12/12/21/…
      Fri, Dec 13, 2019 3:26pm +00:00 (via brid-gy.appspot.com)
    • Shireesh Thanneru twitter.com/thanneru
      Excellent post on the state of OAuth and what’s ahead
      Fri, Dec 13, 2019 2:57am +00:00 (via brid-gy.appspot.com)
    • Matt Raible twitter.com/mraible
      With OAuth 2.1: "...there should be no need to document the most secure way to implement OAuth, since that should be the only option available when you read the spec." 👍 #oauth2
      Fri, Dec 13, 2019 2:44am +00:00 (via brid-gy.appspot.com)
    • feedproxy.google.com
      Fri, Dec 13, 2019 9:36am -08:00
    • www.jvt.me
      Sun, Dec 15, 2019 9:53am -08:00
    • www.jvt.me
      Sun, Dec 15, 2019 10:00am -08:00
    • medium.com
      Fri, Dec 20, 2019 2:32pm -08:00
    • medium.com
      Fri, Dec 20, 2019 2:32pm -08:00
    • medium.com
      Mon, Apr 27, 2020 10:55am -08:00
Posted in /articles using quill.p3k.io

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv