-
Notifications
You must be signed in to change notification settings - Fork 14
/
oauth-event-types-1_0.txt
560 lines (304 loc) · 14 KB
/
oauth-event-types-1_0.txt
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
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
M. Scurtescu
Coinbase
A. Backman
Amazon
P. Hunt
Oracle
J. Bradley
Yubico
April 24, 2018
OAuth Event Types 1.0
oauth-event-types-1_0
Abstract
This document defines the OAuth Event Types. Event Types are
introduced and defined in Security Event Token (SET) [SET].
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1. Notational Conventions . . . . . . . . . . . . . . . . . 2
2. OAuth Specific Subject Identifier Types . . . . . . . . . . . 2
2.1. Token Subject Identifier Type . . . . . . . . . . . . . . 2
2.2. Client Subject Identifier Type . . . . . . . . . . . . . 3
3. Event Types . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1. Token Issued . . . . . . . . . . . . . . . . . . . . . . 3
3.2. Token Revoked . . . . . . . . . . . . . . . . . . . . . . 4
3.3. Tokens Revoked . . . . . . . . . . . . . . . . . . . . . 6
3.4. Client Disabled . . . . . . . . . . . . . . . . . . . . . 7
3.5. Client Enabled . . . . . . . . . . . . . . . . . . . . . 8
3.6. Client Credential Changed . . . . . . . . . . . . . . . . 8
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
4.1. Subject Identifier Type Registry . . . . . . . . . . . . 8
5. Normative References . . . . . . . . . . . . . . . . . . . . 9
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9
1. Introduction
This specification is based on RISC Profile [RISC-PROFILE] and uses
the subject identifiers defined there.
The "aud" claim identifies the OAuth 2 client and its value SHOULD be
the OAuth 2 [RFC6749] client id.
Scurtescu, et al. Expires October 26, 2018 [Page 1]
oauth-event-types April 2018
1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
2. OAuth Specific Subject Identifier Types
This section defines OAuth specific Subject Identifier Types.
Subject identifiers are defined in Section 2 of [RISC-PROFILE].
2.1. Token Subject Identifier Type
A Token Subject Identifier Type describes an OAuth 2 token subject
and it is identified by the name "oauth_token".
Subject Identifiers of this type MUST contain the following claims:
o token_type - required, describes the OAuth 2 token type. Possible
values:
* access_token
* authorization_code
* refresh_token
o token_identifier_alg - required, describes how is the token string
in the "token" attribute to be interpreted. Possible values:
* plain - plain token string
* prefix - token string prefix
* hash_* - token string hash, actual hash algorithms added as a
suffix. TODO: create individual values for each hash
algorithm.
o token - required, the token identifier, as described by
"token_identifier_alg".
Scurtescu, et al. Expires October 26, 2018 [Page 2]
oauth-event-types April 2018
"subject": {
"subject_type": "oauth_token",
"token_type": "refresh_token",
"token_identifier_alg": "plain",
"token": "7265667265736820746F6B656E20737472696E67"
}
Figure 1: Example: Token Subject Identifier Type
2.2. Client Subject Identifier Type
A Client Subject Identifier Type describes an OAuth 2 client subject
and it is identified by the name "oauth_client".
Subjects identifiers of this type MUST contain the following claim:
o client_id - required, the OAuth 2 client id.
"subject": {
"subject_type": "oauth_client",
"client_id": "636C69656E74206964"
}
Figure 2: Example: Client Subject Identifier Type
3. Event Types
The base URI for OAuth Event Types is:
https://schemas.openid.net/secevent/oauth/event-type/
3.1. Token Issued
Event Type URI:
https://schemas.openid.net/secevent/oauth/event-type/token-issued
Token Issued signals that a new token was issued.
Attributes:
o subject - required, a Subject Identifier as defined by
Section 2.1 that identifies the token.
o token_subject - optional, a Subject Identifier as defined by
Section 2.1 of [RISC-PROFILE] that identifies the account
associated with the token.
o TODO: OAuth flow and endpoints involved in the process? For
example: redirect_uri, response_type, origin?
Scurtescu, et al. Expires October 26, 2018 [Page 3]
oauth-event-types April 2018
The token SHOULD be uniquely identified by the provided attributes,
either by "subject" alone or by "subject" in combination with
"token_subject". The token is unique in the context of a given
Transmitter and not globally unique. TODO: do we need a "iss"
attribute for the "oauth_token" Subject Type?
{
"iss": "https://idp.example.com/",
"jti": "756E69717565206964656E746966696572",
"iat": 1508184845,
"aud": "636C69656E745F6964",
"events": {
"https://schemas.openid.net/secevent/oauth/event-type/\
token-issued": {
"subject": {
"subject_type": "oauth_token",
"token_type": "refresh_token",
"token_identifier_alg": "plain",
"token": "7265667265736820746F6B656E20737472696E67"
},
"token_subject" {
"subject_type": "iss-sub",
"iss": "https://idp.example.com/",
"sub": "75736572206964"
}
}
}
}
_(the event type URI is wrapped, the backslash is the continuation
character)_
Figure 3: Example: Token Issued
3.2. Token Revoked
Event Type URI:
https://schemas.openid.net/secevent/oauth/event-type/token-revoked
Token Revoked signals that the token identified by this event was
revoked.
Attributes:
o subject - required, a Subjectect Identifier as defined by
Section 2.1 that identifies the token.
Scurtescu, et al. Expires October 26, 2018 [Page 4]
oauth-event-types April 2018
o token_subject - optional, a Subject Identifier as defined by
Section 2.1 of [RISC-PROFILE] that identifies the account
associated with the token.
o reason - optional, the reason why the token was revoked. Possible
values:
* inactive - token was revoked by the issuer because of
inactivity
* too_many - token was revoked by the issuer because an internal
limit was reached
* api - token was revoked through an API call like [RFC7009]
* user - token was revoked explicitly by the user
* issuer - token was revoked by the issuer for some other reason
* TODO: add extension mechanism (either through URIs or IANA
registry)
The token SHOULD be uniquely identified by the provided attributes,
either by "subject" alone or by "subject" in combination with
"token_subject". The token is unique in the context of a given
Transmitter and not globally unique. TODO: do we need a "iss"
attribute for the "oauth_token" Subject Type?
Scurtescu, et al. Expires October 26, 2018 [Page 5]
oauth-event-types April 2018
{
"iss": "https://idp.example.com/",
"jti": "756E69717565206964656E746966696572",
"iat": 1508184845,
"aud": "636C69656E745F6964",
"events": {
"https://schemas.openid.net/secevent/oauth/event-type/\
token-revoked": {
"subject": {
"subject_type": "oauth_token",
"token_type": "refresh_token",
"token_identifier_alg": "plain",
"token": "7265667265736820746F6B656E20737472696E67"
},
"token_subject" {
"subject_type": "iss-sub",
"iss": "https://idp.example.com/",
"sub": "75736572206964"
},
"reason": "inactive"
}
}
}
_(the event type URI is wrapped, the backslash is the continuation
character)_
Figure 4: Example: Token Revoked
3.3. Tokens Revoked
Event Type URI:
https://schemas.openid.net/secevent/oauth/event-type/tokens-revoked
Tokens Revoked signals that all tokens issued for the account
identified by the subject have been revoked.
Attributes:
o subject - optional, a Subject Identifier as defined by Section 2.1
of [RISC-PROFILE] that identifies the account associated with the
token.
o reason - optional, the reason why all the tokens were revoked.
Possible values:
* user - all tokens were revoked explicitly by the user
Scurtescu, et al. Expires October 26, 2018 [Page 6]
oauth-event-types April 2018
* issuer - all tokens were revoked by the issuer
* TODO: add extension mechanism (either through URIs or IANA
registry)
{
"iss": "https://idp.example.com/",
"jti": "756E69717565206964656E746966696572",
"iat": 1508184845,
"aud": "636C69656E745F6964",
"events": {
"https://schemas.openid.net/secevent/oauth/event-type/\
tokens-revoked": {
"subject": {
"subject_type": "iss-sub",
"iss": "https://idp.example.com/",
"sub": "7375626A656374",
},
}
}
}
_(the event type URI is wrapped, the backslash is the continuation
character)_
Figure 5: Example: Tokens Revoked
3.4. Client Disabled
Event Type URI:
https://schemas.openid.net/secevent/oauth/event-type/client-disabled
Client Disabled signals that the client identified by the "aud" claim
has been disabled. The client may be enabled (Section 3.5) in the
future.
Attributes: TODO use client subject identifier
Scurtescu, et al. Expires October 26, 2018 [Page 7]
oauth-event-types April 2018
{
"iss": "https://idp.example.com/",
"jti": "756E69717565206964656E746966696572",
"iat": 1508184845,
"aud": "636C69656E745F6964",
"events": {
"https://schemas.openid.net/secevent/oauth/event-type/\
client-disabled": {}
}
}
_(the event type URI is wrapped, the backslash is the continuation
character)_
Figure 6: Example: Client Disabled
3.5. Client Enabled
Event Type URI:
https://schemas.openid.net/secevent/oauth/event-type/client-enabled
Client Enabled signals that the client identified by the "aud" claim
has been enabled.
Attributes: TODO use client subject identifier
3.6. Client Credential Changed
Event Type URI:
https://schemas.openid.net/secevent/oauth/event-type/client-
credential-changed
Client Credential Changed signals that one of the credentials of the
client identified by the "aud" claim has changed. For example the
client secret has changed.
Attributes: TODO use client subject identifier
4. IANA Considerations
4.1. Subject Identifier Type Registry
TODO: register "oauth_token" and "oauth_client" subject identifier
types.
Scurtescu, et al. Expires October 26, 2018 [Page 8]
oauth-event-types April 2018
5. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework",
RFC 6749, DOI 10.17487/RFC6749, October 2012,
<https://www.rfc-editor.org/info/rfc6749>.
[RFC7009] Lodderstedt, T., Ed., Dronia, S., and M. Scurtescu, "OAuth
2.0 Token Revocation", RFC 7009, DOI 10.17487/RFC7009,
August 2013, <https://www.rfc-editor.org/info/rfc7009>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RISC-PROFILE]
Scurtescu, M., Backman, A., and J. Bradley, "OpenID RISC
Profile of IETF Security Events 1.0", April 2018,
<http://openid.net/specs/openid-risc-profile-1_0.html>.
[SET] Hunt, P., Ed., Jones, M., Denniss, W., and M. Ansari,
"Security Event Token (SET)", April 2018,
<https://tools.ietf.org/html/
draft-ietf-secevent-token-09>.
Authors' Addresses
Marius Scurtescu
Coinbase
Email: [email protected]
Annabelle Backman
Amazon
Email: [email protected]
Phil Hunt
Oracle Corporation
Email: [email protected]
Scurtescu, et al. Expires October 26, 2018 [Page 9]
oauth-event-types April 2018
John Bradley
Yubico
Email: [email protected]
Scurtescu, et al. Expires October 26, 2018 [Page 10]