OAuth 2.0 Security Best Current Practice
draft-ietf-oauth-security-topics-16
Web Authorization Protocol T. Lodderstedt
Internet-Draft yes.com
Intended status: Best Current Practice J. Bradley
Expires: 8 April 2021 Yubico
A. Labunets
D. Fett
yes.com
5 October 2020
OAuth 2.0 Security Best Current Practice
draft-ietf-oauth-security-topics-16
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 8 April 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
Lodderstedt, et al. Expires 8 April 2021 [Page 1]
Internet-Draft oauth-security-topics October 2020
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
1.1. Structure . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2. Conventions and Terminology . . . . . . . . . . . . . . . 4
2. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 5
2.1. Protecting Redirect-Based Flows . . . . . . . . . . . . . 5
2.1.1. Authorization Code Grant . . . . . . . . . . . . . . 6
2.1.2. Implicit Grant . . . . . . . . . . . . . . . . . . . 6
2.2. Token Replay Prevention . . . . . . . . . . . . . . . . . 7
2.2.1. Access Tokens . . . . . . . . . . . . . . . . . . . . 7
2.2.2. Refresh Tokens . . . . . . . . . . . . . . . . . . . 7
2.3. Access Token Privilege Restriction . . . . . . . . . . . 7
2.4. Resource Owner Password Credentials Grant . . . . . . . . 8
2.5. Client Authentication . . . . . . . . . . . . . . . . . . 8
2.6. Other Recommendations . . . . . . . . . . . . . . . . . . 9
3. The Updated OAuth 2.0 Attacker Model . . . . . . . . . . . . 9
4. Attacks and Mitigations . . . . . . . . . . . . . . . . . . . 11
4.1. Insufficient Redirect URI Validation . . . . . . . . . . 11
4.1.1. Redirect URI Validation Attacks on Authorization Code
Grant . . . . . . . . . . . . . . . . . . . . . . . . 11
4.1.2. Redirect URI Validation Attacks on Implicit Grant . . 13
4.1.3. Countermeasures . . . . . . . . . . . . . . . . . . . 15
4.2. Credential Leakage via Referer Headers . . . . . . . . . 15
4.2.1. Leakage from the OAuth Client . . . . . . . . . . . . 16
4.2.2. Leakage from the Authorization Server . . . . . . . . 16
4.2.3. Consequences . . . . . . . . . . . . . . . . . . . . 16
4.2.4. Countermeasures . . . . . . . . . . . . . . . . . . . 16
4.3. Credential Leakage via Browser History . . . . . . . . . 17
4.3.1. Authorization Code in Browser History . . . . . . . . 17
4.3.2. Access Token in Browser History . . . . . . . . . . . 18
4.4. Mix-Up Attacks . . . . . . . . . . . . . . . . . . . . . 18
4.4.1. Attack Description . . . . . . . . . . . . . . . . . 18
4.4.2. Countermeasures . . . . . . . . . . . . . . . . . . . 20
4.5. Authorization Code Injection . . . . . . . . . . . . . . 21
Show full document text