OAuth 2.0 for Browser-Based Apps
draft-ietf-oauth-browser-based-apps-01

Document Type Active Internet-Draft (oauth WG)
Last updated 2019-03-27
Replaces draft-parecki-oauth-browser-based-apps
Stream IETF
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream WG state WG Document
Document shepherd No shepherd assigned
IESG IESG state I-D Exists
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
Open Authentication Protocol                                  A. Parecki
Internet-Draft                                                      Okta
Intended status: Best Current Practice                          D. Waite
Expires: September 28, 2019                                Ping Identity
                                                          March 27, 2019

                    OAuth 2.0 for Browser-Based Apps
                 draft-ietf-oauth-browser-based-apps-01

Abstract

   OAuth 2.0 authorization requests from browser-based apps must be made
   using the authorization code grant with the PKCE extension, and
   should not be issued a client secret when registered.

   This specification details the security considerations that must be
   taken into account when developing browser-based applications, as
   well as best practices for how they can securely implement OAuth 2.0.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on September 28, 2019.

Copyright Notice

   Copyright (c) 2019 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must

Parecki & Waite        Expires September 28, 2019               [Page 1]
Internet-Draft      OAuth 2.0 for Browser-Based Apps          March 2019

   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Notational Conventions  . . . . . . . . . . . . . . . . . . .   3
   3.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3
   4.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . .   4
   5.  First-Party Applications  . . . . . . . . . . . . . . . . . .   5
   6.  Architectural Considerations  . . . . . . . . . . . . . . . .   5
     6.1.  Apps Served from a Common Domain as the API . . . . . . .   5
     6.2.  Browser-Based App with a Backend Component  . . . . . . .   6
   7.  Authorization Code Flow . . . . . . . . . . . . . . . . . . .   6
     7.1.  Initiating the Authorization Request from a Browser-Based
           Application . . . . . . . . . . . . . . . . . . . . . . .   6
     7.2.  Handling the Authorization Code Redirect  . . . . . . . .   7
   8.  Refresh Tokens  . . . . . . . . . . . . . . . . . . . . . . .   7
   9.  Security Considerations . . . . . . . . . . . . . . . . . . .   8
     9.1.  Registration of Browser-Based Apps  . . . . . . . . . . .   8
     9.2.  Client Authentication . . . . . . . . . . . . . . . . . .   8
     9.3.  Client Impersonation  . . . . . . . . . . . . . . . . . .   8
     9.4.  Cross-Site Request Forgery Protections  . . . . . . . . .   9
     9.5.  Authorization Server Mix-Up Mitigation  . . . . . . . . .   9
     9.6.  Cross-Domain Requests . . . . . . . . . . . . . . . . . .   9
     9.7.  Content-Security Policy . . . . . . . . . . . . . . . . .  10
     9.8.  OAuth Implicit Grant Authorization Flow . . . . . . . . .  10
       9.8.1.  Threat: Interception of the Redirect URI  . . . . . .  10
       9.8.2.  Threat: Access Token Leak in Browser History  . . . .  10
       9.8.3.  Threat: Manipulation of Scripts . . . . . . . . . . .  10
       9.8.4.  Threat: Access Token Leak to Third Party Scripts  . .  11
       9.8.5.  Countermeasures . . . . . . . . . . . . . . . . . . .  11
       9.8.6.  Disadvantages of the Implicit Flow  . . . . . . . . .  11
       9.8.7.  Historic Note . . . . . . . . . . . . . . . . . . . .  12
     9.9.  Additional Security Considerations  . . . . . . . . . . .  12
   10. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  12
   11. References  . . . . . . . . . . . . . . . . . . . . . . . . .  12
     11.1.  Normative References . . . . . . . . . . . . . . . . . .  12
     11.2.  Informative References . . . . . . . . . . . . . . . . .  13
   Appendix A.  Server Support Checklist . . . . . . . . . . . . . .  13
Show full document text