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

Document Type Active Internet-Draft (oauth WG)
Authors Aaron Parecki  , David Waite 
Last updated 2020-10-02
Replaces draft-parecki-oauth-browser-based-apps
Stream IETF
Intended RFC status (None)
Formats plain text xml pdf htmlized (tools) htmlized 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: April 5, 2021                                     Ping Identity
                                                        October 02, 2020

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

Abstract

   This specification details the security considerations and best
   practices that must be taken into account when developing browser-
   based applications that use 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 April 5, 2021.

Copyright Notice

   Copyright (c) 2020 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 April 5, 2021                 [Page 1]
Internet-Draft      OAuth 2.0 for Browser-Based Apps        October 2020

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Notational Conventions  . . . . . . . . . . . . . . . . . . .   3
   3.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3
   4.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . .   3
   5.  First-Party Applications  . . . . . . . . . . . . . . . . . .   5
   6.  Application Architecture Patterns . . . . . . . . . . . . . .   5
     6.1.  Browser-Based Apps that Can Share Data with the Resource
           Server  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     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  . . . . . . . .  10
   8.  Refresh Tokens  . . . . . . . . . . . . . . . . . . . . . . .  10
   9.  Security Considerations . . . . . . . . . . . . . . . . . . .  11
     9.1.  Registration of Browser-Based Apps  . . . . . . . . . . .  11
     9.2.  Client Authentication . . . . . . . . . . . . . . . . . .  11
     9.3.  Client Impersonation  . . . . . . . . . . . . . . . . . .  12
     9.4.  Cross-Site Request Forgery Protections  . . . . . . . . .  12
     9.5.  Authorization Server Mix-Up Mitigation  . . . . . . . . .  12
     9.6.  Cross-Domain Requests . . . . . . . . . . . . . . . . . .  13
     9.7.  Content-Security Policy . . . . . . . . . . . . . . . . .  13
     9.8.  OAuth Implicit Flow . . . . . . . . . . . . . . . . . . .  13
       9.8.1.  Attacks on the Implicit Flow  . . . . . . . . . . . .  13
       9.8.2.  Countermeasures . . . . . . . . . . . . . . . . . . .  15
       9.8.3.  Disadvantages of the Implicit Flow  . . . . . . . . .  15
       9.8.4.  Historic Note . . . . . . . . . . . . . . . . . . . .  16
     9.9.  Additional Security Considerations  . . . . . . . . . . .  16
   10. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  16
   11. References  . . . . . . . . . . . . . . . . . . . . . . . . .  16
     11.1.  Normative References . . . . . . . . . . . . . . . . . .  16
     11.2.  Informative References . . . . . . . . . . . . . . . . .  17
   Appendix A.  Server Support Checklist . . . . . . . . . . . . . .  17
   Appendix B.  Document History . . . . . . . . . . . . . . . . . .  18
   Appendix C.  Acknowledgements . . . . . . . . . . . . . . . . . .  20
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  20

1.  Introduction

   This specification describes the current best practices for
Show full document text