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

Document Type Active Internet-Draft (oauth WG)
Last updated 2018-08-24
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                         T. Lodderstedt, Ed.
Internet-Draft                                                YES.com AG
Intended status: Best Current Practice                        J. Bradley
Expires: February 25, 2019                                        Yubico
                                                             A. Labunets
                                                                Facebook
                                                                 D. Fett
                                                              YES.com AG
                                                         August 24, 2018

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

Abstract

   This document describes best current security practices 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 February 25, 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
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents

Lodderstedt, et al.     Expires February 25, 2019               [Page 1]
Internet-Draft               Security Topics                 August 2018

   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  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Recommendations . . . . . . . . . . . . . . . . . . . . . . .   4
     2.1.  Protecting redirect-based flows . . . . . . . . . . . . .   4
     2.2.  Token Replay Prevention . . . . . . . . . . . . . . . . .   5
     2.3.  Access Token Privilege Restriction  . . . . . . . . . . .   5
   3.  Attacks and Mitigations . . . . . . . . . . . . . . . . . . .   6
     3.1.  Insufficient redirect URI validation  . . . . . . . . . .   6
       3.1.1.  Attacks on Authorization Code Grant . . . . . . . . .   6
       3.1.2.  Attacks on Implicit Grant . . . . . . . . . . . . . .   7
       3.1.3.  Proposed Countermeasures  . . . . . . . . . . . . . .   9
     3.2.  Code or State Leakage from Client or AS via Referrer
           Headers . . . . . . . . . . . . . . . . . . . . . . . . .   9
       3.2.1.  Proposed Countermeasures  . . . . . . . . . . . . . .  10
     3.3.  Attacks through the Browser History . . . . . . . . . . .  11
       3.3.1.  Code in Browser History . . . . . . . . . . . . . . .  11
       3.3.2.  Access Token in Browser History . . . . . . . . . . .  11
     3.4.  Mix-Up  . . . . . . . . . . . . . . . . . . . . . . . . .  11
       3.4.1.  Attack Description  . . . . . . . . . . . . . . . . .  12
       3.4.2.  Countermeasures . . . . . . . . . . . . . . . . . . .  14
     3.5.  Code Injection  . . . . . . . . . . . . . . . . . . . . .  14
       3.5.1.  Proposed Countermeasures  . . . . . . . . . . . . . .  16
     3.6.  Cross Site Request Forgery  . . . . . . . . . . . . . . .  18
       3.6.1.  Proposed Countermeasures  . . . . . . . . . . . . . .  18
     3.7.  Access Token Leakage at the Resource Server . . . . . . .  18
       3.7.1.  Access Token Phishing by Counterfeit Resource Server   18
         3.7.1.1.  Metadata  . . . . . . . . . . . . . . . . . . . .  19
         3.7.1.2.  Sender Constrained Access Tokens  . . . . . . . .  20
         3.7.1.3.  Audience Restricted Access Tokens . . . . . . . .  23
       3.7.2.  Compromised Resource Server . . . . . . . . . . . . .  24
     3.8.  Open Redirection  . . . . . . . . . . . . . . . . . . . .  25
       3.8.1.  Authorization Server as Open Redirector . . . . . . .  25
       3.8.2.  Clients as Open Redirector  . . . . . . . . . . . . .  25
Show full document text