OAuth 2.0 Security Best Current Practice
draft-ietf-oauth-security-topics-11

Document Type Active Internet-Draft (oauth WG)
Last updated 2018-12-28
Replaces draft-lodderstedt-oauth-security-topics
Stream IETF
Intended RFC status Best Current Practice
Formats plain text pdf html bibtex
Stream WG state WG Document
Document shepherd Hannes Tschofenig
IESG IESG state I-D Exists
Consensus Boilerplate Yes
Telechat date
Responsible AD (None)
Send notices to Hannes Tschofenig <hannes.tschofenig@arm.com>
Web Authorization Protocol                                T. Lodderstedt
Internet-Draft                                                   yes.com
Intended status: Best Current Practice                        J. Bradley
Expires: 1 July 2019                                              Yubico
                                                             A. Labunets
                                                                Facebook
                                                                 D. Fett
                                                                 yes.com
                                                        28 December 2018

                OAuth 2.0 Security Best Current Practice
                  draft-ietf-oauth-security-topics-11

Abstract

   This document describes best current security practice for OAuth 2.0.
   It updates and extends the OAuth 2.0 Security Threat Model to
   incorporate practical experiences gathered since OAuth 2.0 was
   published and covers new threats relevant due to the broader
   application of 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 1 July 2019.

Copyright Notice

   Copyright (c) 2018 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 (http://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.

Table of Contents

   1.  Introduction
   2.  Recommendations
       2.1.  Protecting Redirect-Based Flows
             2.1.1.  Authorization Code Grant
             2.1.2.  Implicit Grant
       2.2.  Token Replay Prevention
       2.3.  Access Token Privilege Restriction
   3.  Attacks and Mitigations
       3.1.  Insufficient Redirect URI Validation
             3.1.1.  Attacks on Authorization Code Grant
             3.1.2.  Attacks on Implicit Grant
             3.1.3.  Proposed Countermeasures
       3.2.  Credential Leakage via Referrer Headers
             3.2.1.  Leakage from the OAuth client
             3.2.2.  Leakage from the Authorization Server
             3.2.3.  Consequences
             3.2.4.  Proposed Countermeasures
       3.3.  Attacks through the Browser History
             3.3.1.  Code in Browser History
             3.3.2.  Access Token in Browser History
       3.4.  Mix-Up
             3.4.1.  Attack Description
             3.4.2.  Countermeasures
       3.5.  Authorization Code Injection
             3.5.1.  Proposed Countermeasures
       3.6.  Access Token Injection
             3.6.1.  Proposed Countermeasures
       3.7.  Cross Site Request Forgery
             3.7.1.  Proposed Countermeasures
       3.8.  Access Token Leakage at the Resource Server
             3.8.1.  Access Token Phishing by Counterfeit
                     Resource Server
             3.8.2.  Compromised Resource Server
       3.9.  Open Redirection
             3.9.1.  Authorization Server as Open Redirector
             3.9.2.  Clients as Open Redirector
       3.10.  307 Redirect
       3.11.  TLS Terminating Reverse Proxies
       3.12.  Refresh Token Protection
   4.  Acknowledgements
   5.  IANA Considerations
   6.  Security Considerations
   7.  Normative References
   Appendix A.  Document History
   Authors' Addresses

1.  Introduction

   It's been a while since OAuth has been published in [RFC6749] and
   [RFC6750].  Since publication, OAuth 2.0 has gotten massive traction
   in the market and became the standard for API protection and, as
   foundation of OpenID Connect [OpenID], identity providing.  While
   OAuth was used in a variety of scenarios and different kinds of
   deployments, the following challenges could be observed:

   *  OAuth implementations are being attacked through known
      implementation weaknesses and anti-patterns (CSRF, referrer
      header).  Although most of these threats are discussed in the
      OAuth 2.0 Threat Model and Security Considerations [RFC6819],
Show full document text