draft-ietf-oauth-revocation-09.txt   draft-ietf-oauth-revocation-10.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: November 20, 2013 M. Scurtescu Expires: December 18, 2013
M. Scurtescu
Google Google
May 19, 2013 June 16, 2013
OAuth 2.0 Token Revocation OAuth 2.0 Token Revocation
draft-ietf-oauth-revocation-09 draft-ietf-oauth-revocation-10
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.
skipping to change at page 1, line 43 skipping to change at page 1, line 44
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 November 20, 2013. This Internet-Draft will expire on December 18, 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
skipping to change at page 2, line 27 skipping to change at page 2, line 22
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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Token Revocation . . . . . . . . . . . . . . . . . . . . . . 3 2. Token Revocation . . . . . . . . . . . . . . . . . . . . . . 3
2.1. Revocation Request . . . . . . . . . . . . . . . . . . . 3 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 . . . . . . . . . . . . . . . . . . 6
3. Implementation Note . . . . . . . . . . . . . . . . . . . . . 6 3. Implementation Note . . . . . . . . . . . . . . . . . . . . . 6
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
4.1. OAuth Extensions Error Registration . . . . . . . . . . . 7 4.1. OAuth Extensions Error Registration . . . . . . . . . . . 7
4.1.1. The "unsupported_token_type" Error Value . . . . . . 7 4.1.1. The "unsupported_token_type" Error Value . . . . . . 7
4.1.2. OAuth Token Type Hint Registry . . . . . . . . . . . 7 4.1.2. OAuth Token Type Hint Registry . . . . . . . . . . . 7
4.1.2.1. Registration Template . . . . . . . . . . . . . . 8 4.1.2.1. Registration Template . . . . . . . . . . . . . . 8
4.1.2.2. Initial Registry Contents . . . . . . . . . . . . 8 4.1.2.2. Initial Registry Contents . . . . . . . . . . . . 8
5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 9
7.1. Normative References . . . . . . . . . . . . . . . . . . 9 7.1. Normative References . . . . . . . . . . . . . . . . . . 10
7.2. Informative References . . . . . . . . . . . . . . . . . 10 7.2. Informative References . . . . . . . . . . . . . . . . . 10
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10
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 application. This revocation mechanism allows a certain site or application. This revocation mechanism allows a
client to invalidate its tokens if the end-user logs out, changes client to invalidate its tokens if the end-user logs out, changes
identity, or uninstalls the respective application. Notifying the identity, or uninstalls the respective application. Notifying the
authorization server that the token is no longer needed allows the authorization server that the token is no longer needed allows the
authorization server to clean up data associated with that token authorization server to clean up data associated with that token
(e.g. session data) and the underlying authorization grant. This (e.g. session data) and the underlying authorization grant. This
behavior prevents a situation where there is still a valid behavior prevents a situation where there is still a valid
authorization grant for a particular client which the end user is not authorization grant for a particular client which the end user is not
aware of. This way, token revocation prevents abuse of abandoned aware of. This way, token revocation prevents abuse of abandoned
tokens and facilitates a better end-user experience since invalidated tokens and facilitates a better end-user experience since invalidated
authorization grants will no longer turn up in a list of authorization grants will no longer turn up in a list of
authorization grants the authorization server might present to the authorization grants the authorization server might present to the
end-user. end-user.
2. Token Revocation 2. Token Revocation
Implementations MUST support the revocation of refresh tokens and Implementations MUST support the revocation of refresh tokens and
SHOULD support the revocation of access tokens (see Implementation SHOULD support the revocation of access tokens (see Implementation
Note). Note).
The client requests the revocation of a particular token by making an The client requests the revocation of a particular token by making an
HTTP POST request to the token revocation endpoint URL. This URL MAY HTTP POST request to the token revocation endpoint URL. This URL
include a query component. The means to obtain the location of the MUST conform to the rules given in [RFC6749], section 3.1.
revocation endpoint is out of scope of this specification. For
example, the client developer may consult the server's documentation The means to obtain the location of the revocation endpoint is out of
or automatic discovery may be used. As this endpoint is handling scope of this specification. For example, the client developer may
security credentials, the endpoint location needs to be obtained from consult the server's documentation or automatic discovery may be
a trustworthy source. used. As this endpoint is handling security credentials, the
endpoint location needs to be obtained from a trustworthy source.
Since requests to the token revocation endpoint result in the Since requests to the token revocation endpoint result in the
transmission of plain text credentials in the HTTP request, the transmission of plain text credentials in the HTTP request, the
authorization server MUST require the use of a transport-layer authorization server MUST require the use of a transport-layer
security mechanism when sending requests to the token revocation security mechanism when sending requests to the token revocation
endpoints. The authorization server MUST support TLS 1.0 endpoints. The authorization server MUST use Transport Layer
([RFC2246]), SHOULD support TLS 1.2 ([RFC5246]) and its future Security (TLS) in a version compliant with [RFC6749], section 1.6.
replacements, and MAY support additional transport-layer mechanisms Implementations MAY also support additional transport-layer security
meeting its security requirements. mechanisms that meet their security requirements.
2.1. Revocation Request 2.1. Revocation Request
The client constructs the request by including the following The client constructs the request by including the following
parameters using the "application/x-www-form-urlencoded" format in parameters using the "application/x-www-form-urlencoded" format in
the HTTP request entity-body: the HTTP request entity-body:
token REQUIRED. The token that the client wants to get revoked. token REQUIRED. The token that the client wants to get revoked.
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
parameter using the registry defined in Section 4.1.2. using the registry defined in Section 4.1.2.
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: with the following request:
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
token=45ghiukldjahdnhzdauz&token_type_hint=refresh_token token=45ghiukldjahdnhzdauz&token_type_hint=refresh_token
The authorization server first validates the client credentials (in The authorization server first validates the client credentials (in
case of a confidential client) and then verifies whether the token case of a confidential client) and then verifies whether the token
was issued to the client making the revocation request. If this was issued to the client making the revocation request. If this
validation fails, the request is refused and the client is informed validation fails, the request is refused and the client is informed
of the error by the authorization server as described below. of the error by the authorization server as described below.
In the next step, the authorization server invalidates the token. In the next step, the authorization server invalidates the token.
The client MUST assume the revocation is immediate upon the receipt The invalidation takes place immediately, and the token can not be
of an HTTP 200 response from the server. The client MUST NOT use the used again after the revocation. In practice there could be a
token again after the revocation. propagation delay, for example, in which some servers know about the
invalidation while others do not. Implementations should minimize
that window, and clients must not try to use the token after receipt
of an HTTP 200 response from the server.
Depending on the authorization server's revocation policy, the Depending on the authorization server's revocation policy, the
revocation of a particular token may cause the revocation of related revocation of a particular token may cause the revocation of related
tokens and the underlying authorization grant. If the particular tokens and the underlying authorization grant. If the particular
token is a refresh token and the authorization server supports the token is a refresh token and the authorization server supports the
revocation of access tokens, then the authorization server SHOULD revocation of access tokens, then the authorization server SHOULD
also invalidate all access tokens based on the same authorization also invalidate all access tokens based on the same authorization
grant (see Implementation Note). If the token passed to the request grant (see Implementation Note). If the token passed to the request
is an access token, the server MAY decide to revoke the respective is an access token, the server MAY revoke the respective refresh
refresh token as well. token as well.
Note: A client compliant with [RFC6749] MUST be prepared to handle Note: A client compliant with [RFC6749] must be prepared to handle
unexpected token invalidation at any time. Independent of the unexpected token invalidation at any time. Independent of the
revocation mechanism specified in this document, resource owners may revocation mechanism specified in this document, resource owners may
decide to revoke authorization grants or the authorization server may revoke authorization grants or the authorization server may
invalidate tokens in order to mitigate security threats. Thus having invalidate tokens in order to mitigate security threats. Thus having
different server policies with respect to cascading the revocation of different server policies with respect to cascading the revocation of
tokens should not pose interoperability problems. tokens should not pose interoperability problems.
2.2. Revocation Response 2.2. Revocation Response
The authorization server responds with HTTP status code 200 if the The authorization server responds with HTTP status code 200 if the
token has been revoked sucessfully or if the client submitted an token has been revoked sucessfully or if the client submitted an
invalid token. The content of the response body does not matter as invalid token.
all information is conveyed in the response code.
Note: invalid tokens do not cause an error response since the client
cannot handle such an error in a reasonable way. Moreover, the
purpose of the revocation request, invalidating the particular token,
is already achieved.
The content of the response body is ignored by the client as all
necessary information is conveyed in the response code.
An invalid token type hint value is ignored by the authorization An invalid token type hint value is ignored by the authorization
server and does not influence the revocation response. server and does not influence the revocation response.
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 definition 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.
If the server responds with HTTP status code 503, the client must If the server responds with HTTP status code 503, the client must
assume the token still exists and may retry after a reasonable delay. assume the token still exists and may retry after a reasonable delay.
The server may include a "Retry-After" header in the response to The server may include a "Retry-After" header in the response to
indicate how long the service is expected to be unavailable to the indicate how long the service is expected to be unavailable to the
requesting client. requesting client.
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 (Cross-Origin Resource
it is aimed at use in combination with user-agent-based applications. Sharing) if 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 (Remote JSON - JSONP) by allowing GET requests with
parameter: an additional 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
skipping to change at page 7, line 17 skipping to change at page 7, line 25
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. IANA Considerations 4. IANA Considerations
This specification registers an error value in the OAuth Extension
Error registry and establishes the OAuth Token Type registry.
4.1. OAuth Extensions Error Registration 4.1. OAuth Extensions Error Registration
This specification registers the following error values in the OAuth This specification registers the following error values in the OAuth
Extensions Error registry defined in [RFC6749]. Extensions Error registry defined in [RFC6749].
4.1.1. The "unsupported_token_type" Error Value 4.1.1. The "unsupported_token_type" Error Value
Error name unsupported_token_type Error name unsupported_token_type
Error usage location revocation endpoint error response Error usage location revocation endpoint error response
 End of changes. 23 change blocks. 
37 lines changed or deleted 53 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/