draft-ietf-oauth-revocation-06.txt   draft-ietf-oauth-revocation-07.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: October 09, 2013 M. Scurtescu Expires: October 17, 2013 M. Scurtescu
Google Google
April 07, 2013 April 15, 2013
Token Revocation Token Revocation
draft-ietf-oauth-revocation-06 draft-ietf-oauth-revocation-07
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 43
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 October 09, 2013. This Internet-Draft will expire on October 17, 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 29 skipping to change at page 2, line 29
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 . . . . . . . . . . . . . . . . . . 5
3. Implementation Note . . . . . . . . . . . . . . . . . . . . . 6 3. Implementation Note . . . . . . . . . . . . . . . . . . . . . 6
4. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 4. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
5.1. OAuth Extensions Error Registration . . . . . . . . . . . 7 5.1. OAuth Extensions Error Registration . . . . . . . . . . . 7
5.1.1. The "unsupported_token_type" Error Value . . . . . . 7 5.1.1. The "unsupported_token_type" Error Value . . . . . . 7
6. Security Considerations . . . . . . . . . . . . . . . . . . . 7 5.1.2. OAuth Token Type Hint Registry . . . . . . . . . . . 7
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 5.1.2.1. Registration Template . . . . . . . . . . . . . . 8
7.1. Normative References . . . . . . . . . . . . . . . . . . 8 5.1.2.2. Initial Registry Contents . . . . . . . . . . . . 8
7.2. Informative References . . . . . . . . . . . . . . . . . 8 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 9
7.1. Normative References . . . . . . . . . . . . . . . . . . 9
7.2. Informative References . . . . . . . . . . . . . . . . . 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 app. This revocation mechanism allows a client to certain site or application. This revocation mechanism allows a
invalidate its tokens if the end-user logs out, changes identity, or client to invalidate its tokens if the end-user logs out, changes
uninstalls the respective app. Notifying the authorization server identity, or uninstalls the respective application. Notifying the
that the token is no longer needed allows the authorization server to authorization server that the token is no longer needed allows the
clean up data associated with that token (e.g. session data) and the authorization server to clean up data associated with that token
underlying authorization grant. This behavior prevents a situation (e.g. session data) and the underlying authorization grant. This
where there is still a valid authorization grant for a particular behavior prevents a situation where there is still a valid
client which the end user is not aware of. This way, token authorization grant for a particular client which the end user is not
revocation prevents abuse of abandoned tokens and facilitates a aware of. This way, token revocation prevents abuse of abandoned
better end-user experience since invalidated authorization grants tokens and facilitates a better end-user experience since invalidated
will no longer turn up in a list of authorization grants the authorization grants will no longer turn up in a list of
authorization server might present to the end-user. authorization grants the authorization server might present to the
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. The token HTTP POST request to the token revocation endpoint URL. This URL MAY
endpoint URL MAY include a query component. The means to obtain the include a query component.
location of the revocation endpoint is out of scope of this
specification. For example, the client developler may consult the The means to obtain the location of the revocation endpoint is out of
server's documentation or automatic discovery may be used. As this scope of this specification. For example, the client developer may
endpoint is handling security credentials, the endpoint location MUST consult the server's documentation or automatic discovery may be
be obtained from a trustworthy source. used. As this endpoint is handling security credentials, the
endpoint location need 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 support TLS 1.0
([RFC2246]), SHOULD support TLS 1.2 ([RFC5246]) and its future ([RFC2246]), SHOULD support TLS 1.2 ([RFC5246]) and its future
replacements, and MAY support additional transport-layer mechanisms replacements, and MAY support additional transport-layer mechanisms
meeting its security requirements. meeting its security requirements.
skipping to change at page 4, line 16 skipping to change at page 4, line 22
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
using the registry defined in Section 5.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 (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
skipping to change at page 4, line 39 skipping to change at page 4, line 46
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 return of The client MUST assume the revocation is immediate upon receipt of an
the request. The client MUST NOT use the token again after the HTTP 200 response from the server. The client MUST NOT use the token
revocation. again after the revocation.
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 decide to revoke the respective
refresh token as well. refresh 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 decide to 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 indicates a successful processing of the The authorization server responds with HTTP status code 200 if the
request by a HTTP status code 200. This also applies if the client token has been revoked sucessfully or if the client submited an
submits an invalid token to the revocation endpoint. invalid token. The content of the response body does not matter as
all information is conveyed in the response code.
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.
If the server responds with HTTP status code 503, the client must
assume the token still exists and may retry after a reasonable delay.
The server may include a "Retry-After" header in the response to
indicate how long the service is expected to be unavailable to the
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 [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.
skipping to change at page 7, line 29 skipping to change at page 7, line 42
Error name unsupported_token_type Error name unsupported_token_type
Error usage location revocation endpoint error response Error usage location revocation endpoint error response
Related protocol extension Token Revocation Endpoint Related protocol extension Token Revocation Endpoint
Change controller IETF Change controller IETF
Specification document(s) [this document] Specification document(s) [this document]
5.1.2. OAuth Token Type Hint Registry
This specification establishes the OAuth Token Type Hint registry.
Possible values of the parameter "token_type_hint" (see Section 2.1)
are registered with a Specification Required ([RFC5226]) after a two-
week review period on the TBD@ietf.org mailing list, on the advice of
one or more Designated Experts. However, to allow for the allocation
of values prior to publication, the Designated Expert(s) may approve
registration once they are satisfied that such a specification will
be published. Registration requests must be sent to the TBD@ietf.org
mailing list for review and comment, with an appropriate subject
(e.g., "Request for parameter: example"). Within the review period,
the Designated Expert(s) will either approve or deny the registration
request, communicating this decision to the review list and IANA.
Denials should include an explanation and, if applicable, suggestions
as to how to make the request successful. IANA must only accept
registry updates from the Designated Expert(s) and should direct all
requests for registration to the review mailing list.
5.1.2.1. Registration Template
Hint Value: The additional value, which can be used to indicate a
certain token type to the authorization server.
Change controller: For Standards Track RFCs, state "IETF". For
others, give the name of the responsible party. Other details
(e.g., postal address, email address, home page URI) may also be
included.
Specification document(s): Reference to the document(s) that specify
the type, preferably including a URI that can be used to retrieve
a copy of the document(s). An indication of the relevant sections
may also be included but is not required.
5.1.2.2. Initial Registry Contents
The OAuth Token Type Hint registry's initial contents are:
o Hint Value: access_token
o Change controller: IETF
o Specification document(s): [this document]
o Response type name: refresh_token
o Change controller: IETF
o 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
skipping to change at page 8, line 18 skipping to change at page 9, line 34
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
tokens, they could do much worse damage by using the token elsewhere tokens, they could do much worse damage by using the token elsewhere
than by revoking it. If they chose to revoke the token, the than by revoking it. If they chose to revoke the token, the
legitimate client will lose its authorization grant and will need to legitimate client will lose its authorization grant and will need to
prompt the user again. No further damage is done and the guessed prompt the user again. No further damage is done and the guessed
token is now worthless. token is now worthless.
Since the revocation endpoint is handling security credentials, Since the revocation endpoint is handling security credentials,
clients shall obtain its location from a trustworthy source only. clients need to obtain its location from a trustworthy source only.
Otherwise, an attacker could capture valid security tokens by Otherwise, an attacker could capture valid security tokens by
utilizing a counterfeit revocation endpoint. utilizing a counterfeit revocation endpoint.
7. References 7. References
7.1. Normative References 7.1. Normative References
[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.
 End of changes. 15 change blocks. 
38 lines changed or deleted 101 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/