forked from independentid/Identity-Events
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft-hunt-idevent-token-04.txt
952 lines (651 loc) · 35.4 KB
/
draft-hunt-idevent-token-04.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
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
Network Working Group P. Hunt, Ed.
Internet-Draft Oracle
Intended status: Standards Track W. Denniss
Expires: March 5, 2017 Google
M. Ansari
Cisco
M. Jones
Microsoft
September 1, 2016
Security Event Token (SET)
draft-hunt-idevent-token-04
Abstract
This specification defines the Security Event token, which may be
distributed via a protocol such as HTTP. The Security Event Token
(SET) specification profiles the JSON Web Token (JWT) and may be
optionally signed and/or encrypted. A SET describes a statement of
fact that may be shared by an event publisher with event subscribers.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
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/.
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."
This Internet-Draft will expire on March 5, 2017.
Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved.
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
Hunt, et al. Expires March 5, 2017 [Page 1]
Internet-Draft draft-hunt-idevent-token September 2016
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.
Table of Contents
1. Introduction and Overview . . . . . . . . . . . . . . . . . . 2
1.1. Notational Conventions . . . . . . . . . . . . . . . . . 4
1.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 4
2. The Security Event Token (SET) . . . . . . . . . . . . . . . 5
2.1. Core SET Claims . . . . . . . . . . . . . . . . . . . . . 8
2.2. Security Event Token Construction . . . . . . . . . . . . 10
3. Security Considerations . . . . . . . . . . . . . . . . . . . 12
3.1. Confidentiality and Integrity . . . . . . . . . . . . . . 12
3.2. Timing Issues . . . . . . . . . . . . . . . . . . . . . . 13
3.3. Distinguishing SETs from Access Tokens . . . . . . . . . 13
4. Privacy Considerations . . . . . . . . . . . . . . . . . . . 14
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14
5.1. JSON Web Token Claims Registration . . . . . . . . . . . 14
5.1.1. Registry Contents . . . . . . . . . . . . . . . . . . 14
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 14
6.1. Normative References . . . . . . . . . . . . . . . . . . 14
6.2. Informative References . . . . . . . . . . . . . . . . . 15
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 16
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 16
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17
1. Introduction and Overview
This specification defines an extensible Security Event Token (SET)
format which may be exchanged using protocols such as HTTP. The
specification builds on the JSON Web Token (JWT) format [RFC7519] in
order to provide a self-contained token that can be optionally signed
using JSON Web Signature (JWS) [RFC7515] and/or encrypted using JSON
Web Encryption (JWE) [RFC7516].
For the purpose of this specification, an event is a statement of
fact by a publisher (also known as the event issuer) that the state
of a security subject (e.g., a web resource, token, IP address) it
controls or is aware of, has changed in some way (explicitly or
implicitly). A security subject may be permanent (e.g., a user
account) or temporary (e.g., a login session) in nature. A state
change may include direct changes of entity state, implicit changes
to state or other higher-level security statements such as:
o The creation, modification, removal of a resource.
Hunt, et al. Expires March 5, 2017 [Page 2]
Internet-Draft draft-hunt-idevent-token September 2016
o The resetting or suspension of an account.
o The revocation of a security token prior to its expiry.
o The logout of a user session. Or,
o A cumulative conclusion such as to indicate that a user has taken
over an email identifier that may have been used in the past by
another user.
Based on some agreed upon criteria for an event Feed, the publisher
distributes events to the appropriate subscribers. While an event
may be delivered via synchronous means (e.g., HTTP POST), the
distribution of the event often happens asynchronously to the change
of state which generated the security event. As an example, an
OAuth2 Authorization Server [RFC6749], having received a token
revocation request [RFC7009], may issue a token revocation event to
downstream web resource providers. Having been informed of a token
revocation, the OAuth2 web resource service provider may add the
token identifier to its local revocation list assuming the token has
not already expired.
A subscriber having received an event, validates and interprets the
event and takes its own independent action, if any. For example,
having been informed of a personal identifier now being associated
with a different security subject (i.e., is being used by someone
else), the subscriber may choose to ensure that the new user is not
granted access to resources associated with the previous user. Or it
may not have any relationship with the subject, and no action is
taken.
While subscribers will often take actions upon receiving one or more
events, events MUST NOT be assumed to be commands or requests. To do
so requires complex bi-directional signals and error recovery
mechanisms that fall outside the scope of this specification. The
intent of this specification is to define a way of exchanging
statements of fact that subscribers may interpret for their own
purposes. Since events are typically historical statements by a
publisher and are not commands, idempotency or lack thereof, does not
apply.
Unless otherwise specified, this specification uses example events
intended as non-normative examples showing how an event may be used.
It is expected that other specifications will use this specification
to define normative events.
This specification is scoped to security and identity related events.
While event tokens may be used for other purposes, the specification
Hunt, et al. Expires March 5, 2017 [Page 3]
Internet-Draft draft-hunt-idevent-token September 2016
only considers security and privacy concerns relevant to identity and
personal information.
1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. These
keywords are capitalized when used to unambiguously specify
requirements of the protocol or application features and behavior
that affect the inter-operability and security of implementations.
When these words are not capitalized, they are meant in their
natural-language sense.
For purposes of readability, examples are not URL encoded.
Implementers MUST percent encode URLs as described in Section 2.1 of
[RFC3986].
Throughout this document, all figures MAY contain spaces and extra
line-wrapping for readability and space limitations. Similarly, some
URIs contained within examples have been shortened for space and
readability reasons.
1.2. Definitions
The following definitions are used with SETs:
Feed Publisher
The Feed Publisher creates SETs to be distributed to registered
subscribers. In JWT terminology, the Feed Publisher is also known
as the issuer ("iss").
Security Event Token (SET)
An SET is a JWT that is to be distributed to one or more
registered subscribers. A SET MAY be signed or encrypted using
JWS and/or JWE for authentication and confidentiality reasons.
Feed
A Feed is a logical grouping of SETs or a context under which SETs
may be issued. A Subscriber registers with the Feed Publisher to
subscribe to SETs associated with a Feed. How a Feed is defined
or the method for subscription is out-of-scope of this
specification.
Subscriber
A Subscriber registers to receive SETs from a Feed Publisher using
a protocol such as HTTP. The method of registration and delivery
is out-of-scope of this specification.
Hunt, et al. Expires March 5, 2017 [Page 4]
Internet-Draft draft-hunt-idevent-token September 2016
Security Subject
A Security Subject is the entity to which a SET refers. A
Security Subject may be a principle (e.g., Section 4.1.2
[RFC7519]), a web resource, or other thing such as an IP address
that a SET might reference.
2. The Security Event Token (SET)
A SET conveys a statement (in the form of a JWT [RFC7519]) about a
single security event in relation to a Security Subject that may be
of interest to a Subscriber or set of Subscribers receiving SETs from
a Feed Publisher.
The schema and structure of a SET follows the JWT [RFC7519]
specification. A SET has the following structure:
o An outer JSON structure that acts as the SET envelope. The
envelope contains a set of JSON attributes, called JWT claims,
typically common to every SET or common to a number of different
Security Events within a single profiling specification or a
related series of specifications. Claims in the envelope SHOULD
be registered in the JWT Token Claims Registry Section 10.1
[RFC7519] or be Public Claims or Private Claims as also defined in
[RFC7519].
o Envelope claims that are profiled and defined in this
specification are used to validate the SET and determine the event
data included. The claim "events" describes the type of SET event
and indicates the data that MAY be present in the SET. While a
SET contains a single event, it MAY have multiple extensions
providing additional data about the same event. The primary event
is the first value in the "events" array, while event extensions
are the 2nd, 3rd, etc.
o For each value of "events", a JSON attribute, whose value is a
JSON object, MAY be added known as an event "payload". The
payload object contains claimcs typically unique to the events URI
value and are not registered as JWT claims. These claimcs are
defined within their associated event specification. Event
extensions can be used for many purposes. Some examples include
but are not limited to:
* A categorization extension applied to multiple event types in
order to provide classification information (e.g. threat type
or level).
* Enhancement of an existing specifications the arise over time.
Hunt, et al. Expires March 5, 2017 [Page 5]
Internet-Draft draft-hunt-idevent-token September 2016
* Correlation extensions needed to link a potential series of
events.
* Localized contextual extensions needed between a publisher and
subscriber.
The following is a non-normative example showing a hypothetical SCIM
password reset SET. The example also shows an example where the
issuer has provided an extension ("https://example.com/scim/event/
passwordResetExt") that is used to convey additional information such
as the current count of reset attempts:
{
"jti": "3d0c3cf797584bd193bd0fb1bd4e7d30",
"events":[
"urn:ietf:params:scim:event:passwordReset",
"https://example.com/scim/event/passwordResetExt"
],
"iat": 1458496025,
"iss": "https://scim.example.com",
"aud":[
"https://jhub.example.com/Feeds/98d52461fa5bbc879593b7754",
"https://jhub.example.com/Feeds/5d7604516b1d08641d7676ee7"
],
"sub":"https://scim.example.com/Users/44f6142df96bd6ab61e7521d9",
"urn:ietf:params:scim:event:passwordReset":{
"id":"44f6142df96bd6ab61e7521d9"
},
"https://example.com/scim/event/passwordResetExt":{
"resetAttempts":5
}
}
Figure 1: Example SCIM Password Reset Event
The event in the figure above expresses hypothetical password reset
event for SCIM [RFC7644]. The JWT consists of:
o An "events" claim specifying the hypothetical SCIM urn
("urn:ietf:params:scim:event:passwordReset") for a password reset,
and a custom extension, "https://example.com/scim/event/
passwordResetExt", that is used to provide additional event
information such as the current count of resets.
o An "iss" claimc, denotes the event publisher.
o The "sub" claimc specifies the SCIM resource URI that was
affected.
Hunt, et al. Expires March 5, 2017 [Page 6]
Internet-Draft draft-hunt-idevent-token September 2016
o The "aud" claimc specifies the intended audience for the event.
In practical terms, this MAY be the URI for the event Feed that a
client has subscribed to.
Additional extensions to an event may be added by adding more values
to the "events" claimc. For each event URI value specified, there
MAY be a corresponding claimc that has a JSON object that contains
the claimcs associated with that event (e.g.,
"https://example.com/scim/event/passwordResetExt"). In this example,
the SCIM event indicates that a password has been updated and the
current password reset count is 5. Notice that the value for
"resetAttempts" is actually part of its own JSON object
"https://example.com/scim/event/passwordResetExt".
Here is another example event token, this one for a Logout Token:
{
"iss": "https://server.example.com",
"aud": "https://rp.example.com",
"jti": "3d0c3cf797584bd193bd0fb1bd4e7d30",
"iat": 1458668180,
"exp": 1458668580,
"sub": "248289761001",
"events": [
"https://specs.openid.net/logout"
],
"https://specs.openid.net/logout": {
"iss": "https://token.example.com",
"sid": "08a5019c-17e1-4977-8f42-65a12843ea02"
}
}
Figure 2: Example OpenID Logout Event
In the above example, the event has its own issuer,
"https://server.example.com" while the event is about the logging out
of a user session identified in the event extension by "jti" that was
issued by "https://token.example.com".
Hunt, et al. Expires March 5, 2017 [Page 7]
Internet-Draft draft-hunt-idevent-token September 2016
In the following example, a fictional medical service collects
consent for medical actions and notifies other parties. The
individual for whom consent is identified was originally
authenticated via OpenID Connect. In this case, the issuer of the
SET event is an application rather than the OpenID provider:
{
"jti": "fb4e75b5411e4e19b6c0fe87950f7749",
"events":[
"https://openid.net/heart/consent.html"
],
"sub": "248289761001",
"iat": 1458496025,
"iss": "https://my.examplemed.com",
"aud":[
"https://rp.example.com"
],
"https://openid.net/heart/consent":{
"consentUri":[
"https://terms.examplemed.com/labdisclosure.html#Agree"
]
}
}
Figure 3: Example Consent Event
In the above example "iss" and "sub" contained within the claimc
"https://openid.net/heart/consent", refer to the subject and issuer
of the original OpendID Provider. They are distinct from the top
level value of "iss" which always refers to the issuer of the event -
a medical consent service that is a relying party to the OpenID
Provider.
2.1. Core SET Claims
The following are claimcs that are based on [RFC7519] claim
definitions and are profiled for use in an event token:
jti
As defined by Section 4.1.7 [RFC7519] contains a unique identifier
for an event. The identifier SHOULD be unique within a particular
event Feed and MAY be used by clients to track whether a
particular event has already been received. This claimc is
REQUIRED.
iss
A single valued String containing the URI of the service provider
publishing the SET (the issuer). This claimc is REQUIRED.
Hunt, et al. Expires March 5, 2017 [Page 8]
Internet-Draft draft-hunt-idevent-token September 2016
aud
A multi-valued String containing the URIs representing the
audience of the event. Values are typically URLs of the Feeds the
event is associated with. When an event has multiple audiences
that go to the same subscriber, the publisher is not obligated to
deliver repeated events to the same subscriber. This claimc is
RECOMMENDED.
iat
As defined by Section 4.1.6 [RFC7519], a value containing a
NumericDate, which represents when the event was issued. Unless
otherwise specified, the value SHOULD be interpreted by the
subscriber as equivalent to the actual time of the event. This
claimc is REQUIRED.
nbf
As defined by Section 4.1.5 [RFC7519], a value containing a
NumericDate, which represents a future date when the event will
occur. This claimc is OPTIONAL.
sub As defined by Section 4.1.2 [RFC7519], a String or URI value
representing the principal or the subject of the SET. This is
usually the entity whose "state" was changed. For example, an IP
Address was added to a black list. A URI representing a user
resource that was modified. A token identifier for a revoked
token. If used, the profile specification SHOULD define the
content and format semantics for the value. This claim is
OPTIONAL, as the principal for any given profile may already be
identified without the inclusion of a subject claim.
exp As defined by [RFC7519], this claim is time on which the JWT
MUST NOT be accepted for processing. In the context of a SET
however, this notion does not apply since a SET reflects something
that has already been processed and is historical in nature.
While some specifications MAY have a need for this claim, its use
in general cases is NOT RECOMMENDED.
The following is a new claim defined by this specification:
events
A multi-valued String that contains one or more URIs representing
the type of event being expressed and the claims that MAY be
available within the JWT. The first value SHALL indicate the type
of SET event and following values represent extensions to that
event. For each value present, there MAY be an associated JSON
sub-objects present in the SET. Each JSON sub-object is denoted
by an claim whose name matches a value in "events". This claim is
REQUIRED to have at least one value.
Hunt, et al. Expires March 5, 2017 [Page 9]
Internet-Draft draft-hunt-idevent-token September 2016
2.2. Security Event Token Construction
A SET is a JWT [RFC7519] that is constructed by building a JSON
structure that constitutes an event object and which is then used as
the body of a JWT.
While this specification uses JWT to convey a SET, implementers SHALL
NOT use SETs to convey authentication or authorization assertions.
The following is an example event token (which has been formatted for
readability):
{
"jti": "4d3559ec67504aaba65d40b0363faad8",
"iat": 1458496404,
"iss": "https://scim.example.com",
"aud":[
"https://scim.example.com/Feeds/98d52461fa5bbc879593b7754",
"https://scim.example.com/Feeds/5d7604516b1d08641d7676ee7"
],
"events":[
"urn:ietf:params:scim:event:create"
],
"urn:ietf:params:scim:event:create":{
"ref": "https://scim.example.com/Users/44f6142df96bd6ab61e7521d9",
"attributes":["id", "name", "userName", "password", "emails"],
"values":{
"emails":[
{"type":"work", "value":"jdoe@example.com"}
],
"password":"not4u2no",
"userName":"jdoe",
"id":"44f6142df96bd6ab61e7521d9",
"name":{
"givenName":"John",
"familyName":"Doe"
}
}
}
}
Figure 4: Example Event JSON Data
When transmitted, the above JSON body must be converted into a JWT as
per [RFC7519]. In this example, because the event contains attribute
values, the token MUST be encrypted per JWE (see [RFC7516]) before
transmission.
Hunt, et al. Expires March 5, 2017 [Page 10]
Internet-Draft draft-hunt-idevent-token September 2016
The following is an example of a SCIM Event expressed as an unsecured
JWT. The JWT header of:
{"alg":"none"}
Base64url encoding of the octets of the UTF-8 representation of the
header yields:
eyJhbGciOiJub25lIn0
The example JSON Event Data is encoded as follows:
eyAgCiAgImp0aSI6ICI0ZDM1NTllYzY3NTA0YWFiYTY1ZDQwYjAzNjNmYWFkOCIsCiAg
ImlhdCI6IDE0NTg0OTY0MDQsCiAgImlzcyI6ICJodHRwczovL3NjaW0uZXhhbXBsZS5j
b20iLCAgCiAgImF1ZCI6WwogICAiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL0ZlZWRz
Lzk4ZDUyNDYxZmE1YmJjODc5NTkzYjc3NTQiLAogICAiaHR0cHM6Ly9zY2ltLmV4YW1w
bGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIxZDA4NjQxZDc2NzZlZTciCiAgXSwgIAogIAog
ICJldmVudHMiOlsKICAgICJ1cm46aWV0ZjpwYXJhbXM6c2NpbTpldmVudDpjcmVhdGUi
CiAgXSwKICAidXJuOmlldGY6cGFyYW1zOnNjaW06ZXZlbnQ6Y3JlYXRlIjp7CiAgICAi
cmVmIjogImh0dHBzOi8vc2NpbS5leGFtcGxlLmNvbS9Vc2Vycy80NGY2MTQyZGY5NmJk
NmFiNjFlNzUyMWQ5IiwKICAgICJhdHRyaWJ1dGVzIjpbImlkIiwibmFtZSIsInVzZXJO
YW1lIiwicGFzc3dvcmQiLCJlbWFpbHMiXSwKICAgICJ2YWx1ZXMiOnsKICAgICAgImVt
YWlscyI6WwogICAgICAgeyJ0eXBlIjoid29yayIsInZhbHVlIjoiamRvZUBleGFtcGxl
LmNvbSJ9CiAgICAgIF0sCiAgICAgICJwYXNzd29yZCI6Im5vdDR1Mm5vIiwKICAgICAg
InVzZXJOYW1lIjoiamRvZSIsCiAgICAgICJpZCI6IjQ0ZjYxNDJkZjk2YmQ2YWI2MWU3
NTIxZDkiLAogICAgICAibmFtZSI6ewogICAgICAgICJnaXZlbk5hbWUiOiJKb2huIiwK
ICAgICAgICAiZmFtaWx5TmFtZSI6IkRvZSIKICAgICAgfQogICAgfSAgCiAgfQp9
Hunt, et al. Expires March 5, 2017 [Page 11]
Internet-Draft draft-hunt-idevent-token September 2016
The encoded JWS signature is the empty string. Concatenating the
parts yields:
eyJhbGciOiJub25lIn0
.
eyAgCiAgImp0aSI6ICI0ZDM1NTllYzY3NTA0YWFiYTY1ZDQwYjAzNjNmYWFkOCIsCiAg
ImlhdCI6IDE0NTg0OTY0MDQsCiAgImlzcyI6ICJodHRwczovL3NjaW0uZXhhbXBsZS5j
b20iLCAgCiAgImF1ZCI6WwogICAiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL0ZlZWRz
Lzk4ZDUyNDYxZmE1YmJjODc5NTkzYjc3NTQiLAogICAiaHR0cHM6Ly9zY2ltLmV4YW1w
bGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIxZDA4NjQxZDc2NzZlZTciCiAgXSwgIAogIAog
ICJldmVudHMiOlsKICAgICJ1cm46aWV0ZjpwYXJhbXM6c2NpbTpldmVudDpjcmVhdGUi
CiAgXSwKICAidXJuOmlldGY6cGFyYW1zOnNjaW06ZXZlbnQ6Y3JlYXRlIjp7CiAgICAi
cmVmIjogImh0dHBzOi8vc2NpbS5leGFtcGxlLmNvbS9Vc2Vycy80NGY2MTQyZGY5NmJk
NmFiNjFlNzUyMWQ5IiwKICAgICJhdHRyaWJ1dGVzIjpbImlkIiwibmFtZSIsInVzZXJO
YW1lIiwicGFzc3dvcmQiLCJlbWFpbHMiXSwKICAgICJ2YWx1ZXMiOnsKICAgICAgImVt
YWlscyI6WwogICAgICAgeyJ0eXBlIjoid29yayIsInZhbHVlIjoiamRvZUBleGFtcGxl
LmNvbSJ9CiAgICAgIF0sCiAgICAgICJwYXNzd29yZCI6Im5vdDR1Mm5vIiwKICAgICAg
InVzZXJOYW1lIjoiamRvZSIsCiAgICAgICJpZCI6IjQ0ZjYxNDJkZjk2YmQ2YWI2MWU3
NTIxZDkiLAogICAgICAibmFtZSI6ewogICAgICAgICJnaXZlbk5hbWUiOiJKb2huIiwK
ICAgICAgICAiZmFtaWx5TmFtZSI6IkRvZSIKICAgICAgfQogICAgfSAgCiAgfQp9
.
Figure 5: Example Unsecured Event Token
To create and or validate a signed or encrypted SET, follow the
instructions in section 7 of [RFC7519].
3. Security Considerations
3.1. Confidentiality and Integrity
SETs may often contain sensitive information. Therefore, methods for
distribution of events SHOULD require the use of a transport-layer
security mechanism when distributing events. Parties MUST support
TLS 1.2 [RFC5246] and MAY support additional transport-layer
mechanisms meeting its security requirements. When using TLS, the
client MUST perform a TLS/SSL server certificate check, per
[RFC6125]. Implementation security considerations for TLS can be
found in "Recommendations for Secure Use of TLS and DTLS" [RFC7525].
Security Events distributed through third-parties or that carry
personally identifiable information, SHOULD be encrypted using JWE
[RFC7516] or secured for confidentiality by other means.
Security Events distributed without authentication over the channel,
such as via TLS ([RFC5246] and [RFC6125]), and/or OAuth2 [RFC6749],
or Basic Authentication [RFC7617], MUST be signed using JWS [RFC7515]
Hunt, et al. Expires March 5, 2017 [Page 12]
Internet-Draft draft-hunt-idevent-token September 2016
so that individual events MAY be authenticated and validated by the
subscriber.
3.2. Timing Issues
When SETs are delivered asynchronously and/or out-of-band with
respect to the original action that incurred the security event, it
is important to consider that a SET might be delivered to a
Subscriber in advance or well behind the process that caused the
event. For example, a user having been required to logout and then
log back in again, may cause a logout SET to be issued that may
arrive at the same time as the user-agent accesses a web site having
just logged-in. If timing is not handled properly, the effect would
be to erroneously treat the new user session as logged out.
Profiling specifications SHOULD be careful to anticipate timing and
subject selection information. For example, it might be more
appropriate to cancel a "session" rather than a "user".
Alternatively, the specification could use timestamps that allows new
sessions to be started immediately after a stated logout event time.
3.3. Distinguishing SETs from Access Tokens
Because [RFC7519] states that "all claims that are not understood by
implementations MUST be ignored.", there is a consideration that a
SET token might be confused as an access or authorization token in
the case where a SET is mistakenly or intentionally intercepted and
presented as an access token. To avoid this it is recommended that
implementers consider one or more of the following:
o Avoid use of the JWT claim "exp" within the envelope.
o Where possible, use a separate "aud" claim value to distinguish
between the SET subscriber and the audience of an access token.
For example, a Logout while itended for the same relying party
could use a different audience to distinguish between normal
access and logout notification.
o Modify access validation systems to check for the presence of the
"events" claim as a means to detect SET event tokens. This is
particularly useful if the same endpoint may receive both types of
tokens.
o Consider avoiding use of the "sub" claim at the top level.
Hunt, et al. Expires March 5, 2017 [Page 13]
Internet-Draft draft-hunt-idevent-token September 2016
4. Privacy Considerations
If a SET needs to be retained for audit purposes, JWS MAY be used to
provide verification of its authenticity.
Event Publishers SHOULD attempt to specialize Feeds so that the
content is targeted to the specific business and protocol needs of
subscribers.
When sharing personally identifiable information or information that
is otherwise considered confidential to affected users, the
publishers and subscribers MUST have the appropriate legal agreements
and user consent in place.
The propagation of subject identifiers can be perceived as personally
identifiable information. Where possible, publishers and subscribers
should devise approaches that prevent propagation -- for example, the
passing of a hash value that requires the subscriber to already know
the subject.
5. IANA Considerations
5.1. JSON Web Token Claims Registration
This specification registers the "events" claim in the IANA "JSON Web
Token Claims" registry [IANA.JWT.Claims] established by [RFC7519].
5.1.1. Registry Contents
o Claim Name: "events"
o Claim Description: Security Events
o Change Controller: IESG
o Specification Document(s): Section 2 of [[ this specification ]]
6. References
6.1. Normative References
[IANA.JWT.Claims]
IANA, "JSON Web Token Claims",
<http://www.iana.org/assignments/jwt>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
Hunt, et al. Expires March 5, 2017 [Page 14]
Internet-Draft draft-hunt-idevent-token September 2016
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66,
RFC 3986, DOI 10.17487/RFC3986, January 2005,
<http://www.rfc-editor.org/info/rfc3986>.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008,
<http://www.rfc-editor.org/info/rfc5246>.
[RFC6125] Saint-Andre, P. and J. Hodges, "Representation and
Verification of Domain-Based Application Service Identity
within Internet Public Key Infrastructure Using X.509
(PKIX) Certificates in the Context of Transport Layer
Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March
2011, <http://www.rfc-editor.org/info/rfc6125>.
[RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework",
RFC 6749, DOI 10.17487/RFC6749, October 2012,
<http://www.rfc-editor.org/info/rfc6749>.
[RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
2014, <http://www.rfc-editor.org/info/rfc7159>.
[RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
(JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015,
<http://www.rfc-editor.org/info/rfc7519>.
[RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre,
"Recommendations for Secure Use of Transport Layer
Security (TLS) and Datagram Transport Layer Security
(DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May
2015, <http://www.rfc-editor.org/info/rfc7525>.
[RFC7617] Reschke, J., "The 'Basic' HTTP Authentication Scheme",
RFC 7617, DOI 10.17487/RFC7617, September 2015,
<http://www.rfc-editor.org/info/rfc7617>.
6.2. Informative References
[idevent-scim]
Oracle Corporation, "SCIM Event Extensions (work in
progress)", <draft-hunt-idevent-scim-00.txt>.
[RFC7009] Lodderstedt, T., Ed., Dronia, S., and M. Scurtescu, "OAuth
2.0 Token Revocation", RFC 7009, DOI 10.17487/RFC7009,
August 2013, <http://www.rfc-editor.org/info/rfc7009>.
Hunt, et al. Expires March 5, 2017 [Page 15]
Internet-Draft draft-hunt-idevent-token September 2016
[RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web
Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May
2015, <http://www.rfc-editor.org/info/rfc7515>.
[RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)",
RFC 7516, DOI 10.17487/RFC7516, May 2015,
<http://www.rfc-editor.org/info/rfc7516>.
[RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517,
DOI 10.17487/RFC7517, May 2015,
<http://www.rfc-editor.org/info/rfc7517>.
[RFC7644] Hunt, P., Ed., Grizzle, K., Ansari, M., Wahlstroem, E.,
and C. Mortimore, "System for Cross-domain Identity
Management: Protocol", RFC 7644, DOI 10.17487/RFC7644,
September 2015, <http://www.rfc-editor.org/info/rfc7644>.
Appendix A. Acknowledgments
The editors would like to thank the participants in the IETF id-event
mailing list and related working groups for their support of this
specification.
Appendix B. Change Log
Draft 01 - PH - Renamed eventUris to events
Draft 00 - PH - First Draft
Draft 01 - PH - Fixed some alignment issues with JWT. Remove event
type attribute.
Draft 02 - PH - Renamed to Security Events, Removed questions,
clarified examples and intro text, and added security and privacy
section.
Draft 03 - PH
General edit corrections from Sarah Squire
Changed "event" term to "SET"
Corrected author organization for William Dennis to Google
Changed definition of SET to be 2 parts, an envelope and 1 or more
payloads.
Clarified that the intent is to express a single event with
optional extensions only.
- mbj - Registered "events" claim, and proofreading corrections.
Hunt, et al. Expires March 5, 2017 [Page 16]
Internet-Draft draft-hunt-idevent-token September 2016
Draft 04 - PH -
o Re-added the "sub" claim with clarifications that any SET type may
use it.
o Added additional clarification on the use of envelope vs. paylaod
attributes
o Added security consideration for event timing.
o Switched use of "attribute" to "claim" for consistency.
o Revised examples to put "sub" claim back in the top level.
o Added clarification that SETs typically do not use "exp".
o Added security consideration for distinguishing Access Tokens and
SETs.
Authors' Addresses
Phil Hunt (editor)
Oracle Corporation
Email: phil.hunt@yahoo.com
William Denniss
Google
Email: wdenniss@google.com
Morteza Ansari
Cisco
Email: morteza.ansari@cisco.com
Michael B. Jones
Microsoft
Email: mbj@microsoft.com
URI: http://self-issued.info/
Hunt, et al. Expires March 5, 2017 [Page 17]