-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdraft-hunt-idevent-distribution.txt
More file actions
1680 lines (1072 loc) · 58.2 KB
/
draft-hunt-idevent-distribution.txt
File metadata and controls
1680 lines (1072 loc) · 58.2 KB
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 M. Scurtescu
Expires: April 2, 2017 Google
M. Ansari
Cisco
September 29, 2016
SET Token Distribution and Subscription Management Profile
draft-hunt-idevent-distribution-01
Abstract
The specification defines how a subscriber to a feed of security
events (SETs) may query for, subscribe and receive SETs from a
security event feed. The specification defines a single mandatory-
to-implement method using HTTP Post to deliver events to registered
subscribers and a registry for new methods.
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 April 2, 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
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
Hunt, et al. Expires April 2, 2017 [Page 1]
Internet-Draft draft-hunt-idevent-distribution September 2016
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. Event Notification Process . . . . . . . . . . . . . . . . . 5
3. Event Feeds . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1. Feed Types . . . . . . . . . . . . . . . . . . . . . . . 6
3.2. Feed Metadata . . . . . . . . . . . . . . . . . . . . . . 7
3.3. SCIM Feed Management . . . . . . . . . . . . . . . . . . 9
4. Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . 10
4.1. Subscription Metadata . . . . . . . . . . . . . . . . . . 10
4.2. Subscription State Model . . . . . . . . . . . . . . . . 12
4.3. SCIM Subscription Management . . . . . . . . . . . . . . 14
4.3.1. SCIM Subscription Resource Type . . . . . . . . . . . 14
4.3.2. New Subscription Requests . . . . . . . . . . . . . . 16
4.3.3. Updating Subscriptions . . . . . . . . . . . . . . . 18
4.4. Subscription Verification . . . . . . . . . . . . . . . . 19
4.4.1. Verifying Subscriptions . . . . . . . . . . . . . . . 19
5. Event Delivery . . . . . . . . . . . . . . . . . . . . . . . 20
5.1. Introduction to Event Delivery Methods . . . . . . . . . 20
5.2. Delivery Processing . . . . . . . . . . . . . . . . . . . 21
5.3. HTTP Web Callback Method . . . . . . . . . . . . . . . . 22
5.3.1. Description . . . . . . . . . . . . . . . . . . . . . 22
5.3.2. Delivery Message Format . . . . . . . . . . . . . . . 23
5.3.3. Subscription Verification . . . . . . . . . . . . . . 23
5.3.4. Delivery Procedure . . . . . . . . . . . . . . . . . 25
6. Security Considerations . . . . . . . . . . . . . . . . . . . 27
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27
7.1. Event Notification Mechanism Registry . . . . . . . . . . 27
7.2. SCIM Schema Registration . . . . . . . . . . . . . . . . 27
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.1. Normative References . . . . . . . . . . . . . . . . . . 27
8.2. Informative References . . . . . . . . . . . . . . . . . 28
Appendix A. Contributors . . . . . . . . . . . . . . . . . . . . 29
Appendix B. Acknowledgments . . . . . . . . . . . . . . . . . . 29
Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 29
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 29
1. Introduction and Overview
This specification defines a method by which SETs (see
[I-D.hunt-idevent-token]) can be delivered by publishers to feed
subscribers using HTTP POST [RFC7231] as well as an extension
Hunt, et al. Expires April 2, 2017 [Page 2]
Internet-Draft draft-hunt-idevent-distribution September 2016
registry enabling other methods of delivery. This specification also
defines how subscribers MAY query for available Feeds, and manage
event Subscriptions using SCIM [RFC7644].
The following diagram shows a typical SET Feed Provider and the
services provided to Subscribers. Arrow heads point to the service
provider (the direction of an HTTP request):
+------------+ +-------------+
| |Feeds Catalog | |
| <------------------------+ |
| SCIM | | SET |
| Feed |Subscription Request | Feed |
| Mgmt <------------------------+ Subscriber |
| | | |
| |Subscription Mgmt | |
| <------------------------+ |
| | | |
+------------+ | |
+------------+ | |
| | | |
| FEED |SET Delivery | |
| +------------------------> |
| Provider | | |
| | | |
+------------+ +-------------+
Figure 1: Subscription Management and Delivery
A SET Feed Provider MAY be directly integrated into a source service
that generates events, or it may be a separate service entity that
off-loads event distribution from the event generator to act as its
delegated publisher. For the purposes of this specification, while
SET distribution may be handled separately, this specification will
consider the method for how event generators send events to
publishers as out-of-scope.
The specification uses SCIM protocol [RFC7644] to advertise available
Feeds and to enable Subscribers to request, subscriber to, and manage
Subscriptions.
The specification defines a registry by which multiple SET delivery
methods can be registered. The specification includes a web callback
method which uses HTTP POST [RFC7231] to deliver SETs to Subscribers.
Hunt, et al. Expires April 2, 2017 [Page 3]
Internet-Draft draft-hunt-idevent-distribution September 2016
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 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.hunt-idevent-token].
The following definitions are specific to Identity Event publishing:
Feed Provider
The Feed Provider publishes SETs to be distributed to registered
subscribers.
Feed
A Feed is a URI that describes the set of resources and events
under which events may be issued. An interested subscriber
registers with the feed provider to subscribe to an event URI to
receive SETs associated with a Feed. An individual Feed MAY have
zero or more Subscriptions.
Subscription
A Subscription contains the information needed by a Feed Provider
(e.g. delivery endpoints, credentials) to deliver a Feed of SETs
to an individual Subscriber. A Subscription has ONE Feed.
Notification Mechanism
A URI that describes the chosen event notification mechanism.
When subscribing to a feed, a client may choose a specific
mechanism by which it wishes to receive notification events.
Hunt, et al. Expires April 2, 2017 [Page 4]
Internet-Draft draft-hunt-idevent-distribution September 2016
Subscriber
A Subscriber is an party or security entity registers in the form
of a Subscription to receive SETs from a feed provider that are
part of a Feed.
2. Event Notification Process
When a Security Event occurs, the Feed Provider constructs a SET
token [I-D.hunt-idevent-token] that describes the event. The feed
provider determines the feeds that the event should be distributed
to, and determines which Subscribers need to be notified.
How Feeds are defined and the process by which events are identified
for subscribers is out-of-scope of this specification.
When a SET is available for a subscriber, the Feed Provider attempts
to deliver the SET based on the Subscriber's registered delivery
mechanism:
o The subscriber provided a web-callback endpoint, the publisher
uses an HTTP/1.1 POST to the endpoint to deliver the event to the
registered subscriber;
o Or, the Feed Provider delivers the event through a different
method not defined by this specification.
After a SET is delivered to all subscribers, Feed Providers do not
typically maintain SETs or histories. As such, published SETs SHOULD
be self-validating (e.g. signed).
If delivery to any particular subscriber has been delayed for an
extended period of time, the Feed Provider MAY suspend the
subscription and even stop maintaining outstanding SETs for the
Subscriber at its discretion and available resources. See
subscription "state" in Section 4.1.
Upon receiving a SET, the Subscriber reads the token and validates
it. Based on the content of the token, the subscriber decides what
if any action it needs to take in response to the SET. For example,
in response to a SCIM event [idevent-scim] indicating a changed
resource, the subscriber might perform a SCIM GET request (see
Section 3.4 [RFC7644]) to the affected resource URI in order to
confidentially obtain the current state of the affected SCIM
resource.
The action a Subscriber takes in response to a SET MAY be
substantially different than merely copying the action of the
publisher. A single SET MAY trigger multiple receiver actions. For
Hunt, et al. Expires April 2, 2017 [Page 5]
Internet-Draft draft-hunt-idevent-distribution September 2016
example, upon receiving notification that a user resource has been
added to a group, the Subscriber may first determine that the user
does not exist in the Subscriber's domain. The Subscriber translates
the event into two actions:
1. Retrieve the user (e.g. using SCIM GET) and then provisions the
user locally. After enabling the user,
2. The Subscriber then enables the user for the application
associated with membership in the Feed Publisher's group.
3. Event Feeds
An Feed is defined by a "feedUri". The Feed provides a stream of
SETs to be delivered to registered Subscribers based on a
Subscription. An individual Subscription contains the metadata about
a particular Subscriber regarding their subscription to a particular
"feedUri". Subscription metadata indicates the current subscription
state indicating whether all events are delivered, pending, or
whether delivery has failed. Subscription metadata also describes
the method of event delivery, and any associated security and
configuration information (see Section 4.1 ).
3.1. Feed Types
A Feed Provider MAY define Feeds based on a number of criteria. This
specification does not specify or limit the basis for which a service
provider defines the resources or entities contained in a Feed or how
feed URIs should be specified. Some possible methods for defining
entities covered by a Feed include:
By Resource or Subject
A resource or subject might have its own associated event
notification Feed. For example, a User's mobile application may
require notification of changes or rights defined in a SCIM User
resource associated with the mobile user.
By Endpoint
A Feed might be defined by an endpoint where any event relating to
a resource within an endpoint is delivered to a subscriber. This
type of feed is likely to have many notifications as the number of
resources in an endpoint grows (e.g. a SCIM "/Users") and SHOULD
be used with caution. Typically only privileged partners would be
allowed to use this type of feed. For example, an enterprise
wishes to be notified of all change events to any of its users
assuming all users within the endpoint are related to the
subscribing enterprise.
Hunt, et al. Expires April 2, 2017 [Page 6]
Internet-Draft draft-hunt-idevent-distribution September 2016
By Filter
A Feed might define a collection of resources based on a filter
that describes a set of matching criteria a resource may be
included in a Feed. Note that this type of Feed may require extra
processing by the Feed Provider to determine if any particular SET
event matches the filter criteria. It may also be difficult for
the Feed Provider to notify Subscribers of additions and deletions
of resources to the Feed as the resources in the Feed MAY change
based on the filter itself.
By Group
All entities or resources within some specified group. For
example, all resources within a SCIM Group could be used to define
the resources for which SETs will be issued within a particular
Feed.
The list above is intended to show common use cases for defining
Feeds. How Feeds are defined is out-of-scope of this specification.
3.2. Feed Metadata
Feed metadata consists of the following singular attributes:
feedName
A required string value containing a name for the feed. May be
used in administrative user interfaces to assist subscribers in
Feed selection. The value MUST be unique within a given
administrative domain. This is a REQUIRED attribute.
feedUri
An attribute of type "String" that is a unique URI identifying the
feed. This attribute characteristic "mutability" is "immutable"
and SHALL NOT change once assigned. The value of this attribute
MAY be the SCIM URI for the Feed resource (e.g.
"https://scim.example.com/Feeds/88bc00de"). This is a REQUIRED
attribute.
description
A "String" attribute that describes the purpose of the feed in
human readable form. This is an OPTIONAL attribute.
events
An attribute whose value is a JSON object consisting of multi-
valued JSON attributes where each attribute is the name of a
primary event URI and each value represents an event extension to
the primary event. An empty array SHALL indicate there are no
extensions. When set, Feeds SHALL only provide the primary events
Hunt, et al. Expires April 2, 2017 [Page 7]
Internet-Draft draft-hunt-idevent-distribution September 2016
defined. However, a Feed Provider MAY provide additional
extensions that are not declared. This is an OPTIONAL attribute.
The following is a non-normative example events claim:
"events":{
"urn:ietf:params:scim:event:passwordReset":[
"https://example.com/scim/event/passwordResetExt"],
"https://specs.openid.net/logout":[]
}
Figure 2: Example Events Attribute
In the above example, the feed has two events defined. The first
is a hypothetical password reset, and the second is a hypothetical
OpenID Connect logout. The password reset event has one extension
defined which is "https://example.com/scim/event/
passwordResetExt".
type
An OPTIONAL String attribute that MAY have values such as:
resource Indicates that the Feed is for events related to a
specific resource. In such cases, the value of the attribute
"filter" is set to a specific resource URI or "/Me" .
endpoint Indicates that the Feed is for all events that occur for
resources within a specific endpoint. In such cases, "filter"
is set to an endpoint container for a group of resources (e.g.
"/Users" ).
filter Indicates that events for a Feed will be selected based on
events relating to the set of resources described by a filter.
For example, the value of the attribute "filter" is a SCIM
filter Section 3.4.2 [RFC7644] that describes a condition that
selects a set of resources that match before or after a
resource state change.
group Indicates that events for a Feed will be based on events
relating to the set of resources listed in a group such as a
SCIM GroupSection 4.2 [RFC7643].
The attribute is typically used by the Feed Publisher to determine
the meaning and content of the Feed "filter" attribute.
filter
An OPTIONAL String value containing a filter whose syntax is
defined by a profiling specification (e.g. SCIM) or the Feed
Hunt, et al. Expires April 2, 2017 [Page 8]
Internet-Draft draft-hunt-idevent-distribution September 2016
Publisher. For example in SCIM, a filter MAY be a filter
Section 3.4.2.2 [RFC7644]), a resource, or a SCIM endpoint URI
depending on the value of "type". And, if the SCIM Feed type is
"resource", than the filter value is a URI for a SCIM resource.
The following multi-valued attributes are defined:
deliveryModes
One or more URIs representing the methods of delivery supported by
the Feed Publisher. Values in this attribute correspond to the
Subscription "methodUri" attribute (see Section 4.1).
3.3. SCIM Feed Management
When Feeds are managed within a SCIM service provider [RFC7644], Feed
resources use schema defined in Section 3.2 and use a schema value of
"urn:ietf:params:scim:schemas:event:2.0:Feed". The SCIM
"ResourceType" definition defines the location of the SCIM service
provider endpoint for "Feed" resources.
The Feed "ResourceType" definition is typically defined as follows:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:ResourceType"],
"id": "Feed",
"name": "Feed",
"endpoint": "/Feeds",
"description": "Event Feeds",
"schema": "urn:ietf:params:scim:schemas:event:2.0:Feed",
"schemaExtensions": []
}
Figure 3: SCIM Feed ResourceType Definition
To retrieve information about a "Feed" or a number of feeds,
subscribers or management clients MAY query the "/Feeds" endpoint as
defined in Section 3.4 [RFC7644].
The example below retrieves a specific Feed resource whose "id" is
"548b7c3f77c8bab33a4fef40".
GET /Feeds/88bc00de776d49d5b535ede882d98f74
Host: example.com
Accept: application/scim+json
Authorization: Bearer h480djs93hd8
Figure 4: Example Feed GET Request
Hunt, et al. Expires April 2, 2017 [Page 9]
Internet-Draft draft-hunt-idevent-distribution September 2016
The response below shows an example Feed resource that describes an
available feed.
HTTP/1.1 200 OK
Content-Type: application/scim+json
Location:
https://example.com/v2/Feeds/88bc00de776d49d5b535ede882d98f74
ETag: 9d1c124149f522472e7a511c85b3a31b
{
"schemas":["urn:ietf:params:scim:schemas:event:2.0:Feed"],
"id":"88bc00de776d49d5b535ede882d98f74",
"feedName":"OIDCLogoutFeed",
"feedUri":"https://oidc.example.com/",
"description":"Logout events from oidc.example.com",
"type":"resource",
"events":[
"https://specs.openid.net/logout":[]
]
"meta":{
... SCIM meta attributes ...
}
}
Figure 5: Example Feed GET Response
In the above example (Figure 5) we can observe that the Feed has only
one event type, "https://specs.openid.net/logout" and has no
extensions defined for the event (see empty square brackets). Note
also, that no value for "filter" has been specified suggesting that
the Feed will return events about all subjects of the publisher.
4. Subscriptions
A subscription represents an agreement to deliver SETs from a
specified Feed URI from a Feed Provider to an individual Subscriber
entity also known as the "audience". The method of delivery and the
parameters for delivery are specified a set of parameters called
subscription metadata (see Section 4.1).
4.1. Subscription Metadata
A subscription is defined by the following metadata:
feedUri
A String value containing the URI for a feed supported by the feed
provider. It describes the content of the feed and MAY also be a
Hunt, et al. Expires April 2, 2017 [Page 10]
Internet-Draft draft-hunt-idevent-distribution September 2016
resolvable URI where the feed meta data may be returned as a JSON
object. REQUIRED.
methodUri
A REQUIRED single-valued string which is a URI with a prefix of
"urn:ietf:params:set:method". This specification defines HTTP
POST delivery Section 5:
"urn:ietf:params:set:method:HTTP:webCallback"
in which the Feed Provider delivers events using HTTP POST to a
specified callback URI.
deliveryUri
A URI that describes the location SETs are delivered. Its format
and usage requirements are defined by the associated "methodUri"
specification.
aud
An OPTIONAL URI representing the audience of the subscription.
The value SHALL be the value of "aud" when the subscriber receives
SETs from the feed.
feedJwk
An OPTIONAL public JSON Web Key (see [RFC7517]) that will be used
to sign published SETs. If present, the Subscriber can
authenticate SETs relayed from the Feed Provider.
confidentialJwk
An OPTIONAL Subscriber provided public JSON Web Key (see
[RFC7517]) that MAY be used by the Feed Provider to encrypt SET
tokens for the specified Subscriber.
subStatus
An OPTIONAL value that indicates the current status of a
Subscription:
"on" - indicates the Subscription has been verified and that
the Feed Provider MAY pass SETs to the Subscriber.
"verify" - indicates the Subscription is pending verification.
While in "verify", published SETs SHALL NOT be stored or
delivered to the Subscriber. Once verified, the status returns
to "on".
"paused" - indicates the Feed Provider is temporarily
suspending delivery to Subscriber. While "paused", SETs SHOULD
be retained and delivered when state returns to "on".
Verification is NOT required when returning to "on".
Hunt, et al. Expires April 2, 2017 [Page 11]
Internet-Draft draft-hunt-idevent-distribution September 2016
"off" - indicates that the Subscription is no longer passing
SETs. While in off mode, the subscription metadata is
maintained, but new events are ignored, not delivered or
retained. Before returning to "on", a verification MUST be
performed.
"fail" - indicates that the feed provider was unable to deliver
SETs to the Subscriber for an extended period of time, or due
to a call failure to the registered web call back URI. Unlike
paused status, a failed subscription no longer receives SETs,
nor are they retained by the Feed Provider. Before returning
to "on", a verification MUST be performed.
maxRetries
An OPTIONAL 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 Subscription "subStatus" attribute
is set to "failed".
maxDeliveryTime
An OPTIONAL number indicating the maximum amount of time in
seconds a SET MAY take for successful delivery. Upon reaching the
maximum, the subscription "subStatus" is set to "failed". If
undefined, there is no maximum time.
minDeliveryInterval
An OPTIONAL 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 subscriber
attempts. When in push mode (e.g. HTTP POST), it is the interval
the server will wait before sending a new event or events.
4.2. Subscription State Model
The Subscription attribute "subStatus" tracks the state of any
particular subscription with regards to whether SETs are ready or
able to be delivered. The impact on delivery processing is described
in Table 1.
Hunt, et al. Expires April 2, 2017 [Page 12]
Internet-Draft draft-hunt-idevent-distribution September 2016
The following is the state machine representation of a subscription
on a Feed Publisher. Note that a subscription cannot be made active
until a verification process has been completed. As such, a newly
created subscription begins with state "verify".
+
|
Create
v
+------+ +----------+
| fail +->Restart---->| verify |
+------+ +----+-----+
^ |
|<----Confirm Fail<----+
| Confirm
| v
| +----------+ +--------+
| | +--->Suspend--->| |
+------Timeout<---+ on | | paused |
| |<--Resume<-----+ |
+-+--------+ +--------+
| ^
Disable Enable
v |
+--------+-+
| off |
+----------+
Figure 6: Subscription States at Feed Publisher
In the above diagram, the following actions impact the state of a
Subscription. "subStatus" values are shown in the boxes, and change
based on the following actions:
Create
A Subscriber or an administrator creates a new subscription using
SCIM as described in Section 4.3.2. The initial state is
"verify".
Confirm
The Feed Publisher sends a verification SET to the Subscriber
which confirms with the correct response as described in
Section 4.4. If it succeeds to deliver, the Feed Publisher mail
retry or set state to "on".
Confirm Fail
Hunt, et al. Expires April 2, 2017 [Page 13]
Internet-Draft draft-hunt-idevent-distribution September 2016
If the confirmation fails, the Feed Publisher sets the state to
"fail" requiring administrative action to correct the issue and
"Restart".
Timeout
A Feed Publisher having not being able to deliver a SET over one
or more retries which has reached a limit of attempts
("maxRetries") or time ("maxDeliveryTime") MAY set the
subscription state to "fail". In general, the intention is to
indicate the maximum number of retries or time a Feed Publisher is
able to wait until SET event loss begins to occur resulting in the
failed state.
Restart
An administrator having corrected the failed delivery condition
modifies the Subscription state to "verify" (e.g. see
Section 4.3.3).
Suspend and Resume
A Subscription MAY be suspended and resumed by updating the
Subscription state to "paused" or "on". For example, see see
Section 4.3.3. While suspended, the Feed Publisher MAY retain
undelivered SETs for a period of time. If the Feed Publisher is
no longer able to retain SETs, the subscription state SHOULD be
set to "off" to indicate SETs are being lost.
Enable and Disable
A subscription MAY be disabled and enabled by updating the
Subscription state to "off" or "on". For example, see see
Section 4.3.3. While the Subscription is disabled, all SETs that
occur at the Feed Publisher are lost.
4.3. SCIM Subscription Management
A Feed Publisher MAY use SCIM to support management of subscriptions.
Typically this involves support for the Subscription Resource Type,
and the corresponding SCIM operations to create, update, retrieve
Subscription Resources. For SCIM service provider capability and
schema discovery, see Section 4 [RFC7644].
4.3.1. SCIM Subscription Resource Type
When Subscriptions are managed within a SCIM service provider
[RFC7644], Subscription resources use schema defined in Section 4.1
and use a schema value of
"urn:ietf:params:scim:schemas:event:2.0:Subscription".
Hunt, et al. Expires April 2, 2017 [Page 14]
Internet-Draft draft-hunt-idevent-distribution September 2016
The SCIM Subscription "ResourceType" definition is defined as
follows:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:ResourceType"],
"id": "Subscription",
"name": "Subscription",
"endpoint": "/Subscriptions",
"description": "Subscribers to SET Feeds",
"schema": "urn:ietf:params:scim:schemas:event:2.0:Subscription",
"schemaExtensions": []
}
Figure 7: SCIM Subscription ResourceType Definition
To retrieve information about one or more Subscriptions, Subscribers
or management clients MAY query the "/Subscriptions" endpoint as
defined in Section 3.4 [RFC7644].
The example below retrieves a specific "Subscription" resource whose
"id" is "548b7c3f77c8bab33a4fef40".
GET /Subscriptions/767aad7853d240debc8e3c962051c1c0
Host: example.com
Accept: application/scim+json
Authorization: Bearer h480djs93hd8
Figure 8: Example SCIM Subscription GET Request
Hunt, et al. Expires April 2, 2017 [Page 15]
Internet-Draft draft-hunt-idevent-distribution September 2016
The response below shows an example Feed resource that describes an
available feed.
HTTP/1.1 200 OK
Content-Type: application/scim+json
Location:
https://example.com/v2/Subscriptions/767aad7853d240debc8e3c962051c1c0
{
"schemas":["urn:ietf:params:scim:schemas:event:2.0:Subscription"],
"id":"767aad7853d240debc8e3c962051c1c0",
"feedName":"OIDCLogoutFeed",
"feedUri":
"https://example.com/v2/Feeds/88bc00de776d49d5b535ede882d98f74",
"methodUri":"urn:ietf:params:set:method:HTTP:webCallback",
"deliveryUri":"https://notify.examplerp.com/Events",
"aud":"https://sets.myexamplerp.com",
"subStatus":"pending",
"maxDeliveryTime":3600,
"minDeliveryInterval":0,
"description":"Logout events from oidc.example.com",
"meta":{
... SCIM meta attributes ...
}
}
Figure 9: Example Subscription GET Response
In the above example (Figure 9) observe that the subscription is for
the SCIM "Feed" resource defined at "https://example.com/v2/
Feeds/88bc00de776d49d5b535ede882d98f74". The current subscription
state is "pending" which suggest the Subscription Verification (see
Section 4.4) process has not yet completed. Since there is no value
for "feedJwk", ) or "confidentialJwk", the SETs will be sent without
signing or encryption (plain text).
4.3.2. New Subscription Requests
To subscribe to a feed, the subscriber of management client uses the
SCIM Create operation as defined in Section 3.3 [RFC7644]. SCIM
subscription management service providers MAY have additional schema
requirements which MAY be discovered using SCIM service configuration
and schema discovery, see Section 4 [RFC7644].
Hunt, et al. Expires April 2, 2017 [Page 16]
Internet-Draft draft-hunt-idevent-distribution September 2016
In the following non-normative example, a new Subscription resource
is requested. Note that the SCIM service provider automatically
assigns the "id" attribute.
POST /Subscriptions
Host: example.com
Accept: application/scim+json
Content-Type: application/scim+json
Authorization: Bearer h480djs93hd8
{
"schemas":["urn:ietf:params:scim:schemas:event:2.0:Subscription"],
"feedName":"OIDCLogoutFeed",
"feedUri":
"https://example.com/v2/Feeds/88bc00de776d49d5b535ede882d98f74",
"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 10: Example New Subscription Request in SCIM
Hunt, et al. Expires April 2, 2017 [Page 17]
Internet-Draft draft-hunt-idevent-distribution September 2016
In following non-normative response, the SCIM service provider has
automatically assigned a resource location as well as an "id".
Usually upon creation, the initial value of "subStatus" is "pending"
indicating that the Subscription Verification (see Section 4.4) has
not been completed.
HTTP/1.1 201 Created
Content-Type: application/scim+json
Location:
https://example.com/v2/Subscriptions/767aad7853d240debc8e3c962051c1c0
{
"schemas":["urn:ietf:params:scim:schemas:event:2.0:Subscription"],
"id":"767aad7853d240debc8e3c962051c1c0",
"feedName":"OIDCLogoutFeed",
"feedUri":
"https://example.com/v2/Feeds/88bc00de776d49d5b535ede882d98f74",
"methodUri":"urn:ietf:params:set:method:HTTP:webCallback",
"deliveryUri":"https://notify.examplerp.com/Events",
"aud":"https://sets.myexamplerp.com",
"subStatus":"pending",
"maxDeliveryTime":3600,
"minDeliveryInterval":0,
"description":"Logout events from oidc.example.com",
"meta":{
... SCIM meta attributes ...
}
}
Figure 11: Example Response to Subscription Request
4.3.3. Updating Subscriptions
To modify a Subscription, a Subscriber or authorized management
client MAY use the SCIM PUT operation (see Section 3.5.1 [RFC7644])
and MAY use the SCIM PATCH operation (see Section 3.5.2 [RFC7644]) if
supported by the SCIM Subscription server.