forked from tlodderstedt/oauth2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
draft-lodderstedt-oauth-revocation.html
433 lines (405 loc) · 22.3 KB
/
draft-lodderstedt-oauth-revocation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en"><head><title>Token Revocation</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="description" content="Token Revocation">
<meta name="keywords" content="token revocation, oauth2">
<meta name="generator" content="xml2rfc v1.36 (http://xml.resource.org/)">
<style type="text/css"><!--
body {
font-family: verdana, charcoal, helvetica, arial, sans-serif;
font-size: small; color: #000; background-color: #FFF;
margin: 2em;
}
h1, h2, h3, h4, h5, h6 {
font-family: helvetica, monaco, "MS Sans Serif", arial, sans-serif;
font-weight: bold; font-style: normal;
}
h1 { color: #900; background-color: transparent; text-align: right; }
h3 { color: #333; background-color: transparent; }
td.RFCbug {
font-size: x-small; text-decoration: none;
width: 30px; height: 30px; padding-top: 2px;
text-align: justify; vertical-align: middle;
background-color: #000;
}
td.RFCbug span.RFC {
font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
font-weight: bold; color: #666;
}
td.RFCbug span.hotText {
font-family: charcoal, monaco, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
font-weight: normal; text-align: center; color: #FFF;
}
table.TOCbug { width: 30px; height: 15px; }
td.TOCbug {
text-align: center; width: 30px; height: 15px;
color: #FFF; background-color: #900;
}
td.TOCbug a {
font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, sans-serif;
font-weight: bold; font-size: x-small; text-decoration: none;
color: #FFF; background-color: transparent;
}
td.header {
font-family: arial, helvetica, sans-serif; font-size: x-small;
vertical-align: top; width: 33%;
color: #FFF; background-color: #666;
}
td.author { font-weight: bold; font-size: x-small; margin-left: 4em; }
td.author-text { font-size: x-small; }
/* info code from SantaKlauss at http://www.madaboutstyle.com/tooltip2.html */
a.info {
/* This is the key. */
position: relative;
z-index: 24;
text-decoration: none;
}
a.info:hover {
z-index: 25;
color: #FFF; background-color: #900;
}
a.info span { display: none; }
a.info:hover span.info {
/* The span will display just on :hover state. */
display: block;
position: absolute;
font-size: smaller;
top: 2em; left: -5em; width: 15em;
padding: 2px; border: 1px solid #333;
color: #900; background-color: #EEE;
text-align: left;
}
a { font-weight: bold; }
a:link { color: #900; background-color: transparent; }
a:visited { color: #633; background-color: transparent; }
a:active { color: #633; background-color: transparent; }
p { margin-left: 2em; margin-right: 2em; }
p.copyright { font-size: x-small; }
p.toc { font-size: small; font-weight: bold; margin-left: 3em; }
table.toc { margin: 0 0 0 3em; padding: 0; border: 0; vertical-align: text-top; }
td.toc { font-size: small; font-weight: bold; vertical-align: text-top; }
ol.text { margin-left: 2em; margin-right: 2em; }
ul.text { margin-left: 2em; margin-right: 2em; }
li { margin-left: 3em; }
/* RFC-2629 <spanx>s and <artwork>s. */
em { font-style: italic; }
strong { font-weight: bold; }
dfn { font-weight: bold; font-style: normal; }
cite { font-weight: normal; font-style: normal; }
tt { color: #036; }
tt, pre, pre dfn, pre em, pre cite, pre span {
font-family: "Courier New", Courier, monospace; font-size: small;
}
pre {
text-align: left; padding: 4px;
color: #000; background-color: #CCC;
}
pre dfn { color: #900; }
pre em { color: #66F; background-color: #FFC; font-weight: normal; }
pre .key { color: #33C; font-weight: bold; }
pre .id { color: #900; }
pre .str { color: #000; background-color: #CFF; }
pre .val { color: #066; }
pre .rep { color: #909; }
pre .oth { color: #000; background-color: #FCF; }
pre .err { background-color: #FCC; }
/* RFC-2629 <texttable>s. */
table.all, table.full, table.headers, table.none {
font-size: small; text-align: center; border-width: 2px;
vertical-align: top; border-collapse: collapse;
}
table.all, table.full { border-style: solid; border-color: black; }
table.headers, table.none { border-style: none; }
th {
font-weight: bold; border-color: black;
border-width: 2px 2px 3px 2px;
}
table.all th, table.full th { border-style: solid; }
table.headers th { border-style: none none solid none; }
table.none th { border-style: none; }
table.all td {
border-style: solid; border-color: #333;
border-width: 1px 2px;
}
table.full td, table.headers td, table.none td { border-style: none; }
hr { height: 1px; }
hr.insert {
width: 80%; border-style: none; border-width: 0;
color: #CCC; background-color: #CCC;
}
--></style>
</head>
<body>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<table summary="layout" border="0" cellpadding="0" cellspacing="0" width="66%"><tbody><tr><td><table summary="layout" border="0" cellpadding="2" cellspacing="1" width="100%">
<tbody><tr><td class="header">Open Authentication Protocol</td><td class="header">T. Lodderstedt, Ed.</td></tr>
<tr><td class="header">Internet-Draft</td><td class="header">Deutsche Telekom AG</td></tr>
<tr><td class="header">Intended status: Standards Track</td><td class="header">S. Dronia</td></tr>
<tr><td class="header">Expires: March 19, 2012</td><td class="header">SYRACOM Consulting AG</td></tr>
<tr><td class="header"> </td><td class="header">M. Scurtescu </td></tr>
<tr><td class="header"> </td><td class="header">Google</td></tr>
<tr><td class="header"> </td><td class="header">September 16, 2011</td></tr>
</tbody></table></td></tr></tbody></table>
<h1><br>Token Revocation<br>draft-lodderstedt-oauth-revocation-03</h1>
<h3>Abstract</h3>
<p>This draft proposes an additional endpoint for OAuth authorization
servers for revoking tokens.
</p>
<h3>Status of this Memo</h3>
<p>
This Internet-Draft is submitted in full
conformance with the provisions of BCP 78 and BCP 79.</p>
<p>
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 http://datatracker.ietf.org/drafts/current/.</p>
<p>
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.”</p>
<p>
This Internet-Draft will expire on March 19, 2012.</p>
<h3>Copyright Notice</h3>
<p>
Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved.</p>
<p>
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://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 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.</p>
<a name="toc"></a><br><hr>
<h3>Table of Contents</h3>
<p class="toc">
<a href="#Introduction">1.</a>
Introduction<br>
<a href="#Revocation">2.</a>
Token Revocation<br>
<a href="#JSONP">2.1.</a>
JSONP Support<br>
<a href="#Acknowledgements">3.</a>
Acknowledgements<br>
<a href="#IANA">4.</a>
IANA Considerations<br>
<a href="#Security">5.</a>
Security Considerations<br>
<a href="#rfc.references1">6.</a>
References<br>
<a href="#rfc.references1">6.1.</a>
Normative References<br>
<a href="#rfc.references2">6.2.</a>
Informative References<br>
<a href="#rfc.authors">§</a>
Authors' Addresses<br>
</p>
<br clear="all">
<a name="Introduction"></a><br><hr>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<a name="rfc.section.1"></a><h3>1.
Introduction</h3>
<p>The current OAuth 2.0 draft <a class="info" href="#I-D.ietf-oauth-v2">[I‑D.ietf‑oauth‑v2]<span> (</span><span class="info">Hammer-Lahav, E., Recordon, D., and D. Hardt, “The OAuth 2.0 Authorization Protocol,” September 2011.</span><span>)</span></a>
defines several ways for a client to obtain refresh and access tokens.
This specification supplements the draft with a mechanism to revoke both
types of tokens and facilitates the following use cases:</p>
<ul class="text">
<li>The end-user triggers revocation from within the client that
sends the appropriate revocation request to the autorization server.
From the end-user's perspective, this looks like a
“logout” or “reset” function. The request
causes the removal of the client permissions associated with the
particular token to access the end-user’s protected resources.
This use case makes it even more comfortable to the end-user to
revoke his access grant immediately via the client.
</li>
<li>In contrast to revocation by a client, the authorization server
(or a related entity) may offer its end-users a self-care portal to
delete access grants given to clients independent of any token
storing devices. Such a portal offers the possibility to an end-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 lost or
stolen, revocation by a self-care portal is the only possibility to
limit or avoid abuse.
</li>
</ul><p> In the end, security, usability, and ease of use are increased
by token revocation.
</p>
<p>By using an additional endpoint, the token revocation endpoint,
clients can request the revocation of a particular token. Compliant
implementation MUST support the revocation of refresh tokens, access
token revocation MAY be supported.
</p>
<a name="Revocation"></a><br><hr>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<a name="rfc.section.2"></a><h3>2.
Token Revocation</h3>
<p>The client requests the revocation of a particular token by making an
HTTP POST request to the token revocation endpoint. The location of the
token revocation endpoint can be found in the authorization servers
documentation. The token endpoint URI MAY include a query component.
</p>
<p>Since requests to the token revocation endpoint result in the
transmission of plain text credentials in the HTTP request, the
authorization server MUST require the use of a transport-layer security
mechanism when sending requests to the token revocation endpoints.
Authorization servers MUST support TLS 1.2 as defined in <a class="info" href="#RFC5246">[RFC5246]<span> (</span><span class="info">Dierks, T. and E. Rescorla, “The Transport Layer Security (TLS) Protocol Version 1.2,” August 2008.</span><span>)</span></a>, and MAY support additional transport-layer
security mechanisms.
</p>
<p>The client constructs the request by including the following
parameters using the "application/x-www-form-urlencoded" format in the
HTTP request entity-body: </p>
<blockquote class="text"><dl>
<dt>token</dt>
<dd>REQUIRED. The token that the client wants to get
revoked. Note: the authorization server is supposed to detect the
token type automatically.
</dd>
</dl></blockquote>
<p>The client also includes its authentication credentials as described
in Section 3 of <a class="info" href="#I-D.ietf-oauth-v2">[I‑D.ietf‑oauth‑v2]<span> (</span><span class="info">Hammer-Lahav, E., Recordon, D., and D. Hardt, “The OAuth 2.0 Authorization Protocol,” September 2011.</span><span>)</span></a>.
</p>
<p>For example, a client may request the revocation of a refresh token
with the following request (line breaks are for display purposes only):
</p><div style="display: table; width: 0; margin-left: 3em; margin-right: auto"><pre> POST /revoke HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
token=45ghiukldjahdnhzdauz&
client_id=s6BhdRkqt3&client_secret=gX1fBat3bV
</pre></div>
<p>The authorization server first validates the client credentials (if
present) and verifies whether the client is authorized to revoke the
particular token based on the client identity and its policy. For
example, only the client the token has been issued for might be allowed
to revoke it. It is also conceivable to allow a dedicated user self-care
portal to revoke all kinds of tokens.
</p>
<p>In the next step, the authorization server invalidates the token.
Whether the revocation takes effect instantly or with some delay depends
on the architecture of the particular deployment. The client MUST NOT
make any assumptions about the timing and MUST NOT use the token
again.
</p>
<p>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.
</p>
<p>If the processed token is an access token, then the authorization
server MAY also invalidate the refresh token used to issue this access
token.
</p>
<p>The authorization server indicates a successful processing of the
request by a HTTP status code 200. Status code 401 indicates a failed
client authentication, whereas a status code 403 is used if 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 response as
defined in section 5.2. of <a class="info" href="#I-D.ietf-oauth-v2">[I‑D.ietf‑oauth‑v2]<span> (</span><span class="info">Hammer-Lahav, E., Recordon, D., and D. Hardt, “The OAuth 2.0 Authorization Protocol,” September 2011.</span><span>)</span></a>. The
following error codes are defined for the token revocation endpoint:
</p>
<blockquote class="text"><dl>
<dt>unsupported_token_type</dt>
<dd>The authorization server does
not support the revocation of the presented token type. I.e. the
client tried to revoke an access token on a server not supporting
this feature.
</dd>
<dt>invalid_token</dt>
<dd>The presented token is invalid.
</dd>
</dl></blockquote>
<a name="JSONP"></a><br><hr>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<a name="rfc.section.2.1"></a><h3>2.1.
JSONP Support</h3>
<p>The revocation endpoint MAY support <a class="info" href="#jsonp">JSONP<span> (</span><span class="info">Ippolito, B., “Remote JSON - JSONP,” December 2005.</span><span>)</span></a> by allowing GET requests with an
additional parameter: </p>
<blockquote class="text"><dl>
<dt>callback</dt>
<dd>The qualified name of a JavaScript
function.
</dd>
</dl></blockquote>
<p>Example request:
</p><div style="display: table; width: 0; margin-left: 3em; margin-right: auto"><pre>https://example.com/revoke?token=XXXXX&callback=package.myCallback
</pre></div>
<p>Successful response:
</p><div style="display: table; width: 0; margin-left: 3em; margin-right: auto"><pre>package.myCallback();
</pre></div>
<p>Error response:
</p><div style="display: table; width: 0; margin-left: 3em; margin-right: auto"><pre>package.myCallback({"error":"invalid_token"});
</pre></div>
<a name="Acknowledgements"></a><br><hr>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<a name="rfc.section.3"></a><h3>3.
Acknowledgements</h3>
<p>We would like to thank Sebastian Ebling, Christian Stübner,
Brian Campbell, Igor Faynberg, Lukas Rosenstock, and Justin P. Richer
for their valuable feedback.
</p>
<a name="IANA"></a><br><hr>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<a name="rfc.section.4"></a><h3>4.
IANA Considerations</h3>
<p>This draft includes no request to IANA.
</p>
<a name="Security"></a><br><hr>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<a name="rfc.section.5"></a><h3>5.
Security Considerations</h3>
<p>All relevant security considerations have been given in the
functional specification.
</p>
<a name="rfc.references"></a><br><hr>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<a name="rfc.section.6"></a><h3>6.
References</h3>
<a name="rfc.references1"></a><br><hr>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<h3>6.1. Normative References</h3>
<table border="0" width="99%">
<tbody><tr><td class="author-text" valign="top"><a name="I-D.ietf-oauth-v2">[I-D.ietf-oauth-v2]</a></td>
<td class="author-text">Hammer-Lahav, E., Recordon, D., and D. Hardt, “<a href="http://tools.ietf.org/html/draft-ietf-oauth-v2-21">The OAuth 2.0 Authorization Protocol</a>,” draft-ietf-oauth-v2-21 (work in progress), September 2011 (<a href="http://www.ietf.org/internet-drafts/draft-ietf-oauth-v2-21.txt">TXT</a>, <a href="http://www.ietf.org/internet-drafts/draft-ietf-oauth-v2-21.pdf">PDF</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC2119">[RFC2119]</a></td>
<td class="author-text"><a href="mailto:[email protected]">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>,” BCP 14, RFC 2119, March 1997 (<a href="http://www.rfc-editor.org/rfc/rfc2119.txt">TXT</a>, <a href="http://xml.resource.org/public/rfc/html/rfc2119.html">HTML</a>, <a href="http://xml.resource.org/public/rfc/xml/rfc2119.xml">XML</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC5246">[RFC5246]</a></td>
<td class="author-text">Dierks, T. and E. Rescorla, “<a href="http://tools.ietf.org/html/rfc5246">The Transport Layer Security (TLS) Protocol Version 1.2</a>,” RFC 5246, August 2008 (<a href="http://www.rfc-editor.org/rfc/rfc5246.txt">TXT</a>).</td></tr>
</tbody></table>
<a name="rfc.references2"></a><br><hr>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<h3>6.2. Informative References</h3>
<table border="0" width="99%">
<tbody><tr><td class="author-text" valign="top"><a name="jsonp">[jsonp]</a></td>
<td class="author-text">Ippolito, B., “<a href="http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp">Remote JSON - JSONP</a>,” December 2005.</td></tr>
</tbody></table>
<a name="rfc.authors"></a><br><hr>
<table summary="layout" class="TOCbug" align="right" cellpadding="0" cellspacing="2"><tbody><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></tbody></table>
<h3>Authors' Addresses</h3>
<table border="0" cellpadding="0" cellspacing="0" width="99%">
<tbody><tr><td class="author-text"> </td>
<td class="author-text">Dr.-Ing. Torsten Lodderstedt (editor)</td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">Deutsche Telekom AG</td></tr>
<tr><td class="author" align="right">Email: </td>
<td class="author-text"><a href="mailto:[email protected]">[email protected]</a></td></tr>
<tr cellpadding="3"><td> </td><td> </td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">Stefanie Dronia</td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">SYRACOM Consulting AG</td></tr>
<tr><td class="author" align="right">Email: </td>
<td class="author-text"><a href="mailto:[email protected]">[email protected]</a></td></tr>
<tr cellpadding="3"><td> </td><td> </td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">Marius Scurtescu</td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">Google</td></tr>
<tr><td class="author" align="right">Email: </td>
<td class="author-text"><a href="mailto:[email protected]">[email protected]</a></td></tr>
</tbody></table>
</body></html>