forked from independentid/Identity-Events
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft-hunt-secevent-stream-mgmt.txt
2688 lines (1821 loc) · 86.7 KB
/
draft-hunt-secevent-stream-mgmt.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
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Network Working Group P. Hunt, Ed.
Internet-Draft Oracle
Intended status: Standards Track October 29, 2017
Expires: May 2, 2018
SET Security Event Stream Management and Provisioning
draft-hunt-secevent-stream-mgmt-00
Abstract
This specification defines a "control plane" service which enables a
client (e.g. an Event Receiver) to establish, monitor, and manage a
Security Event Token Stream.
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 https://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 May 2, 2018.
Copyright Notice
Copyright (c) 2017 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
(https://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.
Hunt Expires May 2, 2018 [Page 1]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
Table of Contents
1. Introduction and Overview . . . . . . . . . . . . . . . . . . 2
1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3
1.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 4
2. Stream Monitoring and Configuration Retrieval . . . . . . . . 4
2.1. Event Stream Configuration Attributes . . . . . . . . . . 5
2.2. Checking Stream Configuration and Stream State . . . . . 8
2.3. Event Stream State Model . . . . . . . . . . . . . . . . 12
3. Stream Management and Provisioning . . . . . . . . . . . . . 14
3.1. Creating An Event Stream . . . . . . . . . . . . . . . . 14
3.2. Updating An Event Stream . . . . . . . . . . . . . . . . 16
3.2.1. Update using HTTP PUT . . . . . . . . . . . . . . . . 17
3.2.2. Update using HTTP PATCH . . . . . . . . . . . . . . . 19
4. Models for Managing Stream Subjects . . . . . . . . . . . . . 21
4.1. General Considerations for Managing Subjects . . . . . . 22
4.2. Subjects as Part of Stream Configuration . . . . . . . . 22
4.2.1. Checking Subject Membership . . . . . . . . . . . . . 22
4.2.2. Adding and Removing Subjects to a Stream . . . . . . 25
4.3. Subjects as Members of a Group . . . . . . . . . . . . . 27
4.3.1. Checking Membership . . . . . . . . . . . . . . . . . 28
4.3.2. Adding and Removing SCIM Users to a Group . . . . . . 29
4.4. Subjects as a Resource (aka POST Profile) . . . . . . . . 31
4.4.1. Adding A Subject to a Stream . . . . . . . . . . . . 33
4.4.2. Querying for Subject in Event Streams . . . . . . . . 34
4.4.3. Removing a Subject from an Event Stream . . . . . . . 35
5. Event Stream Verification . . . . . . . . . . . . . . . . . . 35
6. Privacy Considerations . . . . . . . . . . . . . . . . . . . 37
6.1. Subject Management . . . . . . . . . . . . . . . . . . . 37
7. Security Considerations . . . . . . . . . . . . . . . . . . . 37
7.1. Multi-Party Access to Streams . . . . . . . . . . . . . . 37
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 38
8.1. Registration of Verify Event URI . . . . . . . . . . . . 38
8.2. SCIM Schema Registration . . . . . . . . . . . . . . . . 38
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 39
9.1. Normative References . . . . . . . . . . . . . . . . . . 39
9.2. Informative References . . . . . . . . . . . . . . . . . 39
Appendix A. Event Stream Resource Type and Schema Definitions . 40
Appendix B. Acknowledgments . . . . . . . . . . . . . . . . . . 47
Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 47
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 47
1. Introduction and Overview
This specification defines a "Control Plane" service that defines how
an Event Receiver or its agent may provision, monitor, and manage the
configuration of an Event Stream that delivers Security Event Tokens
(see [I-D.ietf-secevent-token]) using delivery methods such as
Hunt Expires May 2, 2018 [Page 2]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
specified in the SET Delivery Using HTTP Specification (see
[I-D.ietf-secevent-delivery]).
The specification defines the common metadata Event Transmitters and
Receivers use to describe HTTP service endpoints, methods, optional
signing and encryption modes, as well as the type and content of SETs
delivered over a Stream. The specification defines how the Event
Receiver parties may review and update the current configuration and
confirm operational delivery status using HTTP over TLS.
The mandatory part of this specification (see Section 2) uses a
profile of SCIM (see [RFC7643] and [RFC7644]) to implement Event
Stream configuration, monitoring and retrieval using HTTP GET
Section 4.3.1 [RFC7231]. Additionally, SCIM MAY be used to manage
and update Event Stream configuration and operational state.
The choice os SCIM has been recommended as it is intended as a
general purpose layer that can be applied to many underlying systems.
SCIM's extensibility mechanisms to define data types (resource types)
enable it to be flexibly used by specifications intenting to profile
SET Tokens and Delivery for use in many ways.
For the purposes of the Control Plane, SCIM Section 2 [RFC7643]
provides the JSON data definitions that enable the Control Plane to
allow service providers and clients to negotiate attributes and
resource types used in different SET Profiles. This includes
declarations and discovery of attribute types, mutability,
cardinality, and returnability that MAY differ between deployments
and SET Event type profiles. For HTTP protocol handling and error
signaling, the processing rules in [RFC7644] SHALL be applied.
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]. Many examples show only partial response and may use
"..." to indicate omitted data.
Hunt Expires May 2, 2018 [Page 3]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
Throughout this documents all figures MAY contain spaces and extra
line-wrapping for readability and space limitations. Similarly, some
URI's contained within examples, have been shortened for space and
readability reasons.
1.2. Definitions
This specification assumes terminology defined in the Security Event
Token specification [I-D.ietf-secevent-token] and SET Token Delivery
specification [I-D.ietf-secevent-delivery].
The following definitions are defined for Security Event
distribution:
Control Plane
A Control Plane represents an service offered by an Event
Transmitter that lets an Event Receiver query the current
operational and/or error status of an Event Stream. The Control
Plane MAY also be used to retrieve Event Stream and SET
configuration data.
Data Plane
The Data Plane represents the HTTP service offered by an Event
Receiver that allows the Event Transmitter to deliver multiple
SETs via HTTP POST as part of an Event Stream.
Client A Client is any actor, typically represented by an
authorization credential, authorized to make changes to an Event
Stream. Verify often this is an actor belonging to the Event
Receiver organization. Actors can be servers, monitoring
services, and administrators.
2. Stream Monitoring and Configuration Retrieval
The Control Plane is an HTTP service associated with an Event
Transmitter that enables the provisioning and monitoring of Event
Streams by entities such Event Receivers, administrators, and
monitoring services. This section describes required functionality
to enable Event Receivers to retrieve configuration attributes and to
detect SET delivery problems that may occur when an Event Transmitter
fails to deliver SETs.
This specification also defines optional Control Plane services to
create and update streams in sections Section 3 and Section 4.
Hunt Expires May 2, 2018 [Page 4]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
2.1. Event Stream Configuration Attributes
An Event Stream is defined by a set of attributes which together
define an Event Stream's operational configuration:
eventUris
A read only array of JSON String values which are the URIs of
events configured for the Event Stream. This attribute is
assigned by the Control Plane provider in response to receiving an
Event Stream creation or update request. See "eventUris_req".
eventUris_req
An array of JSON String values which are the URIs of events
requested by the Event Receiver for the Stream. This attribute is
modifiable. An Event Stream provider MAY use this attribute to
request requested Event URIs over time that may not be initially
offered.
eventUris_avail
A read only array of JSON String values which are the URIs of
events that the Event Transmitter is able to support. This
attribute MAY be used by Control Plane clients to discover new
events that may become available over time.
methodUri
A REQUIRED JSON String value which represents the method used to
transfer SETs to the Event Receiver. See
[I-D.ietf-secevent-delivery].
deliveryUri
A JSON String value containing a URI that describes the location
where SETs are received (e.g. via HTTP POST). Its format and
usage requirements are defined by the associated "methodUri".
iss
The URI for the publisher of the SETs that will be issued for the
Event Stream. See Section 2.1 [I-D.ietf-secevent-token].
aud
An OPTIONAL JSON Array of JSON String values which are URIs
representing the audience(s) of the Event Stream. The value SHALL
be the value of SET "aud" claim sent to the Event Receiver.
iss_jwksUri
An OPTIONAL String that contains the URL of the SET issuers public
JSON Web Key Set [RFC7517]. This contains the signing key(s) the
Event Receiver uses to validate SET signatures from the Event
Hunt Expires May 2, 2018 [Page 5]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
Transmitter that will be used by the Event Receiver to verify the
authenticity of issued SETs.
aud_jwksUri
An OPTIONAL JSON Web Key Set [RFC7517] that contains the Event
Receiver's encryption keys that MAY be used by the Event
Transmitter to encrypt SET tokens for the specified Event
Receiver.
status
An OPTIONAL JSON String keyword that indicates the current state
of an Event Stream. More information on the Event Stream state
can be found in Section 2.3. Valid keywords are:
"on" - indicates the Event Stream has been verified and that
the Feed Provider MAY pass SETs to the Event Receiver.
"paused" - indicates the Event Stream is temporarily suspended.
While "paused", SETs SHOULD be retained and delivered when
state returns to "on". If delivery is paused for an extended
period defined by the Event Transmitter, the Event Transmitter
MAY change the state to "off" indicating SETs are no longer
retained.
"off" - indicates that the Event Stream is no longer passing
SETs. While in off mode, the Event Stream configuration is
maintained, but new events are ignored, not delivered or
retained. Before returning to "on", a verification MUST be
performed.
"fail" - indicates that the Event Stream was unable to deliver
SETs to the Event Receiver due an unrecoverable error or for an
extended period of time. Unlike paused status, a failed Event
Stream does not retain existing or new SETs that are issued.
Before returning to "on", a verification MUST be performed.
maxRetries
An OPTIONAL JSON number indicating the maximum number of attempts
to deliver a SET. A value of '0' indicates there is no maximum.
Upon reaching the maximum, the Event Stream "status" attribute is
set to "failed".
maxDeliveryTime
An OPTIONAL number indicating the maximum amount of time in
seconds a SET MAY take for successful delivery per request or
cumulatively across multiple retries. Upon reaching the maximum,
the Event Stream "status" is set to "failed". If undefined, there
is no maximum time.
Hunt Expires May 2, 2018 [Page 6]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
minDeliveryInterval
An OPTIONAL JSON integer that represents the minimum interval in
seconds between deliveries. A value of '0' indicates delivery
should happen immediately. When delivery is a polling method
(e.g. HTTP GET), it is the expected time between Event Receiver
attempts. When in push mode (e.g. HTTP POST), it is the interval
the server will wait before sending a new event or events.
txErr
An OPTIONAL JSON String keyword value. When the Event Stream has
"subState" set to "fail", one of the following error keywords is
set:
"connection" indicates an error occurred attempting to open a
TCP connection with the assigned endpoint.
"tls" indicates an error occurred establishing a TLS connection
with the assigned endpoint.
"dnsname" indicates an error occurred establishing a TLS
connection where the dnsname was not validated.
"receiver" indicates an error occurred whereby the Event
Receiver has indicated an error for which the Event Transmitter
is unable to correct.
txErrDesc
An OPTIONAL String value that is usually human readable that
provides further diagnostic detail by the indicated "txErr" error
code.
verifyNonce A String value that when changed or set by a Control
Plane client will cause the Event Transmitter to issue a single
Verify Event based on the nonce value provided (see Section 5).
The intent of the value is to allow the Event Receiver to confirm
the Verify Event received matches the value set in the
configuration. While this value MAY be updated (see Section 5),
its value is usually not returned as part of an Event Stream
configuration.
subjects
An OPTIONAL complex attribute containing sub objects whose sub-
attributes define subjects against which SETs may be issued. The
following sub-attributes are defined:
value A String which uniquely identifies a subject (or set of
subjects) to be included in the Stream. The format and type of
value is defined by the 'type' sub-attribute.
Hunt Expires May 2, 2018 [Page 7]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
iss A String which contains the URI of the issuer of the subject
identified in the "value" attribute. When not supplied the
issuer is assumed to be the Event Stream issuer.
type A case-insensitive canonical String value which defines the
contents of the attribute 'value'. Valid type values are:
OIDC Is a String value corresponding to an OpenID Connect
subject. The corresponding "iss" attribute is set with the
OpenId Connect iss value.
SAML A String value that is a URI that represents the subject
of a SAML Identity Provider.
EMAIL A String Value that is the Email addresses for a
subject. The value SHOULD be specified according to
[RFC5321].
PHIONE Phone numbers for the user. The value SHOULD be
specified according to the format defined in [RFC3966],
e.g., 'tel:+1-201-555-0123'.
User A SCIM User where value is the 'id' of a User resource in
the local SCIM service provider.
Group A SCIM Group where the value is the 'id' of a Group
resource in the local SCIM service provider.
URI A miscellaneous subject that can be identified by a URI.
Additional Event Stream configuration (attributes) MAY be defined as
extensions. The method for adding new attributes is defined in
Section 3.3 [RFC7643].
2.2. Checking Stream Configuration and Stream State
An Event Receiver MAY check the current status of a Stream the Event
Transmitter's Control Plane service by performing an HTTP GET using
the provided URI from the Event Transmitter either through an
administrative process or via the optional Stream creation response
defined in Section 3.1.
The format of the Stream GET request and response is defined by
Section 3.4 [RFC7644].
In addition to the basic attributes defined in Section 2 [RFC7643]
common to all resource types, an "EventStream" resource types uses
the attributes defined in Section 2.1. As with any SCIM resource, an
Hunt Expires May 2, 2018 [Page 8]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
"EventStream" resource MUST include the JSON attributes "schemas" and
"id" as defined in [RFC7643]:
schemas
Is an array of Strings with at least a single value of
"urn:ietf:params:scim:schemas:event:2.0:EventStream".
Configuration MAY be extented through the addition of other schema
URI values such as in the case where a new delivery method or SET
profile needs to define additional attributes.
id
Is a String which is a permanent unique identifier for
"EventStream" resources. The value which is also used to define a
permanent Event Stream Resource URI.
The example below retrieves a specific "EventStream" resource whose
"id" is "548b7c3f77c8bab33a4fef40".
GET /EventStreams/767aad7853d240debc8e3c962051c1c0
Host: example.com
Accept: application/json
Authorization: Bearer h480djs93hd8
Figure 1: Example EventStream HTTP GET Request
Hunt Expires May 2, 2018 [Page 9]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
Below is an example response to the "EventStream" retrieval made in
Figure 1.
HTTP/1.1 200 OK
Content-Type: application/scim+json
Location:
https://example.com/EventStreams/767aad7853d240debc8e3c962051c1c0
{
"schemas":["urn:ietf:params:scim:schemas:event:2.0:EventStream"],
"id":"767aad7853d240debc8e3c962051c1c0",
"eventUris_req":[
"http://schemas.openid.net/event/backchannel-logout"
],
"eventUris":[
"http://schemas.openid.net/event/backchannel-logout"
],
"methodUri":"urn:ietf:params:set:method:HTTP:webCallback",
"deliveryUri":"https://notify.examplerp.com/Events",
"aud":"https://sets.myexamplerp.com",
"status":"fail",
"txErr":"connection",
"txErrDesc":"TCP connect error to notify.examplerp.com.",
"maxDeliveryTime":3600,
"minDeliveryInterval":0,
"description":"Logout events from oidc.example.com",
"meta":{
... SCIM meta attributes ...
}
}
Figure 2: Example Stream GET Response
In the above figure, the "EventStream" shows a "status" of "fail" due
to a TCP connection error. In this case, the Event Receiver is able
to discover that its endpoint was unavailable and has been marked
failed by the Event Transmitter (possibly explaining a lack of
received SETs). Typically, with this type of error, appropriate
operations staff would be alerted and some corrective action would be
taken to check for a configuration error or service failure.
The frequency with which Event Receivers poll the Event Stream status
depends on factors such as:
o The level of technical fault tolerance and availability of the
receiving endpoint.
Hunt Expires May 2, 2018 [Page 10]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
o The amount of risk that can be tolerated for lost events. For
example, if Security Events are considered informational, then
infrequent (hourly or daily) may be sufficient.
o The amount of buffer recovery offered by an Event Transmitter
which MAY be minutes depending on SET frequency and buffer size.
In many cases Event Stream status monitoring may be triggered on a
timeout basis. Event Receivers would typically poll if they have not
received a SET for some period during which SETs would be expected
based on past experience.
Receivers MAY use the endpoint "/EventStreams" to query and retrieve
available Event Streams based on the provided "Authorization" header.
The example below retrieves any "EventStream" resources based solely
on the requestor's authorization header.
GET /EventStreams/
Host: example.com
Accept: application/json
Authorization: Bearer h480djs93hd8
Figure 3: Example Stream HTTP GET Request From Common Endpoint
Hunt Expires May 2, 2018 [Page 11]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
HTTP/1.1 200 OK
Content-Type: application/scim+json
Location:
https://example.com/EventStreams/767aad7853d240debc8e3c962051c1c0
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults":1,
"itemsPerPage":10,
"startIndex":1,
"Resources":[
{
"schemas":["urn:ietf:params:scim:schemas:event:2.0:EventStream"],
"id":"767aad7853d240debc8e3c962051c1c0",
"feedName":"OIDCLogoutFeed",
"eventUris_req":[
"http://schemas.openid.net/event/backchannel-logout"
],
"eventUris":[
"http://schemas.openid.net/event/backchannel-logout"
],
"eventUris_avail":[
"http://schemas.openid.net/event/backchannel-logout"
],
"methodUri":"urn:ietf:params:set:method:HTTP:webCallback",
"deliveryUri":"https://notify.examplerp.com/Events",
"aud":"https://sets.myexamplerp.com",
"status":"fail",
"txErr":"connection",
"txErrDesc":"TCP connect error to notify.examplerp.com.",
"maxDeliveryTime":3600,
"minDeliveryInterval":0,
"description":"Logout events from oidc.example.com",
"meta":{
... SCIM meta attributes ...
}]
}
Figure 4: Example Event Stream List/Query Response Form
2.3. Event Stream State Model
The Event Stream configuration attribute "status" reports the current
state of an Event Stream with regards to whether the stream is
operational or is in a suspended or failed state. Additionally, the
"status" attribute can be used to pause or stop streams using the
stream configuration update functions described in Section 3.
Hunt Expires May 2, 2018 [Page 12]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
The following is the state machine representation of a Event Stream
on a Event Transmitter. Note that a Event Stream cannot be made
active until a verification process has been completed. As such, a
newly created Event Stream begins with state "on".
+
Create
|
+--------+ +------v-----+ +--------+
| +-Restart-> +--Suspend-> |
| fail | | on | | paused |
| <--Error--+ <--Resume--+ |
+--------+ +-+-------^--+ +---+----+
| | |
Disable Enable |
| | |
+-v-------+--+ |
| off <--Limited-----+
+------------+
Figure 5: Event Stream States at Event Transmitter
In Figure 5, the following actions impact the operational state of an
Event Stream. "status" values are shown in the boxes, and change
based on the following actions:
Create
A Event Receiver or an administrator creates a new Event Stream as
described in Section 3.1. The initial state is "on".
Error
An Event Transmitter that has not been able to deliver a SET over
one or more retries which has reached a limit of attempts
("maxRetries") or time ("maxDeliveryTime") MAY set the Event
Stream state to "fail". What stream status is set to "failed",
the Event Transmitter is indicating that SETs are being lost and
may not be recoverable.
Limited
A paused Event Stream has reached the transmitters ability to
retain SETs for delivery. The Event Transmitter changes the state
to "off" indicating SET loss is potentially occurring.
Restart
An administrator having corrected the failed delivery condition
modifies the Event Stream state to "on" (e.g. see Section 3.2).
Suspend and Resume
Hunt Expires May 2, 2018 [Page 13]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
An Event Stream MAY be suspended and resumed by updating the Event
Stream state to "paused" or "on". For example, see see
Section 3.2. While suspended, the Event Transmitter retains
undelivered SETs for a period of time and resources specified by
the Event Transmitter (see "Limited").
Enable and Disable
A Event Stream MAY be disabled and enabled by updating the Event
Stream "state" to "off" or "on". For example, see see
Section 3.2. While the Event Stream is disabled, all SETs that
occur at the Event Transmitter are lost.
3. Stream Management and Provisioning
This section describes optional Stream management provisioning
features that allow receivers or provisioning systems to create
streams and update configuration to perform actions such as rotation,
and operational state (e.g. suspend, stop, or resume) management.
The operations specified in this section are based on [RFC7644].
SCIM schema declarations for the "EventStream" resources are defined
in Appendix A. HTTP Protocol usage and processing rules are provided
by [RFC7644].
3.1. Creating An Event Stream
To define an Event Stream, the Event Receiver or its administrator
(known as the client) first obtains an authorization credential
allowing the ability to define a new Stream. Note: the process for
registering to obtain credentials and permission to register is out-
of-scope of this specification.
Upon obtaining authorization, the client issues an HTTP POST request
as defined in Section 3.3 [RFC7644]. To complete the request, the
administrative entity provides the required Stream configuration
attributes as specified in Section 2.1, the delivery method
[I-D.ietf-secevent-delivery] and any additional configuration
specified by the SET Event Specifications that are being used.
The client MAY discover the Event Transmitter's Control Plane service
for the schema requirements for "EventStream" resource type and any
other extensions using SCIM schema discovery in Section 4 [RFC7644].
The process to create an Event Stream is as follows:
1. The client initiates an HTTP POST to the Control Plane endpoint
and provides a JSON document defining an EventStream which
Hunt Expires May 2, 2018 [Page 14]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
contains information about the Event Receivers endpoints,
settings, and keys.
2. Upon validating the request, the Event Transmitters control plane
provisions the stream and updates the EventStream configuration
with the corresponding Event Transmitter information.
3. The Control Plane responds to the request from step 1 and returns
the final representation of the Event Stream configuration along
with a pointer to the created EventStream resource that the
client MAY use to monitor status and update configuration.
4. Upon receiving the response, the client completes the client side
configuration and provisioning based upon the returned
EventStream configuration.
In the following non-normative example, a request to create a new
"EventStream" is submitted.
POST /EventStreams
Host: example.com
Accept: application/scim+json
Content-Type: application/scim+json
Authorization: Bearer h480djs93hd8
{
"schemas":["urn:ietf:params:scim:schemas:event:2.0:EventStream"],
"feedName":"OIDCLogoutFeed",
"eventUris_req":[
"http://schemas.openid.net/event/backchannel-logout"
],
"methodUri":"urn:ietf:params:set:method:HTTP:webCallback",
"deliveryUri":"https://notify.examplerp.com/Events",
"aud":"https://sets.myexamplerp.com",
"maxDeliveryTime":3600,
"minDeliveryInterval":0,
"description":"Logout events from oidc.example.com"
}
Figure 6: Example Create Event Stream Request
Hunt Expires May 2, 2018 [Page 15]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
In following non-normative response, the Control Plane provider has
automatically assigned an HTTP addressable location for the
EventStream resource as well as an "id". Additionally, the Control
Plane response below includes additional configuration data for "iss"
and "iss_jwksUri".
HTTP/1.1 201 Created
Content-Type: application/scim+json
Location:
https://example.com/v2/EventStreams/767aad7853d240debc8e3c962051c1c0
{
"schemas":["urn:ietf:params:scim:schemas:event:2.0:EventStream"],
"id":"767aad7853d240debc8e3c962051c1c0",
"feedName":"OIDCLogoutFeed",
"eventUris_req":[
"http://schemas.openid.net/event/backchannel-logout"
],
"eventUris":[
"http://schemas.openid.net/event/backchannel-logout"
],
"eventUris_avail":[
"http://schemas.openid.net/event/backchannel-logout"
],
"methodUri":"urn:ietf:params:set:method:HTTP:webCallback",
"deliveryUri":"https://notify.examplerp.com/Events",
"aud":"https://sets.myexamplerp.com",
"status":"on",
"maxDeliveryTime":3600,
"minDeliveryInterval":0,
"iss":"oidc.example.com"
"iss_jwksUri":"https://example.com/keys/oidc-example-com.jwks"
"description":"Logout events from oidc.example.com",
"meta":{
... SCIM meta attributes ...
}
}
Figure 7: Example Response to Create EventStream Request
3.2. Updating An Event Stream
Two HTTP methods are available to update an Event Stream
configuration.
The HTTP PUT operation accepts a JSON Document representing an
existing EventStream configuration and replaces it.
Hunt Expires May 2, 2018 [Page 16]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
An optional HTTP PATCH operation uses a JSON Patch [RFC6902] style
request format to allow manipulation of specific EventStream
configuration such as (but not limited to) "status", and
"subjects".
3.2.1. Update using HTTP PUT
The HTTP PUT method allows a client having previously received the
EventStream JSON document to modify the document and replace the
Control Plane provider's copy. In using this method, the client is
not required to remove data normally asserted or defined by the Event
Stream Control Plane provider (e.g. attributes that are read only).
The processing rules of [RFC7644] enable the client to "put back"
what was previously received allowing the Control Plane provider to
figure out what attributes need updating and which attributes are
ignored. For example, while "id" is immutable, the Control Plane
provider will simply ignore attempts to replace its value. When
processing is complete the final accepted state is represented in the
HTTP Response.
Hunt Expires May 2, 2018 [Page 17]
Internet-Draft draft-hunt-secevent-stream-mgmt October 2017
In the following non-normative example, a request to replace the
existing EventStream "EventStream" is submitted. In this example,
the change shown is the status is now set to "off". Note that the
client does not have to remove read-only attributes such as
"eventUris" and "eventUris_avail" as these values are ignored as per
Section 3.5.1 [RFC7644].
PUT /EventStreams/767aad7853d240debc8e3c962051c1c0
Host: example.com
Accept: application/scim+json
Content-Type: application/scim+json
Authorization: Bearer h480djs93hd8
{
"schemas":["urn:ietf:params:scim:schemas:event:2.0:EventStream"],
"id":"767aad7853d240debc8e3c962051c1c0",
"feedName":"OIDCLogoutFeed",
"eventUris_req":[
"http://schemas.openid.net/event/backchannel-logout"
],
"eventUris":[
"http://schemas.openid.net/event/backchannel-logout"
],
"eventUris_avail":[
"http://schemas.openid.net/event/backchannel-logout"
],
"methodUri":"urn:ietf:params:set:method:HTTP:webCallback",
"deliveryUri":"https://notify.examplerp.com/Events",
"aud":"https://sets.myexamplerp.com",
"status":"off",
"maxDeliveryTime":3600,
"minDeliveryInterval":0,
"iss":"oidc.example.com"
"iss_jwksUri":"https://example.com/keys/oidc-example-com.jwks"
"description":"Logout events from oidc.example.com",
"meta":{
... SCIM meta attributes ...
}
}
Figure 8: Example Replace Event Stream Request