draft-ietf-oauth-revocation-05.txt   draft-ietf-oauth-revocation-06.txt 
OAuth Working Group T. Lodderstedt, Ed. OAuth Working Group T. Lodderstedt, Ed.
Internet-Draft Deutsche Telekom AG Internet-Draft Deutsche Telekom AG
Intended status: Standards Track S. Dronia Intended status: Standards Track S. Dronia
Expires: August 16, 2013 Expires: October 09, 2013 M. Scurtescu
M. Scurtescu
Google Google
February 12, 2013 April 07, 2013
Token Revocation Token Revocation
draft-ietf-oauth-revocation-05 draft-ietf-oauth-revocation-06
Abstract Abstract
This document proposes an additional endpoint for OAuth authorization This document proposes an additional endpoint for OAuth authorization
servers, which allows clients to notify the authorization server that servers, which allows clients to notify the authorization server that
a previously obtained refresh or access token is no longer needed. a previously obtained refresh or access token is no longer needed.
This allows the authorization server to cleanup security credentials. This allows the authorization server to cleanup security credentials.
A revocation request will invalidate the actual token and, if A revocation request will invalidate the actual token and, if
applicable, other tokens based on the same authorization grant. applicable, other tokens based on the same authorization grant.
Requirements Language Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
Status of this Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on August 16, 2013. This Internet-Draft will expire on October 09, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Token Revocation . . . . . . . . . . . . . . . . . . . . . . . 3 2. Token Revocation . . . . . . . . . . . . . . . . . . . . . . 3
2.1. Revocation Request . . . . . . . . . . . . . . . . . . . . 4 2.1. Revocation Request . . . . . . . . . . . . . . . . . . . 3
2.2. Revocation Response . . . . . . . . . . . . . . . . . . . . 5 2.2. Revocation Response . . . . . . . . . . . . . . . . . . . 5
2.2.1. Error Response . . . . . . . . . . . . . . . . . . . . 5 2.2.1. Error Response . . . . . . . . . . . . . . . . . . . 5
2.3. Cross-Origin Support . . . . . . . . . . . . . . . . . . . 5 2.3. Cross-Origin Support . . . . . . . . . . . . . . . . . . 5
3. Implementation Note . . . . . . . . . . . . . . . . . . . . . . 6 3. Implementation Note . . . . . . . . . . . . . . . . . . . . . 6
4. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 7 4. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 7 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
6. Security Considerations . . . . . . . . . . . . . . . . . . . . 7 5.1. OAuth Extensions Error Registration . . . . . . . . . . . 7
7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 8 5.1.1. The "unsupported_token_type" Error Value . . . . . . 7
7.1. Normative References . . . . . . . . . . . . . . . . . . . 8 6. Security Considerations . . . . . . . . . . . . . . . . . . . 7
7.2. Informative References . . . . . . . . . . . . . . . . . . 8 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 9 7.1. Normative References . . . . . . . . . . . . . . . . . . 8
7.2. Informative References . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9
1. Introduction 1. Introduction
The OAuth 2.0 core specification [RFC6749] defines several ways for a The OAuth 2.0 core specification [RFC6749] defines several ways for a
client to obtain refresh and access tokens. This specification client to obtain refresh and access tokens. This specification
supplements the core specification with a mechanism to revoke both supplements the core specification with a mechanism to revoke both
types of tokens. A token is a string representing an authorization types of tokens. A token is a string representing an authorization
grant issued by the resource owner to the client. A revocation grant issued by the resource owner to the client. A revocation
request will invalidate the actual token and, if applicable, other request will invalidate the actual token and, if applicable, other
tokens based on the same authorization grant and the authorization tokens based on the same authorization grant and the authorization
grant itself. grant itself.
From an end-user's perspective, OAuth is often used to log into a From an end-user's perspective, OAuth is often used to log into a
certain site or app. This revocation mechanism allows a client to certain site or app. This revocation mechanism allows a client to
invalidate its tokens if the end-user logs out, changes identity, or invalidate its tokens if the end-user logs out, changes identity, or
uninstalls the respective app. Notifying the authorization server uninstalls the respective app. Notifying the authorization server
that the token is no longer needed allows the authorization server to that the token is no longer needed allows the authorization server to
clean up data associated with that token (e.g. session data) and the clean up data associated with that token (e.g. session data) and the
underlying authorization grant. This behavior prevents a situation underlying authorization grant. This behavior prevents a situation
where there is still a valid authorization grant for a particular where there is still a valid authorization grant for a particular
client which the end user is not aware of. This way, token client which the end user is not aware of. This way, token
revocation prevents abuse of abandoned tokens and facilitates a revocation prevents abuse of abandoned tokens and facilitates a
better end-user experience since invalidated authorization grants better end-user experience since invalidated authorization grants
will no longer turn up in a list of authorization grants the will no longer turn up in a list of authorization grants the
authorization server might present to the end-user. authorization server might present to the end-user.
2. Token Revocation 2. Token Revocation
skipping to change at page 4, line 24 skipping to change at page 4, line 9
token_type_hint OPTIONAL. A hint about the type of the token token_type_hint OPTIONAL. A hint about the type of the token
submitted for revocation. Clients MAY pass this parameter in submitted for revocation. Clients MAY pass this parameter in
order to help the authorization server to optimize the token order to help the authorization server to optimize the token
lookup. If the server is unable to locate the token using lookup. If the server is unable to locate the token using
the given hint, it MUST extend its search accross all of its the given hint, it MUST extend its search accross all of its
supported token types. An authorization server MAY ignore supported token types. An authorization server MAY ignore
this parameter, particularly if it is able to detect the this parameter, particularly if it is able to detect the
token type automatically. This specification defines two token type automatically. This specification defines two
such values: such values:
* access_token An Access Token as defined in [RFC6749] * access_token An Access Token as defined in [RFC6749]
section 1.4 section 1.4
* refresh_token A Refresh Token as defined in [RFC6749] * refresh_token A Refresh Token as defined in [RFC6749]
section 1.5 section 1.5
Specific implementations, profiles, and extensions of this Specific implementations, profiles, and extensions of this
specification MAY define other values for this parameter. specification MAY define other values for this parameter.
The client also includes its authentication credentials as described The client also includes its authentication credentials as described
in Section 2.3. of [RFC6749]. in Section 2.3. of [RFC6749].
For example, a client may request the revocation of a refresh token For example, a client may request the revocation of a refresh token
with the following request (line breaks are for display purposes with the following request (line breaks are for display purposes
only): only):
POST /revoke HTTP/1.1 POST /revoke HTTP/1.1
Host: server.example.com Host: server.example.com
Content-Type: application/x-www-form-urlencoded Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
skipping to change at page 5, line 43 skipping to change at page 5, line 29
request by a HTTP status code 200. This also applies if the client request by a HTTP status code 200. This also applies if the client
submits an invalid token to the revocation endpoint. submits an invalid token to the revocation endpoint.
2.2.1. Error Response 2.2.1. Error Response
The error presentation conforms to the defintion in section 5.2 of The error presentation conforms to the defintion in section 5.2 of
[RFC6749]. The following additional error code is defined for the [RFC6749]. The following additional error code is defined for the
token revocation endpoint: token revocation endpoint:
unsupported_token_type The authorization server does not support the unsupported_token_type The authorization server does not support the
revocation of the presented token type. I.e. the client revocation of the presented token type. I.e. the client
tried to revoke an access token on a server not supporting tried to revoke an access token on a server not supporting
this feature. this feature.
2.3. Cross-Origin Support 2.3. Cross-Origin Support
The revocation end-point MAY support CORS [W3C.WD-cors-20120403] if The revocation end-point MAY support CORS [W3C.WD-cors-20120403] if
it is aimed at use in combination with user-agent-based applications. it is aimed at use in combination with user-agent-based applications.
In addition, for interoperability with legacy user-agents, it MAY In addition, for interoperability with legacy user-agents, it MAY
also offer JSONP [jsonp] by allowing GET requests with an additional also offer JSONP [jsonp] by allowing GET requests with an additional
parameter: parameter:
callback OPTIONAL. The qualified name of a JavaScript function. callback OPTIONAL. The qualified name of a JavaScript function.
For example, a client may request the revocation of an access token For example, a client may request the revocation of an access token
with the following request (line breaks are for display purposes with the following request (line breaks are for display purposes
only): only):
https://example.com/revoke?token=agabcdefddddafdd& https://example.com/revoke?token=agabcdefddddafdd&
callback=package.myCallback callback=package.myCallback
Successful response: Successful response:
package.myCallback(); package.myCallback();
Error response: Error response:
package.myCallback({"error":"unsupported_token_type"}); package.myCallback({"error":"unsupported_token_type"});
Clients should be aware that when relying on JSONP, a malicious Clients should be aware that when relying on JSONP, a malicious
revocation end-point may attempt to inject malicious code into the revocation end-point may attempt to inject malicious code into the
client. client.
3. Implementation Note 3. Implementation Note
OAuth 2.0 allows deployment flexibility with respect to the style of OAuth 2.0 allows deployment flexibility with respect to the style of
access tokens. The access tokens may be self-contained so that an access tokens. The access tokens may be self-contained so that an
resource server needs no further interaction with an authorization resource server needs no further interaction with an authorization
skipping to change at page 7, line 14 skipping to change at page 7, line 4
allows the authorization server to impose a limit on the time revoked allows the authorization server to impose a limit on the time revoked
access tokens are in use. access tokens are in use.
Which approach of token revocation is chosen will depend on the Which approach of token revocation is chosen will depend on the
overall system design and on the application service provider's risk overall system design and on the application service provider's risk
analysis. The cost of revocation in terms of required state and analysis. The cost of revocation in terms of required state and
communication overhead is ultimately the result of the desired communication overhead is ultimately the result of the desired
security properties. security properties.
4. Acknowledgements 4. Acknowledgements
We would like to thank Peter, Mauritius, Amanda Anganes, Mark Wubben, We would like to thank Peter, Mauritius, Amanda Anganes, Mark Wubben,
Hannes Tschofenig, Michiel de Jong, Doug Foiles, Paul Madsen, George Hannes Tschofenig, Michiel de Jong, Doug Foiles, Paul Madsen, George
Fletcher, Sebastian Ebling, Christian Stuebner, Brian Campbell, Igor Fletcher, Sebastian Ebling, Christian Stuebner, Brian Campbell, Igor
Faynberg, Lukas Rosenstock, and Justin Richer for their valuable Faynberg, Lukas Rosenstock, and Justin Richer for their valuable
feedback. feedback.
5. IANA Considerations 5. IANA Considerations
This draft includes no request to IANA. 5.1. OAuth Extensions Error Registration
This specification registers the following error values in the OAuth
Extensions Error registry defined in [RFC6749].
5.1.1. The "unsupported_token_type" Error Value
Error name unsupported_token_type
Error usage location revocation endpoint error response
Related protocol extension Token Revocation Endpoint
Change controller IETF
Specification document(s) [this document]
6. Security Considerations 6. Security Considerations
If the authorization server does not support access token revocation, If the authorization server does not support access token revocation,
access tokens will not be immediately invalidated when the access tokens will not be immediately invalidated when the
corresponding refresh token is revoked. Deployments MUST take this corresponding refresh token is revoked. Deployments must take this
into account when conducting their security risk analysis. into account when conducting their security risk analysis.
Cleaning up tokens using revocation contributes to overall security Cleaning up tokens using revocation contributes to overall security
and privacy since it reduces the likelihood for abuse of abandoned and privacy since it reduces the likelihood for abuse of abandoned
tokens. This specification in general does not intend to provide tokens. This specification in general does not intend to provide
countermeasures against token theft and abuse. For a discussion of countermeasures against token theft and abuse. For a discussion of
respective threats and countermeasures, consult the security respective threats and countermeasures, consult the security
considerations given in section 10 of the OAuth core specification considerations given in section 10 of the OAuth core specification
[RFC6749] and the OAuth threat model document [RFC6749] and the OAuth threat model document [RFC6819].
[I-D.ietf-oauth-v2-threatmodel].
Malicious clients could attempt to use the new endpoint to launch Malicious clients could attempt to use the new endpoint to launch
denial of service attacks on the authorization server. Appropriate denial of service attacks on the authorization server. Appropriate
countermeasures, which should be in place for the token endpoint as countermeasures, which should be in place for the token endpoint as
well, MUST be applied to the revocation endpoint (see well, MUST be applied to the revocation endpoint (see [RFC6819],
[I-D.ietf-oauth-v2-threatmodel], section 4.4.1.11). section 4.4.1.11).
A malicious client may attempt to guess valid tokens on this endpoint A malicious client may attempt to guess valid tokens on this endpoint
by making revocation requests against potential token strings. by making revocation requests against potential token strings.
According to this specification, a client's request must contain a According to this specification, a client's request must contain a
valid client_id, in the case of a public client, or valid client valid client_id, in the case of a public client, or valid client
credentials, in the case of a confidential client. The token being credentials, in the case of a confidential client. The token being
revoked must also belong to the requesting client. If an attacker is revoked must also belong to the requesting client. If an attacker is
able to successfully guess a public client's client_id and one of able to successfully guess a public client's client_id and one of
their tokens, or a private client's credentials and one of their their tokens, or a private client's credentials and one of their
skipping to change at page 8, line 35 skipping to change at page 8, line 35
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
RFC 2246, January 1999. RFC 2246, January 1999.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 2008. (TLS) Protocol Version 1.2", RFC 5246, August 2008.
[RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", RFC
RFC 6749, October 2012. 6749, October 2012.
7.2. Informative References 7.2. Informative References
[I-D.ietf-oauth-v2-threatmodel] [RFC6819] Lodderstedt, T., McGloin, M., and P. Hunt, "OAuth 2.0
Lodderstedt, T., McGloin, M., and P. Hunt, "OAuth 2.0 Threat Model and Security Considerations", RFC 6819,
Threat Model and Security Considerations", January 2013.
draft-ietf-oauth-v2-threatmodel-08 (work in progress),
October 2012.
[W3C.WD-cors-20120403] [W3C.WD-cors-20120403]
Kesteren, A., "Cross-Origin Resource Sharing", World Wide Kesteren, A., "Cross-Origin Resource Sharing", World Wide
Web Consortium LastCall WD-cors-20120403, April 2012, Web Consortium LastCall WD-cors-20120403, April 2012,
<http://www.w3.org/TR/2012/WD-cors-20120403>. <http://www.w3.org/TR/2012/WD-cors-20120403>.
[jsonp] Ippolito, B., "Remote JSON - JSONP", December 2005. [jsonp] Ippolito, B., "Remote JSON - JSONP", December 2005, <http:
//bob.pythonmac.org/archives/2005/12/05/remote-json-
jsonp>.
[portable-contacts]
Smarr, J., "Portable Contacts 1.0 Draft C", August 2008,
<http://portablecontacts.net/>.
Authors' Addresses Authors' Addresses
Torsten Lodderstedt (editor) Torsten Lodderstedt (editor)
Deutsche Telekom AG Deutsche Telekom AG
Email: torsten@lodderstedt.net Email: torsten@lodderstedt.net
Stefanie Dronia Stefanie Dronia
 End of changes. 22 change blocks. 
47 lines changed or deleted 64 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/