-
Notifications
You must be signed in to change notification settings - Fork 4
/
draft-ietf-secevent-http-poll.xml
1059 lines (945 loc) · 41 KB
/
draft-ietf-secevent-http-poll.xml
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
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='http://xml2rfc.tools.ietf.org/authoring/rfc2629.xslt' ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-secevent-http-poll-12"
ipr="trust200902">
<front>
<title abbrev="draft-ietf-secevent-http-poll">
Poll-Based Security Event Token (SET) Delivery Using HTTP</title>
<author fullname="Annabelle Backman" initials="A." surname="Backman" role="editor">
<organization abbrev="Amazon">Amazon</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<author fullname="Michael B. Jones" initials="M." surname="Jones" role="editor">
<organization abbrev="Microsoft">Microsoft</organization>
<address>
<email>[email protected]</email>
<uri>https://self-issued.info/</uri>
</address>
</author>
<author fullname="Marius Scurtescu" initials="M.S." surname="Scurtescu">
<organization abbrev="Coinbase">Coinbase</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<author fullname="Morteza Ansari" initials="M." surname="Ansari">
<organization abbrev="Cisco">Cisco</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<author fullname="Anthony Nadalin" initials="A." surname="Nadalin">
<organization abbrev="Microsoft">Microsoft</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<date year="2020" month="June" day="24" />
<area>Security</area>
<workgroup>Security Events Working Group</workgroup>
<keyword>Internet-Draft</keyword>
<abstract>
<t>
This specification defines how a series of Security Event Tokens
(SETs) can be delivered to an intended recipient
using HTTP POST over TLS initiated as a poll by the recipient. The
specification also defines how delivery can be assured, subject to
the SET Recipient's need for assurance.
</t>
</abstract>
</front>
<middle>
<section anchor="intro" title="Introduction and Overview" toc="default">
<t>
This specification defines how a stream of
Security Event Tokens (SETs) <xref target="RFC8417"/>
can be transmitted to an intended
SET Recipient using HTTP <xref target="RFC7231"/>
over TLS. The specification defines a method to poll for SETs
using HTTP POST.
This is an alternative SET delivery method to the one defined in
<xref target="I-D.ietf-secevent-http-push"/>.
</t>
<t>
Poll-based SET delivery is intended for scenarios where all of
the following apply:
<list style="symbols">
<t>The recipient of the SET is capable of making outbound HTTP requests.</t>
<t>
The transmitter is capable of hosting a TLS-enabled HTTP endpoint that is accessible
to the recipient.
</t>
<t>
The transmitter and recipient are willing to exchange data with one another.
</t>
</list>
In some scenarios, either push-based or poll-based delivery could be used,
and in others, only one of them would be applicable.
</t>
<t>
A mechanism for exchanging configuration metadata such as endpoint URLs,
cryptographic keys,
and possible implementation constraints such as buffer size limitations
between the transmitter and recipient is
out of scope for this specification. How SETs are defined and the process
by which security events are identified for SET Recipients are specified in
<xref target="RFC8417"/>.
</t>
<section anchor="notat" title="Notational Conventions" toc="default">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
"MAY", and "OPTIONAL" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/>
when, and only when, they appear in all capitals, as shown here.
</t>
<t>
Throughout this document, all figures may contain spaces and extra
line wrapping for readability and due to space limitations.
</t>
</section>
<section anchor="defs" title="Definitions" toc="default">
<t>
This specification utilizes terminology defined in <xref target="RFC8417"/>
and <xref target="I-D.ietf-secevent-http-push"/>.
</t>
</section>
</section>
<section anchor="Delivery" title="SET Delivery">
<t>
When a SET is available for a SET Recipient, the SET Transmitter
queues the SET in a buffer so that
a SET Recipient can poll for SETs using HTTP POST.
</t>
<t>
In poll-based SET delivery using HTTP over TLS, zero or more SETs are
delivered in a JSON <xref target="RFC8259"/> document
to a SET Recipient in response to an HTTP POST request to the
SET Transmitter. Then in a following request, the SET Recipient
acknowledges received SETs and can poll for more. All requests and
responses are JSON documents and use a
<spanx style="verb">Content-Type</spanx> of
<spanx style="verb">application/json</spanx>, as described in
<xref target="httpPoll"/>.
</t>
<t>After successful (acknowledged) SET delivery, SET
Transmitters are not required to retain or record SETs for
retransmission. Once a SET is acknowledged, the SET Recipient SHALL be
responsible for retention, if needed.
Transmitters may also discard undelivered SETs under deployment-specific conditions,
such as if they have not been polled for over too long a period of time
or if an excessive amount of storage is needed to retain them.
</t>
<t>
Upon receiving a SET, the SET Recipient reads the SET and validates
it in the manner described in Section 2 of <xref target="I-D.ietf-secevent-http-push"/>.
The SET Recipient MUST acknowledge receipt to the SET Transmitter,
and SHOULD do so in a timely fashion, as described in <xref target="pollRequest"/>.
The SET Recipient SHALL NOT use the event acknowledgement mechanism
to report event errors other than those relating to the parsing and
validation of the SET.
</t>
<section anchor="httpPoll" title="Polling Delivery using HTTP">
<t>This method allows a SET Recipient to use HTTP POST
(Section 4.3.3 of <xref target="RFC7231"/>) to acknowledge
SETs and to check for and receive zero or more SETs. Requests
MAY be made at a periodic interval (short polling) or requests
MAY wait, pending availability of new SETs using long polling,
per Section 2 of <xref target="RFC6202"/>.
Note that short polling will result in retrieving zero or more SETs
whereas long polling will typically result in retrieving one or more SETs
unless a timeout occurs.
</t>
<t>The delivery of SETs in this method is facilitated by HTTP
POST requests initiated by the SET Recipient in which:<list style="symbols">
<t>The SET Recipient makes a request for available SETs
using an HTTP POST to a pre-arranged endpoint provided by the SET
Transmitter or,</t>
<t>after validating previously received SETs, the SET Recipient
initiates another poll request using HTTP POST that includes
acknowledgement of previous SETs and requests the next batch
of SETs.</t>
</list></t>
<t>The purpose of the acknowledgement is to inform the
SET Transmitter that delivery has succeeded and
redelivery is no longer required.
Before acknowledgement, SET Recipients validate the received SETs
and retain them in a manner appropriate to the recipient's
requirements. The level and method of retention of SETs
by SET Recipients is out of scope of this specification.</t>
</section>
<section anchor="pollReq" title="Polling HTTP Request">
<t>When initiating a poll request, the SET Recipient constructs
a JSON document that consists of polling request parameters
and SET acknowledgement parameters in the form of JSON objects.
</t>
<t>When making a request, the HTTP <spanx style="verb">Content-Type</spanx> header field
is set to <spanx style="verb">application/json</spanx>.</t>
<t>The following JSON object members are used in a polling request:
<list style="hanging">
<t hangText="Request Processing Parameters"><list style="hanging">
<t hangText="maxEvents"><vspace/>An OPTIONAL integer value
indicating the maximum number of unacknowledged SETs to be returned.
The SET Transmitter SHOULD NOT send more SETs than the specified maximum.
If more than the maximum number of SETs
are available, the SET Transmitter determines which to return first;
the oldest SETs available MAY returned first,
or another selection algorithm MAY be used,
such as prioritizing SETs in some manner that makes sense for the use case.
first. A value of <spanx style="verb">0</spanx> MAY be used by
SET Recipients that would like to perform an acknowledge-only
request. This enables the Recipient to use separate HTTP requests
for acknowledgement and reception of SETs.
If this parameter is omitted, no limit is placed on
the number of SETs to be returned.
</t>
<t hangText="returnImmediately"><vspace/>An OPTIONAL JSON
boolean value that indicates the SET Transmitter SHOULD return
an immediate response even if no results are available
(short polling). The default value is <spanx style="verb">false</spanx>,
which indicates the request is to be treated as an HTTP Long Poll,
per Section 2 of <xref target="RFC6202"/>. The timeout for the
request is part of the configuration between the participants, which is out of
scope of this specification.</t>
</list></t>
<t hangText="SET Acknowledgment Parameters"><list style="hanging">
<t hangText="ack">
<vspace/>
A JSON array of strings whose values
are the <spanx style="verb">jti</spanx> <xref target="RFC7519"/> values of
successfully received SETs that are being acknowledged.
If there are no outstanding SETs to acknowledge, this member is omitted
or contains an empty array.
Once a SET has been acknowledged, the SET Transmitter is released from
any obligation to retain the SET.
</t>
<t hangText="setErrs">
<vspace/>
A JSON object with one or more members whose keys
are the <spanx style="verb">jti</spanx> values of
invalid SETs received.
The values of these objects are themselves JSON objects that
describe the errors detected using the
<spanx style="verb">err</spanx> and
<spanx style="verb">description</spanx> values
specified in <xref target="errorResponse"/>.
If there are no outstanding SETs with errors to report, this member is omitted
or contains an empty JSON object.
</t>
</list></t>
</list>
</t>
</section>
<section anchor="pollResp" title="Polling HTTP Response">
<t>In response to a poll request, the SET Transmitter checks for
available SETs and responds with a JSON document containing
the following JSON object members:
<list style="hanging">
<t hangText="sets"><vspace/>A JSON object containing zero or more SETs being returned.
Each member name
is the <spanx style="verb">jti</spanx> of a SET to
be delivered and its value is a JSON string representing the
corresponding SET. If there are no
outstanding SETs to be transmitted, the JSON object SHALL be
empty.
Note that both SETs being transmitted for the first time and
SETs that are being re-transmitted after not having been acknowledged
are communicated here.
</t>
<t hangText="moreAvailable"><vspace/>A JSON boolean value that
indicates if more unacknowledged SETs are available to be returned.
This member MAY be omitted, with the meaning being the same as
including it with the boolean value <spanx style="verb">false</spanx>.
</t>
</list>
</t>
<t>When making a response, the HTTP <spanx style="verb">Content-Type</spanx> header field
is set to <spanx style="verb">application/json</spanx>.</t>
</section>
<section anchor="pollRequest" title="Poll Request">
<t>The SET Recipient performs an HTTP POST (see
Section 4.3.4 of <xref target="RFC7231"/>) to a pre-arranged
polling endpoint URI to check for SETs that are available.
Because the SET Recipient has no prior SETs to
acknowledge, the <spanx style="verb">ack</spanx> and
<spanx style="verb">setErrs</spanx> request parameters are omitted.</t>
<t>
After a period of time configured in an out-of-band manner between the SET
Transmitter and Recipient, a SET Transmitter MAY redeliver SETs
it has previously delivered. The SET Recipient SHOULD accept
repeat SETs and acknowledge the SETs regardless of whether the
Recipient believes it has already acknowledged the SETs previously.
A SET Transmitter MAY limit the number of times it attempts to
deliver a SET.
</t>
<t>If the SET Recipient has received SETs from the
SET Transmitter, the SET Recipient parses and validates that
received SETs meet its own requirements and SHOULD acknowledge
receipt in a timely fashion (e.g., seconds or minutes) so that the SET
Transmitter can mark the SETs as received. SET Recipients SHOULD
acknowledge receipt before taking any local actions based on
the SETs to avoid unnecessary delay in acknowledgement, where
possible.</t>
<t>Poll requests have three variations:
<list style="hanging">
<t hangText="Poll-Only"><vspace/>In which a SET Recipient
asks for the next set of events where no previous SET deliveries
are acknowledged (such as in the initial poll request).</t>
<t hangText="Acknowledge-Only"><vspace/>In which a SET
Recipient sets the <spanx style="verb">maxEvents</spanx>
value to <spanx style="verb">0</spanx> along with
<spanx style="verb">ack</spanx> and
<spanx style="verb">setErrs</spanx> members indicating the
SET Recipient is acknowledging previously received SETs and
does not want to receive any new SETs in response to the
request. </t>
<t hangText="Combined Acknowledge and Poll"><vspace/>In
which a SET Recipient is both acknowledging previously
received SETs using the <spanx style="verb">ack</spanx> and
<spanx style="verb">setErrs</spanx> members
and will wait for the next group of SETs in the SET Transmitters
response.</t>
</list></t>
<section anchor="PollOnlyRequest" title="Poll-Only Request">
<t>In the case where no SETs were received in a previous poll (see
<xref target="emptyPollResponse"/>), the SET Recipient simply
polls without acknowledgement parameters (<spanx style="verb">ack</spanx>
and <spanx style="verb">setErrs</spanx>).</t>
<figure anchor="pollInitRequest" title="Example Initial Poll Request">
<preamble>
The following is a non-normative example request made by a SET Recipient
that has no outstanding SETs to acknowledge and is polling
for available SETs at the endpoint
<spanx style="verb">https://notify.idp.example.com/Events</spanx>:
</preamble>
<artwork><![CDATA[
POST /Events HTTP/1.1
Host: notify.idp.example.com
Content-Type: application/json
{
"returnImmediately": true
}
]]></artwork>
</figure>
<t>A SET Recipient can poll using default parameter values by passing
an empty JSON object.</t>
<figure anchor="pollDefaultRequest" title="Example Default Poll Request">
<preamble>The following is a non-normative example default poll request to the
endpoint <spanx style="verb">https://notify.idp.example.com/Events</spanx>:</preamble>
<artwork><![CDATA[
POST /Events HTTP/1.1
Host: notify.idp.example.com
Content-Type: application/json
{}
]]></artwork>
</figure>
</section>
<section anchor="AckOnlyRequest" title="Acknowledge-Only Request">
<t>In this variation, the SET Recipient acknowledges previously
received SETs and indicates it does not want to receive SETs in
response by setting the <spanx style="verb">maxEvents</spanx>
value to <spanx style="verb">0</spanx>.
This variation might be used, for instance, when a SET Recipient needs to
acknowledge received SETs independently (e.g., on separate threads)
from the process of receiving SETs.
</t>
<t>
If the poll needs to return immediately, then <spanx style="verb">returnImmediately</spanx>
MUST also be present with the value <spanx style="verb">true</spanx>.
If it is <spanx style="verb">false</spanx>, then a long poll will still occur
until an event is ready to be returned, even though no events will be returned.
</t>
<figure anchor="pollAckOnly" title="Example Acknowledge-Only Request">
<preamble>The following is a non-normative example poll request with acknowledgement
of SETs received (for example as shown in
<xref target="pollResponse"/>):</preamble>
<artwork><![CDATA[
POST /Events HTTP/1.1
Host: notify.idp.example.com
Content-Type: application/json
{
"ack": [
"4d3559ec67504aaba65d40b0363faad8",
"3d0c3cf797584bd193bd0fb1bd4e7d30"
],
"maxEvents": 0,
"returnImmediately": true
}
]]></artwork>
</figure>
</section>
<section anchor="pollAck" title="Poll with Acknowledgement">
<t>This variation allows a recipient thread to simultaneously
acknowledge previously received SETs and wait for the next
group of SETs in a single request.</t>
<figure anchor="pollGoodResponse" title="Example Poll with Acknowledgement and No Errors">
<preamble>The following is a non-normative example poll with acknowledgement
of the SETs received in <xref target="pollResponse"/>:</preamble>
<artwork><![CDATA[
POST /Events HTTP/1.1
Host: notify.idp.example.com
Content-Type: application/json
{
"ack": [
"4d3559ec67504aaba65d40b0363faad8",
"3d0c3cf797584bd193bd0fb1bd4e7d30"
],
"returnImmediately": false
}
]]></artwork>
</figure>
<t>In the above acknowledgement, the SET Recipient has acknowledged
receipt of two SETs and has indicated it wants to wait until
the next SET is available.</t>
</section>
<section anchor="pollAckErr" title="Poll with Acknowledgement and Errors">
<t>In the case where errors were detected in previously
delivered SETs, the SET Recipient MAY use the
<spanx style="verb">setErrs</spanx> member to communicate the errors
in the following poll request.
</t>
<figure anchor="pollErrorResponse"
title="Example Poll Acknowledgement with Error">
<preamble>The following is a non-normative example of a response
acknowledging one successfully received SET and one SET with an error
from the two SETs received in <xref target="pollResponse"/>:</preamble>
<artwork><![CDATA[
POST /Events HTTP/1.1
Host: notify.idp.example.com
Content-Language: en-US
Content-Type: application/json
{
"ack": ["3d0c3cf797584bd193bd0fb1bd4e7d30"],
"setErrs": {
"4d3559ec67504aaba65d40b0363faad8": {
"err": "authentication_failed",
"description": "The SET could not be authenticated"
}
},
"returnImmediately": true
}
]]></artwork>
</figure>
</section>
</section>
<section anchor="pollGetAck"
title="Poll Response">
<t>In response to a valid poll request, the service provider MAY
respond immediately if SETs are available to be delivered.
If no SETs are available at the time of the request, the
SET Transmitter SHALL delay responding until a SET is
available or the timeout interval has elapsed unless the poll request parameter
<spanx style="verb">returnImmediately</spanx> is present with the value <spanx style="verb">true</spanx>.
</t>
<t>As described in <xref target="pollResp"/>, a JSON document
is returned containing members including
<spanx style="verb">sets</spanx>, which SHALL contain zero or more
SETs.</t>
<figure anchor="pollResponse" title="Example Poll Response">
<preamble>The following is a non-normative example response to
the request shown in <xref target="pollRequest"/>. This example
shows two SETs being returned:</preamble>
<artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/json
{
"sets": {
"4d3559ec67504aaba65d40b0363faad8":
"eyJhbGciOiJub25lIn0.
eyJqdGkiOiI0ZDM1NTllYzY3NTA0YWFiYTY1ZDQwYjAzNjNmYWFkOCIsImlhdCI6MTQ
1ODQ5NjQwNCwiaXNzIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tIiwiYXVkIjpbIm
h0dHBzOi8vc2NpbS5leGFtcGxlLmNvbS9GZWVkcy85OGQ1MjQ2MWZhNWJiYzg3OTU5M
2I3NzU0IiwiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIx
ZDA4NjQxZDc2NzZlZTciXSwiZXZlbnRzIjp7InVybjppZXRmOnBhcmFtczpzY2ltOmV
2ZW50OmNyZWF0ZSI6eyJyZWYiOiJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vVXNlcn
MvNDRmNjE0MmRmOTZiZDZhYjYxZTc1MjFkOSIsImF0dHJpYnV0ZXMiOlsiaWQiLCJuY
W1lIiwidXNlck5hbWUiLCJwYXNzd29yZCIsImVtYWlscyJdfX19.",
"3d0c3cf797584bd193bd0fb1bd4e7d30":
"eyJhbGciOiJub25lIn0.
eyJqdGkiOiIzZDBjM2NmNzk3NTg0YmQxOTNiZDBmYjFiZDRlN2QzMCIsImlhdCI6MTQ
1ODQ5NjAyNSwiaXNzIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tIiwiYXVkIjpbIm
h0dHBzOi8vamh1Yi5leGFtcGxlLmNvbS9GZWVkcy85OGQ1MjQ2MWZhNWJiYzg3OTU5M
2I3NzU0IiwiaHR0cHM6Ly9qaHViLmV4YW1wbGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIx
ZDA4NjQxZDc2NzZlZTciXSwic3ViIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL1V
zZXJzLzQ0ZjYxNDJkZjk2YmQ2YWI2MWU3NTIxZDkiLCJldmVudHMiOnsidXJuOmlldG
Y6cGFyYW1zOnNjaW06ZXZlbnQ6cGFzc3dvcmRSZXNldCI6eyJpZCI6IjQ0ZjYxNDJkZ
jk2YmQ2YWI2MWU3NTIxZDkifSwiaHR0cHM6Ly9leGFtcGxlLmNvbS9zY2ltL2V2ZW50
L3Bhc3N3b3JkUmVzZXRFeHQiOnsicmVzZXRBdHRlbXB0cyI6NX19fQ."
}
}
]]></artwork>
</figure>
<t>In the above example, two SETs whose <spanx style="verb">jti</spanx> values
are <spanx style="verb">4d3559ec67504aaba65d40b0363faad8</spanx>
and <spanx style="verb">3d0c3cf797584bd193bd0fb1bd4e7d30</spanx>
are delivered.</t>
<figure anchor="emptyPollResponse" title="Example No SETs Poll Response">
<preamble>The following is a non-normative example response to
the request shown in <xref target="PollOnlyRequest"/>, which indicates that no new
SETs or unacknowledged SETs are available:</preamble>
<artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/json
{
"sets": {}
}
]]></artwork>
</figure>
<t>Upon receiving the JSON document (e.g., as shown in
<xref target="pollResponse"/>), the SET Recipient parses
and verifies the received SETs and notifies the SET Transmitter
of successfully received SETs and SETs with errors
via the next poll request to the SET Transmitter, as described in
<xref target="pollAck"/> or <xref target="pollAckErr"/>.</t>
<section anchor="PollErrorResponse" title="Poll Error Response">
<t>In the event of a general HTTP error condition in the context of
processing a poll request, the service provider responds with
the applicable HTTP Response Status Code, as defined in Section 6 of
<xref target="RFC7231" />.</t>
<t>Service providers MAY respond to any invalid poll request with an HTTP Response
Status Code of 400 (Bad Request) even when a more specific code might apply, for
example if the service provider deemed that a more specific code presented an
information disclosure risk. When no more specific code might apply, the service
provider SHALL respond to an invalid poll request with an HTTP Status Code of 400.</t>
<t>
The response body for responses to invalid poll requests is left undefined,
and its contents SHOULD be ignored.
</t>
<figure title="Example Poll Error Response">
<preamble>
The following is a non-normative example of a response to an invalid poll request:
</preamble>
<artwork><![CDATA[
HTTP/1.1 400 Bad Request
]]></artwork>
</figure>
</section>
</section>
<section anchor="errorResponse" title="Error Response Handling">
<t>
If a SET is invalid,
error codes from the IANA "Security Event Token Delivery Error Codes"
registry established by <xref target="I-D.ietf-secevent-http-push"/>
are used in error responses.
As described in Section 2.3 of <xref target="I-D.ietf-secevent-http-push"/>,
an error response is a JSON object providing details about the error
that includes the following name/value pairs:
</t>
<t>
<list style="hanging">
<t hangText="err"><vspace />
A value from the
IANA "Security Event Token Delivery Error Codes" registry
that identifies the error.
</t>
<t hangText="description"><vspace />
A human-readable string that provides
additional diagnostic information.
</t>
</list>
</t>
<t>
When included as part of a batch of SETs, the above JSON is included
as part of the <spanx style="verb">setErrs</spanx> member, as
defined in <xref target="pollReq"/> and <xref target="pollAckErr"/>.
</t>
<t>
When the SET Recipient includes one or more error responses in a request to
the SET Transmitter, it must also include in the request a
<spanx style="verb">Content-Language</spanx> header field whose value indicates the
language of the error descriptions included in the request. The method of
language selection in the case when the SET Recipient can provide error messages
in multiple languages is out of scope for this specification.
</t>
</section>
</section>
<section anchor="aa" title="Authentication and Authorization" toc="default">
<t>The SET delivery method described in this specification is
based upon HTTP over TLS <xref target="RFC2818"/> and standard
HTTP authentication and authorization schemes, as per
<xref target="RFC7235" />.
The TLS server certificate MUST be validated using DNS-ID <xref target="RFC6125"/>
and/or DANE <xref target="RFC6698"/>.
As per Section 4.1 of <xref target="RFC7235"/>, a SET
delivery endpoint SHALL indicate supported HTTP authentication
schemes via the <spanx style="verb">WWW-Authenticate</spanx> header field
when using HTTP authentication.
</t>
<t>
Authorization for the eligibility to provide actionable SETs can be determined by
using the identity of the SET Issuer,
validating the identity of the SET Transmitter,
or via other employed authentication methods.
Likewise, the SET Transmitter may choose to validate the identity of the SET Recipient,
perhaps using mutual TLS.
Because SETs are
not commands, SET Recipients are free to ignore SETs that
are not of interest after acknowledging their receipt.</t>
</section>
<section anchor="Security" title="Security Considerations" toc="default">
<section anchor="payloadAuthentication" title="Authentication Using Signed SETs">
<t>
JWS signed SETs can be
used (see <xref target="RFC7515"/> and Section 5 of <xref target="RFC8417"/>)
to enable the SET Recipient
to validate that the SET Issuer is authorized to provide actionable SETs.
</t>
</section>
<section anchor="HTTP" title="HTTP Considerations">
<t>SET delivery depends on the use of Hypertext Transfer Protocol and is thus
subject to the security considerations of HTTP Section 9 of <xref
target="RFC7230"/> and its related specifications.</t>
</section>
<section anchor="Confidentiality" title="Confidentiality of SETs">
<t>
SETs may contain sensitive information, including Personally Identifiable Information (PII),
or be distributed through third parties.
In such cases, SET Transmitters and
SET Recipients MUST protect the confidentiality of the SET contents.
In some use cases, using TLS to secure the transmitted SETs will be sufficient.
In other use cases,
encrypting the SET as described in JWE <xref target="RFC7516"/> will also be required.
The Event delivery endpoint MUST support at least TLS
version 1.2 <xref target="RFC5246"/> and SHOULD support the newest version
of TLS that meets its security requirements,
which as of the time of this publication is TLS 1.3 <xref target="RFC8446"/>.
The client MUST
perform a TLS/SSL server certificate check using DNS-ID <xref target="RFC6125"/>
and/or DANE <xref target="RFC6698"/>.
How a SET Recipient determines the expected service identity to match the SET
Transmitter's server certificate against is out of scope for this document.
The implementation security considerations for TLS in
"Recommendations for Secure Use of TLS and DTLS" <xref target="RFC7525"/>
MUST be followed.
</t>
</section>
<section anchor="AT" title="Access Token Considerations">
<t>
If HTTP Authentication is performed using OAuth access tokens <xref target="RFC6749"/>,
implementers MUST take into account the threats
and countermeasures documented in Section 8 of <xref
target="RFC7521"/>.</t>
<section anchor="bearerConsiderations"
title="Bearer Token Considerations">
<t>
Transmitting Bearer tokens <xref target="RFC6750"/> using TLS helps prevent their interception.
</t>
<t>Bearer tokens SHOULD have a limited lifetime that can be determined
directly or indirectly (e.g., by checking with a validation service)
by the service provider. By expiring tokens, clients are forced to
obtain a new token (which usually involves re-authentication) for
continued authorized access. For example, in OAuth 2.0, a client MAY use
an OAuth refresh token to obtain a new bearer token after authenticating
to an authorization server, per Section 6 of <xref
target="RFC6749"/>.</t>
<t>Implementations supporting OAuth bearer tokens need to factor in
security considerations of this authorization method <xref
target="RFC7521"/>. Since security is only as good
as the weakest link, implementers also need to consider authentication
choices coupled with OAuth bearer tokens. The security considerations
of the default authentication method for OAuth bearer tokens, HTTP
Basic, are well documented in <xref
target="RFC7617"/>, therefore implementers
are encouraged to prefer stronger authentication methods.
</t>
</section>
</section>
</section>
<section anchor="Privacy" title="Privacy Considerations">
<t>SET Transmitters should attempt to deliver SETs that are
targeted to the specific business and
protocol needs of subscribers.</t>
<t>When sharing personally identifiable information or information
that is otherwise considered confidential to affected users, SET
Transmitters and Recipients MUST have the appropriate legal agreements
and user consent or terms of service in place.
Furthermore, data that needs confidentiality protection MUST be encrypted,
at least with TLS
and sometimes also using JSON Web Encryption (JWE) <xref target="RFC7516"/>.
</t>
<t>
In some cases, subject identifiers themselves may be considered sensitive
information, such that their inclusion within a SET may be considered a violation
of privacy. SET Issuers and SET Transmitters should consider the ramifications of sharing a
particular subject identifier with a SET Recipient (e.g., whether doing so could
enable correlation and/or de-anonymization of data) and choose appropriate
subject identifiers for their use cases.
</t>
</section>
<section anchor="IANA" title="IANA Considerations">
<t>
This specification requires no IANA actions.
</t>
</section>
</middle>
<back>
<references title="Normative References">
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml' ?>
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2818.xml' ?><!-- HTTP over TLS -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5246.xml' ?><!-- TLS 1.2 -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6125.xml' ?><!-- TLS Certs -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6698.xml' ?><!-- DANE -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7231.xml' ?><!-- HTTP Semantics -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7515.xml' ?><!-- JWS -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7516.xml' ?><!-- JWE -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml' ?><!-- JWT -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7521.xml' ?><!-- Client Auth Assertions -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7525.xml' ?><!-- TLS Recos -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml' ?><!-- RFC 2119 bis -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8259.xml' ?><!-- JSON -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8417.xml' ?><!-- SET -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml' ?><!-- TLS 1.3 -->
<?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-secevent-http-push-12.xml" ?>
</references>
<references title="Informative References">
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6202.xml' ?><!-- HTTP Long Polling -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6749.xml' ?><!-- OAuth -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6750.xml' ?><!-- OAuth Bearer -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7230.xml' ?><!-- HTTP Msg -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7235.xml' ?><!-- HTTP Auth -->
<?rfc include='http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7617.xml' ?><!-- Basic Auth Update -->
</references>
<section anchor="Unencrypted" title="Unencrypted Transport Considerations">
<t>
Earlier versions of this specification made the use of TLS optional
and described security and privacy considerations resulting from use
of unencrypted HTTP as the underlying transport.
When the working group decided to mandate usage HTTP over TLS,
it also decided to preserve the description of these considerations
in a non-normative manner.
</t>
<t>
The considerations for using unencrypted HTTP with this protocol
are the same as those described in Appendix A of <xref target="I-D.ietf-secevent-http-push"/>,
and are therefore not repeated here.
</t>
</section>
<section anchor="Others" title="Other Streaming Specifications">
<t>[[ NOTE TO THE RFC EDITOR: This section to be removed prior to publication ]]</t>
<t>
A number of pub/sub, queuing, and streaming systems were reviewed
as possible solutions or as input to the current draft.
These are listed in Appendix B of <xref target="I-D.ietf-secevent-http-push"/>,
and are therefore not repeated here.
</t>
</section>
<section anchor="Acknowledgments" title="Acknowledgments">
<t>
The editors would like to thank the members of the SCIM working group, which
began discussions of provisioning events starting with draft-hunt-scim-notify-00 in 2015.
We would like to thank Phil Hunt and the other the authors of draft-ietf-secevent-delivery-02,
upon which this specification is based.
We would like to thank the participants in the SecEvents
working group for their contributions to this specification.
</t>
<t>
Additionally, we would like to thank the following individuals for their reviews of the specification:
Roman Danyliw,
Martin Duke,
Benjamin Kaduk,
Erik Kline,
Murray Kucherawy,
Warren Kumari,
Barry Leiba,
Mark Nottingham,
Alvaro Retana,
Yaron Sheffer,
Valery Smyslov,
Robert Sparks,
Éric Vyncke,
and
Robert Wilton.
</t>
</section>
<section anchor="History" title="Change Log">
<t>[[ to be removed by the RFC Editor before publication as an RFC ]]</t>
<t>
Draft 00 - AB - Based on draft-ietf-secevent-delivery-02 with the
following additions:
<list style="symbols">
<t>Renamed to "Poll-Based SET Token Delivery Using HTTP"</t>
<t>Removed references to the HTTP Push delivery method.</t>
</list>
</t>
<t>
Draft 01 - mbj:
<list style="symbols">
<t>
Addressed problems identified in my 18-Jul-18 review message titled
"Issues for both the Push and Poll Specs".
</t>
<t>
Changes to align terminology with RFC 8417, for instance,
by using the already defined term SET Recipient rather than SET Receiver.
</t>
<t>
Applied editorial and minor normative corrections.
</t>
<t>
Updated Marius' contact information.
</t>
<t>
Begun eliminating redundancies between this specification and
"Push-Based Security Event Token (SET) Delivery Using HTTP"
<xref target="I-D.ietf-secevent-http-push"/>,
referencing, rather that duplicating common normative text.
</t>
</list>
</t>
<t>
Draft 02 - mbj:
<list style="symbols">
<t>
Removed vestigial language remaining from when the push and poll
delivery methods were defined in a common specification.
</t>
<t>
Replaced remaining uses of the terms Event Transmitter and Event Recipient
with the correct terms SET Transmitter and SET Recipient.
</t>
<t>
Removed uses of the unnecessary term "Event Stream".
</t>
<t>
Removed dependencies between the semantics of
<spanx style="verb">maxEvents</spanx> and <spanx style="verb">returnImmediately</spanx>.
</t>
<t>
Said that PII in SETs is to be encrypted with TLS, JWE, or both.
</t>
<t>
Corrected grammar and spelling errors.
</t>
</list>
</t>
<t>
Draft 03 - mbj:
<list style="symbols">
<t>
Corrected uses of "attribute" to "member" when describing JSON objects.
</t>
<t>
Further alignment with the push draft.
</t>
</list>
</t>
<t>
Draft 04 - AB + mbj
<list style="symbols">
<t>
Referenced SET Transmitter definition in http-push.
</t>
<t>
Removed incorrect normative text regarding SET construction.
</t>
<t>
Consolidated general out-of-scope items under Introduction.
</t>
<t>
Removed unnecessary HTTP headers in examples and added Content-Type.
</t>
<t>
Added Content-Language requirement for error descriptions, aligning with http-push.
</t>
<t>
Stated that bearer tokens SHOULD have a limited lifetime.
</t>
<t>
Minor editorial fixes.
</t>
</list>
</t>
<t>
Draft 05 - AB + mbj
<list style="symbols">
<t>
Added normative text defining how to respond to invalid poll requests.
</t>
<t>
Addressed shepherd comments by Yaron Sheffer.
</t>
</list>
</t>
<t>
Draft 06 - mbj
<list style="symbols">
<t>
Addressed nits identified by the idnits tool.
</t>
</list>
</t>
<t>
Draft 07 - mbj
<list style="symbols">
<t>