draft-ietf-oauth-revocation-00.txt   draft-ietf-oauth-revocation-01.txt 
Web Authentication Protocol 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 27, 2012 Expires: April 9, 2013
M. Scurtescu M. Scurtescu
Google Google
May 26, 2012 October 6, 2012
Token Revocation Token Revocation
draft-ietf-oauth-revocation-00 draft-ietf-oauth-revocation-01
Abstract Abstract
This draft proposes an additional endpoint for OAuth authorization This draft proposes an additional endpoint for OAuth authorization
servers for revoking tokens. servers for revoking tokens.
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
skipping to change at page 1, line 40 skipping to change at page 1, line 40
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 27, 2012. This Internet-Draft will expire on April 9, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2012 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Token Revocation . . . . . . . . . . . . . . . . . . . . . . . 3 2. Token Revocation . . . . . . . . . . . . . . . . . . . . . . . 3
2.1. JSONP Support . . . . . . . . . . . . . . . . . . . . . . . 5 2.1. Cross-Origin Support . . . . . . . . . . . . . . . . . . . 5
3. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 5 3. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 5
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6
5. Security Considerations . . . . . . . . . . . . . . . . . . . . 5 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 6
6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.1. Normative References . . . . . . . . . . . . . . . . . . . 6 6.1. Normative References . . . . . . . . . . . . . . . . . . . 6
6.2. Informative References . . . . . . . . . . . . . . . . . . 6 6.2. Informative References . . . . . . . . . . . . . . . . . . 6
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 6 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 6
1. Introduction 1. Introduction
The OAuth 2.0 core specification [I-D.ietf-oauth-v2] defines several The OAuth 2.0 core specification [I-D.ietf-oauth-v2] defines several
ways for a client to obtain refresh and access tokens. This ways for a client to obtain refresh and access tokens. This
specification supplements the core specification with a mechanism to specification supplements the core specification with a mechanism to
revoke both types of tokens and facilitates the following use cases: revoke both types of tokens. A token is the external representation
of an access grant issued by a resource owner to a particular client.
A revocation request may discard the actual token as well as other
tokens based on the same access grant and the access grant itself.
This mechanism facilitates the following use cases:
o The end-user triggers revocation from within the client that sends o The end-user triggers revocation from within the client that sends
the appropriate revocation request to the autorization server. the appropriate revocation request to the autorization server.
From the end-user's perspective, this looks like a "logout" or The request causes the removal of the client's access grant the
"reset" function. The request causes the removal of the client particular token refers to. From the end-user's perspective, this
permissions associated with the particular token to access the looks like a "logout" or "reset" function. This use case makes it
end-user's protected resources. This use case makes it even more even more comfortable to the end-user to revoke his access grant
comfortable to the end-user to revoke his access grant immediately immediately via the client.
via the client.
o In contrast to revocation by a client, the authorization server o In contrast to revocation by a client, the authorization server
(or a related entity) may offer its end-users a self-care portal (or a related entity) may offer its end-users a self-care portal
to delete access grants given to clients independent of any token to delete access grants given to clients independent of any token
storing devices. Such a portal offers the possibility to an end- storing devices. Such a portal offers the possibility to an end-
user to look at and revoke all access grants he once authorized. user to look at and revoke all access grants he once authorized.
In cases the token storing device is not available, e.g. it is In cases the token storing device is not available, e.g. it is
lost or stolen, revocation by a self-care portal is the only lost or stolen, revocation by a self-care portal is the only
possibility to limit or avoid abuse. possibility to limit or avoid abuse.
skipping to change at page 3, line 43 skipping to change at page 3, line 47
By using an additional endpoint, the token revocation endpoint, By using an additional endpoint, the token revocation endpoint,
clients can request the revocation of a particular token. Compliant clients can request the revocation of a particular token. Compliant
implementation MUST support the revocation of refresh tokens, access implementation MUST support the revocation of refresh tokens, access
token revocation MAY be supported. token revocation MAY be supported.
2. Token Revocation 2. Token Revocation
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. The location of HTTP POST request to the token revocation endpoint. The location of
the token revocation endpoint can be found in the authorization the token revocation endpoint can be found in the authorization
servers documentation. The token endpoint URI MAY include a query server's documentation. The token endpoint URI MAY include a query
component. component.
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 29 skipping to change at page 4, line 33
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
token=45ghiukldjahdnhzdauz& token=45ghiukldjahdnhzdauz&
The authorization server first validates the client credentials (if The authorization server first validates the client credentials (in
present) and verifies whether the client is authorized to revoke the case of a confidential client) and verifies whether the client is
particular token based on the client identity and its policy. For authorized to revoke the particular token based on the client
example, only the client the token has been issued for might be identity and its policy. For example, only the client the token has
allowed to revoke it. It is also conceivable to allow a dedicated been issued for might be allowed to revoke it. It is also
user self-care portal to revoke all kinds of tokens. conceivable to allow a dedicated user self-care portal to revoke all
kinds of tokens.
In the next step, the authorization server invalidates the token and
the respective access grant. If the particular token is a refresh
token and the authorization server supports the revocation of access
tokens, then the authorization server SHOULD also invalidate all
access tokens based on the same access grant.
In the next step, the authorization server invalidates the token.
Whether the revocation takes effect instantly or with some delay Whether the revocation takes effect instantly or with some delay
depends on the architecture of the particular deployment. The client depends on the architecture of the particular deployment. The client
MUST NOT make any assumptions about the timing and MUST NOT use the MUST NOT make any assumptions about the timing and MUST NOT use the
token again. token again.
If the processed token is a refresh token and the authorization
server supports the revocation of access tokens, then the
authorization server SHOULD also invalidate all access tokens issued
for that refresh token.
The authorization server indicates a successful processing of the The authorization server indicates a successful processing of the
request by a HTTP status code 200. Status code 401 indicates a request by a HTTP status code 200. Status code 401 indicates a
failed client authentication, whereas a status code 403 is used if failed client authentication, whereas a status code 403 is used if
the client is not authorized to revoke the particular token. For all the client is not authorized to revoke the particular token. For all
other error conditions, a status code 400 is used along with an error other error conditions, a status code 400 is used along with an error
response as defined in section 5.2. of [I-D.ietf-oauth-v2]. The response as defined in section 5.2. of [I-D.ietf-oauth-v2]. The
following error codes are defined for the token revocation endpoint: following error codes are defined for the 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.
invalid_token The presented token is invalid. invalid_token The presented token is invalid.
2.1. JSONP Support 2.1. Cross-Origin Support
The revocation endpoint MAY support JSONP [jsonp] by allowing GET The revokation end-point SHOULD support CORS [W3C.WD-cors-20120403]
requests with an additional parameter: if it is aimed at use in combination with user-agent-based
applications. In addition, for interoperability with legacy user-
agents, it MAY offer JSONP [jsonp] by allowing GET requests with an
additional parameter:
callback The qualified name of a JavaScript function. callback The qualified name of a JavaScript function.
Example request: Example request:
https://example.com/revoke?token=45ghiukldjahdnhzdauz& https://example.com/revoke?token=45ghiukldjahdnhzdauz&
callback=package.myCallback callback=package.myCallback
Successful response: Successful response:
package.myCallback(); package.myCallback();
Error response: Error response:
package.myCallback({"error":"invalid_token"}); package.myCallback({"error":"invalid_token"});
Clients should be aware that when relying on JSONP, a malicious
revokation end-point may attempt to inject malicious code into the
client.
3. Acknowledgements 3. Acknowledgements
We would like to thank Sebastian Ebling, Christian Stuebner, Brian We would like to thank Michiel de Jong, Doug Foiles, Paul Madsen,
George Fletcher, Sebastian Ebling, Christian Stuebner, Brian
Campbell, Igor Faynberg, Lukas Rosenstock, and Justin P. Richer for Campbell, Igor Faynberg, Lukas Rosenstock, and Justin P. Richer for
their valuable feedback. their valuable feedback.
4. IANA Considerations 4. IANA Considerations
This draft includes no request to IANA. This draft includes no request to IANA.
5. Security Considerations 5. Security Considerations
All relevant security considerations have been given in the All relevant security considerations have been given in the
functional specification. functional specification.
6. References 6. References
6.1. Normative References 6.1. Normative References
[I-D.ietf-oauth-v2] [I-D.ietf-oauth-v2]
Hammer-Lahav, E., Recordon, D., and D. Hardt, "The OAuth Hardt, D., "The OAuth 2.0 Authorization Framework",
2.0 Authorization Framework", draft-ietf-oauth-v2-26 (work draft-ietf-oauth-v2-31 (work in progress), August 2012.
in progress), May 2012.
[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.
6.2. Informative References 6.2. Informative References
[W3C.WD-cors-20120403]
Kesteren, A., "Cross-Origin Resource Sharing", World Wide
Web Consortium LastCall WD-cors-20120403, April 2012,
<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.
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
Email: sdronia@gmx.de Email: sdronia@gmx.de
Marius Scurtescu Marius Scurtescu
Google Google
Email: mscurtescu@google.com Email: mscurtescu@google.com
 End of changes. 20 change blocks. 
36 lines changed or deleted 52 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/