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

Document Type Active Internet-Draft (oauth WG)
Last updated 2019-07-24
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: January 25, 2020                                  Ping Identity
                                                           July 24, 2019

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

Abstract

   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 January 25, 2020.

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
   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.

Parecki & Waite         Expires January 25, 2020                [Page 1]
Internet-Draft      OAuth 2.0 for Browser-Based Apps           July 2019

Table of Contents

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