idnits 2.17.1 draft-ietf-secevent-http-poll-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 5 instances of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 16, 2018) is 2174 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC5988' is defined on line 791, but no explicit reference was found in the text == Unused Reference: 'RFC7517' is defined on line 811, but no explicit reference was found in the text == Unused Reference: 'RFC7519' is defined on line 815, but no explicit reference was found in the text == Unused Reference: 'RFC7516' is defined on line 871, but no explicit reference was found in the text == Outdated reference: A later version (-13) exists of draft-ietf-secevent-token-00 ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 5988 (Obsoleted by RFC 8288) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) ** Obsolete normative reference: RFC 7159 (Obsoleted by RFC 8259) ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7525 (Obsoleted by RFC 9325) -- Obsolete informational reference (is this intentional?): RFC 7230 (Obsoleted by RFC 9110, RFC 9112) -- Obsolete informational reference (is this intentional?): RFC 7235 (Obsoleted by RFC 9110) Summary: 6 errors (**), 0 flaws (~~), 7 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Backman, Ed. 3 Internet-Draft Amazon 4 Intended status: Standards Track M. Jones, Ed. 5 Expires: October 18, 2018 Microsoft 6 P. Hunt, Ed. 7 Oracle 8 M. Scurtescu 9 Google 10 M. Ansari 11 Cisco 12 A. Nadalin 13 Microsoft 14 April 16, 2018 16 Poll-Based SET Token Delivery Using HTTP 17 draft-ietf-secevent-http-poll-00 19 Abstract 21 This specification defines how a series of security event tokens 22 (SETs) may be delivered to a previously registered receiver using 23 HTTP POST over TLS initiated as a poll by the receiver. The 24 specification also defines how delivery can be assured subject to the 25 SET Token Receiver's need for assurance. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at https://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on October 18, 2018. 44 Copyright Notice 46 Copyright (c) 2018 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (https://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction and Overview . . . . . . . . . . . . . . . . . . 2 62 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 63 1.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 3 64 2. SET Event Stream Protocol . . . . . . . . . . . . . . . . . . 4 65 2.1. Event Delivery Process . . . . . . . . . . . . . . . . . 4 66 2.2. Polling Delivery using HTTP . . . . . . . . . . . . . . . 5 67 2.2.1. Polling HTTP Request Attributes . . . . . . . . . . . 6 68 2.2.2. Polling HTTP Response Attributes . . . . . . . . . . 7 69 2.2.3. Poll Request . . . . . . . . . . . . . . . . . . . . 7 70 2.2.4. Poll Response . . . . . . . . . . . . . . . . . . . . 11 71 2.3. Error Response Handling . . . . . . . . . . . . . . . . . 13 72 3. Authentication and Authorization . . . . . . . . . . . . . . 14 73 3.1. Use of Tokens as Authorizations . . . . . . . . . . . . . 15 74 4. Security Considerations . . . . . . . . . . . . . . . . . . . 15 75 4.1. Authentication Using Signed SETs . . . . . . . . . . . . 15 76 4.2. HTTP Considerations . . . . . . . . . . . . . . . . . . . 15 77 4.3. TLS Support Considerations . . . . . . . . . . . . . . . 16 78 4.4. Authorization Token Considerations . . . . . . . . . . . 16 79 4.4.1. Bearer Token Considerations . . . . . . . . . . . . . 16 80 5. Privacy Considerations . . . . . . . . . . . . . . . . . . . 17 81 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 82 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 83 7.1. Normative References . . . . . . . . . . . . . . . . . . 17 84 7.2. Informative References . . . . . . . . . . . . . . . . . 18 85 Appendix A. Other Streaming Specifications . . . . . . . . . . . 20 86 Appendix B. Acknowledgments . . . . . . . . . . . . . . . . . . 21 87 Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 21 88 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 90 1. Introduction and Overview 92 This specification defines how a stream of SETs (see 93 [I-D.ietf-secevent-token]) can be transmitted to a previously 94 registered Event Receiver using HTTP [RFC7231] over TLS. The 95 specification defines a method to poll for SETs using HTTP POST. 97 This specification defines a method of SET delivery in what is known 98 as Event Streams. 100 This specification does not define the method by which Event Streams 101 are defined, provisioned, managed, monitored, and configured and is 102 out of scope of this specification. 103 [[This work is TBD by the SECEVENTS WG]] 105 1.1. Notational Conventions 107 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 108 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 109 "OPTIONAL" in this document are to be interpreted as described in BCP 110 14 [RFC2119] [RFC8174] when, and only when, they appear in all 111 capitals, as shown here. 113 For purposes of readability examples are not URL encoded. 114 Implementers MUST percent encode URLs as described in Section 2.1 of 115 [RFC3986] . 117 Throughout this documents all figures MAY contain spaces and extra 118 line-wrapping for readability and space limitations. Similarly, some 119 URI's contained within examples, have been shortened for space and 120 readability reasons. 122 1.2. Definitions 124 This specification assumes terminology defined in the Security Event 125 Token specification[I-D.ietf-secevent-token] . 127 The following definitions are defined for Security Event 128 distribution: 130 Event Transmitter 131 A service provider that delivers SETs to other providers known as 132 Event Receivers. An Event Transmitter is responsible for offering 133 a service that allows the Event Receiver to check the Event Stream 134 configuration and status known as the "Control Plane". 136 Event Receiver 137 A service provider that registers to receive SETs from an Event 138 Transmitter and provides an endpoint to receive SETs via HTTP 139 POST. Event Receivers can check current Event Stream 140 configuration and status by accessing the Event Transmitters 141 "Control Plane". 143 Event Stream 144 An Event Stream is a defined location, distribution method and 145 whereby an Event Transmitter and Event Receiver exchange a pre- 146 defined family of SETs. A Stream is assumed to have configuration 147 data such as HTTP endpoints, timeouts, public key sets for signing 148 and encryption, and Event Families. 150 Subject 151 The security subject around which a security event has occurred. 152 For example, a security subject might per a user, a person, an 153 email address, a service provider entity, an IP address, an OAuth 154 Client, a mobile device, or any identifiable thing referenced in 155 security and authorization systems. 157 Event 158 An Event is defined to be an event as represented by a security 159 event token (SET). See [I-D.ietf-secevent-token]. 161 NumericDate 162 A JSON numeric value representing the number of seconds from 163 1970-01-01T00:00:00Z UTC until the specified UTC date/time, 164 ignoring leap seconds. This is equivalent to the IEEE Std 1003.1, 165 2013 Edition [POSIX.1] definition "Seconds Since the Epoch", in 166 which each day is accounted for by exactly 86400 seconds, other 167 than that non-integer values can be represented. See [RFC3339] 168 for details regarding date/times in general and UTC in particular. 170 2. SET Event Stream Protocol 172 An Event Stream represents the communication channel over which a 173 series of SETs are delivered to a configured Event Receiver. 175 2.1. Event Delivery Process 177 When an Event occurs, the Event Transmitter constructs a SET token 178 [I-D.ietf-secevent-token] that describes the Event. The Event 179 Transmitter determines the Event Streams over which the SET should be 180 distributed to. 182 How SETs are defined and the process by which Events are identified 183 for Event Receivers is out-of-scope of this specification. 185 When a SET is available for an Event Receiver, the Event Transmitter 186 attempts to deliver the SET based on the Event Receiver's registered 187 delivery mechanism: 189 o The Event Transmitter queues up the SET in a buffer so that an 190 Event Receiver MAY poll for SETs using HTTP/1.1 POST. 192 o Or, the Event Transmitter delivers the Event through a different 193 method not defined by this specification. 195 In Poll-Based SET Token Delivery Using HTTP, multiple SETs are 196 delivered in a JSON document [RFC7159] to an Event Receiver in 197 response to an HTTP POST request to the Event Transmitter. Then in a 198 following request, the Event Receiver acknowledges received SETs and 199 MAY poll for more. All requests and responses are JSON documents and 200 use a "Content-Type" of "application/json" as described in 201 Section 2.2. 203 After successful (acknowledged) SET delivery, Event Transmitters 204 SHOULD NOT be required to maintain or record SETs for recovery. Once 205 a SET is acknowledged, the Event Receiver SHALL be responsible for 206 retention and recovery. 208 Transmitted SETs SHOULD be self-validating (e.g. signed) if there is 209 a requirement to verify they were issued by the Event Transmitter at 210 a later date when de-coupled from the original delivery where 211 authenticity could be checked via the HTTP or TLS mutual 212 authentication. 214 Upon receiving a SET, the Event Receiver reads the SET and validates 215 it. The Event Receiver MUST acknowledge receipt to the Event 216 Transmitter, using the defined acknowledgement or error method 217 depending on the method of transfer. 219 The Event Receiver SHALL NOT use the Event acknowledgement mechanism 220 to report Event errors other than relating to the parsing and 221 validation of the SET. 223 2.2. Polling Delivery using HTTP 225 This method allows an Event Receiver to use HTTP POST (Section 4.3.3 226 [RFC7231]) to acknowledge SETs and to check for and receive zero or 227 more SETs. Requests MAY be made at a periodic interval (short 228 polling) or requests MAY wait pending availability of new SETs using 229 long polling (see Section 2 [RFC6202]). 231 The delivery of SETs in this method is facilitated by HTTP POST 232 requests initiated by the Event Receiver in which: 234 o The Event Receiver makes a request for available SETs using an 235 HTTP POST to a pre-arranged endpoint provided by the Event 236 Transmitter. Or, 238 o After validating previously received SETs, the Event Receiver 239 initiates another poll request using HTTP POST that includes 240 acknowledgement of previous SETs, and waits for the next batch of 241 SETs. 243 The purpose of the "acknowledgement" is to inform the Event 244 Transmitter that has successfully been delivered and attempts to re- 245 deliver are no longer required. Before acknowledgement, Event 246 Receivers SHOULD ensure received SETs have been validated and 247 retained in a manner appropriate to the receiver's retention 248 requirements. The level and method of retention of SETs by Event 249 Receivers is out-of-scope of this specification. 251 2.2.1. Polling HTTP Request Attributes 253 When initiating a poll request, the Event Receiver constructs a JSON 254 document that consists of polling request parameters and SET 255 acknowledgement parameters in the form of JSON attributes. 257 The request payloads are delivered in one of two forms as described 258 in Section 2.2.3 and Section 2.2.4 260 When making a request, the HTTP header "Content-Type" is set to 261 "application/json". 263 The following JSON Attributes are used in a polling request: 265 Request Processing Parameters 267 maxEvents 268 an OPTIONAL JSON integer value indicating the maximum number of 269 unacknowledged SETs that SHOULD be returned. If more than the 270 maximum number of SETs are available, the oldest SETs available 271 SHOULD be returned first. A value of "0" MAY be used by Event 272 Receivers that would like to perform an acknowledge only 273 request. This enables the Receiver to use separate HTTP 274 requests for acknowledgement and reception of SETs. When zero 275 returned events is requested, the value of the attribute 276 "returnImmediately" SHALL be ignored as an immediate response 277 is expected. 279 returnImmediately 280 An OPTIONAL JSON boolean value that indicates the Event 281 Transmitter SHOULD return an immediate response even if no 282 results are available (short polling). The default value is 283 "false" indicates the request is to be treated as an HTTP Long 284 Poll (see Section 2 [RFC6202]). The time out for the request 285 is part of the Stream configuration which is out of scope of 286 this specification. 288 SET Acknowledgment Parameters 290 ack 291 Which is an array of Strings that each correspond to the "jti" 292 of a successfully received SET. If there are no outstanding 293 SETs to acknowledge, the attribute MAY be omitted. When 294 acknowledging a SET, the Event Transmitter is released from any 295 obligation to retain the SET (e.g. for a future re-try to 296 receive). 298 setErrs 299 A JSON Object that contains one or more nested JSON attributes 300 that correspond to the "jti" of each invalid SET received. The 301 value of each is a JSON object whose contents is an "err" 302 attribute and "description" attribute whose value correspond to 303 the errors described in Section 2.3. 305 2.2.2. Polling HTTP Response Attributes 307 In response to a poll request, the Event Transmitter checks for 308 available SET events and responds with a JSON document containing the 309 following JSON attributes: 311 sets 312 A JSON object that contains zero or more nested JSON attributes. 313 Each nested attribute corresponds to the "jti" of a SET to be 314 delivered and whose value is a JSON String containing the value of 315 the encoded corresponding SET. If there are no outstanding SETs 316 to be transmitted, the JSON object SHALL be empty. 318 moreAvailable 319 A JSON boolean value that indicates if more unacknowledged SETs 320 are available to be returned. 322 When making a response, the HTTP header "Content-Type" is set to 323 "application/json". 325 2.2.3. Poll Request 327 The Event Receiver performs an HTTP POST (see Section 4.3.4 328 [RFC7231]) to a pre-arranged polling endpoint URI to check for SETs 329 that are available. Because the Event Receiver has no prior SETs to 330 acknowledge, the "ack" and "errs" request parameters are omitted. 332 If after a period of time, negotiated between the Event Transmitter 333 and Receiver, an Event Transmitter MAY re-issue SETs it has 334 previously delivered. The Event Receiver SHOULD accept repeat SETs 335 and acknowledge the SETs regardless of whether the Receiver believes 336 it has already acknowledged the SETs previously. An Event 337 Transmitter MAY limit the number of times it attempts to deliver a 338 SET. Upon abandoning delivery of a SET, the Event Transmitter SHOULD 339 have a method to notify the Event Receiver of the loss such as 340 through a status service (not defined by this specification). 342 If the Event Receiver has received SETs from the Event Transmitter, 343 the Event Receiver SHOULD parse and validate received SETs to meet 344 its own requirements and SHOULD acknowledge receipt in a timely (e.g. 345 minutes) fashion so that the Event Transmitter may mark the SETs as 346 received. Event Receivers SHOULD acknowledge receipt before taking 347 any local actions based on the SETs to avoid unnecessary delay in 348 acknowledgement where possible. 350 Poll requests have three variations: 352 Poll Only 353 In which an Event Receiver asks for the next set of Events where 354 no previous SET deliveries are acknowledged (such as in the 355 initial poll request). 357 Acknowledge Only 358 In which an Event Receiver sets the "maxEvents" attribute to "0" 359 along with "ack" and "err" attributes indicating the Event 360 Receiver is acknowledging previously received SETs and does not 361 want to receive any new SETs in response to the request. 363 Combined Acknowledge and Poll 364 In which an Event Receiver is both acknowledging previously 365 received SETs using the "ack" and "err" attributes and will wait 366 for the next group of SETs in the Event Transmitters response. 368 2.2.3.1. Poll Only Request 370 In the case where no SETs were received in a previous poll (see 371 Figure 7), the Event Receiver simply polls without acknowledgement 372 parameters ("sets" and "setErrs"). 374 The following is an example request made by an Event Receiver that 375 has no outstanding SETs to acknowledge and is polling for available 376 SETs. 378 The following is a non-normative example poll request to the 379 endpoint: "https://nofity.exampleidp.com/Events". 381 POST /Events HTTP/1.1 383 Host: notify.exampleidp.com 384 Authorization: Bearer h480djs93hd8 385 Accept: application/json 387 { 388 "returnImmediately":true 389 } 391 Figure 1: Example Initial Poll Request 393 An Event Receiver MAY poll with no parameters at all by passing an 394 empty JSON object. 396 The following is a non-normative example default poll request to the 397 endpoint: "https://nofity.exampleidp.com/Events". 399 POST /Events HTTP/1.1 401 Host: notify.exampleidp.com 402 Authorization: Bearer h480djs93hd8 403 Accept: application/json 405 {} 407 Figure 2: Example Default Poll Request 409 2.2.3.2. Acknowledge Only Request 411 In this variation, the Event Receiver acknowledges previously 412 received SETs and indicates it does not want to receive SETs in 413 response by setting the "maxEvents" attribute to "0". 415 This variation is typically used when an Event Receiver needs to 416 acknowledge received SETs independently (e.g. on separate threads) 417 from the process of receiving SETs. 419 The following is a non-normative example poll with acknowledgement of 420 SETs received (for example as shown in Figure 6). 422 POST /Events HTTP/1.1 424 Host: notify.exampleidp.com 425 Authorization: Bearer h480djs93hd8 426 Content-Type: application/json 427 Authorization: Bearer h480djs93hd8 429 { 430 "ack":[ 431 "4d3559ec67504aaba65d40b0363faad8", 432 "3d0c3cf797584bd193bd0fb1bd4e7d30" 433 ], 434 "maxEvents":0 435 } 437 Figure 3: Example Acknowledge Only equest 439 2.2.3.3. Poll with Acknowledgement 441 This variation allows a receiver thread to simultaneously acknowledge 442 previously received SETs and wait for the next group of SETs in a 443 single request. 445 The following is a non-normative example poll with acknowledgement of 446 SETs received in Figure 6. 448 POST /Events HTTP/1.1 450 Host: notify.exampleidp.com 451 Authorization: Bearer h480djs93hd8 452 Content-Type: application/json 453 Authorization: Bearer h480djs93hd8 455 { 456 "ack":[ 457 "4d3559ec67504aaba65d40b0363faad8", 458 "3d0c3cf797584bd193bd0fb1bd4e7d30" 459 ], 460 "returnImmediately":false 461 } 463 Figure 4: Example Poll With Acknowledgement and No Errors 465 In the above acknowledgement, the Event Receiver has acknowledged 466 receipt of two SETs and has indicated it wants to wait until the next 467 SET is available. 469 2.2.3.4. Poll with Acknowledgement and Errors 471 In the case where errors were detected in previously delivered SETs, 472 the Event Receiver MAY use the "setErrs" attribute to indicate errors 473 in the following poll request. 475 The following is a non-normative example of a response acknowledging 476 1 error and 1 receipt of two SETs received in Figure 6. 478 POST /Events HTTP/1.1 480 Host: notify.exampleidp.com 481 Authorization: Bearer h480djs93hd8 482 Content-Type: application/json 483 Authorization: Bearer h480djs93hd8 485 { 486 "ack":["3d0c3cf797584bd193bd0fb1bd4e7d30"], 487 "setErrs":{ 488 "4d3559ec67504aaba65d40b0363faad8":{ 489 "err":"jwtAud", 490 "description":"The audience value was incorrect." 491 } 492 }, 493 "returnImmediately":true 494 } 496 Figure 5: Example Poll Acknowledgement With Error 498 2.2.4. Poll Response 500 In response to a poll request, the service provider MAY respond 501 immediately if SETs are available to be delivered. If no SETs are 502 available at the time of the request, the Event Transmitter SHALL 503 delay responding until a SET is available unless the poll request 504 parameter "returnImmediately" is "true". 506 As described in Section 2.2.2 a JSON document is returned containing 507 a number of attributes including "sets" which SHALL contain zero or 508 more SETs. 510 The following is a non-normative example response to the request 511 shown Section 2.2.3. This example shows two SETs are returned. 513 HTTP/1.1 200 OK 514 Content-Type: application/json 515 Location: https://notify.exampleidp/Events 517 { 518 "sets":{ 519 "4d3559ec67504aaba65d40b0363faad8": 520 "eyJhbGciOiJub25lIn0. 521 eyJqdGkiOiI0ZDM1NTllYzY3NTA0YWFiYTY1ZDQwYjAzNjNmYWFkOCIsImlhdCI6MTQ 522 1ODQ5NjQwNCwiaXNzIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tIiwiYXVkIjpbIm 523 h0dHBzOi8vc2NpbS5leGFtcGxlLmNvbS9GZWVkcy85OGQ1MjQ2MWZhNWJiYzg3OTU5M 524 2I3NzU0IiwiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIx 525 ZDA4NjQxZDc2NzZlZTciXSwiZXZlbnRzIjp7InVybjppZXRmOnBhcmFtczpzY2ltOmV 526 2ZW50OmNyZWF0ZSI6eyJyZWYiOiJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vVXNlcn 527 MvNDRmNjE0MmRmOTZiZDZhYjYxZTc1MjFkOSIsImF0dHJpYnV0ZXMiOlsiaWQiLCJuY 528 W1lIiwidXNlck5hbWUiLCJwYXNzd29yZCIsImVtYWlscyJdfX19.", 529 "3d0c3cf797584bd193bd0fb1bd4e7d30": 530 "eyJhbGciOiJub25lIn0. 531 eyJqdGkiOiIzZDBjM2NmNzk3NTg0YmQxOTNiZDBmYjFiZDRlN2QzMCIsImlhdCI6MTQ 532 1ODQ5NjAyNSwiaXNzIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tIiwiYXVkIjpbIm 533 h0dHBzOi8vamh1Yi5leGFtcGxlLmNvbS9GZWVkcy85OGQ1MjQ2MWZhNWJiYzg3OTU5M 534 2I3NzU0IiwiaHR0cHM6Ly9qaHViLmV4YW1wbGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIx 535 ZDA4NjQxZDc2NzZlZTciXSwic3ViIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL1V 536 zZXJzLzQ0ZjYxNDJkZjk2YmQ2YWI2MWU3NTIxZDkiLCJldmVudHMiOnsidXJuOmlldG 537 Y6cGFyYW1zOnNjaW06ZXZlbnQ6cGFzc3dvcmRSZXNldCI6eyJpZCI6IjQ0ZjYxNDJkZ 538 jk2YmQ2YWI2MWU3NTIxZDkifSwiaHR0cHM6Ly9leGFtcGxlLmNvbS9zY2ltL2V2ZW50 539 L3Bhc3N3b3JkUmVzZXRFeHQiOnsicmVzZXRBdHRlbXB0cyI6NX19fQ." 540 } 541 } 543 Figure 6: Example Poll Response 545 In the above example, a two SETs whose "jti" are 546 "4d3559ec67504aaba65d40b0363faad8" and 547 "3d0c3cf797584bd193bd0fb1bd4e7d30" are delivered. 549 The following is a non-normative example response to the request 550 shown Section 2.2.3 showing no new SETs or unacknowledged SETs are 551 available. 553 HTTP/1.1 200 OK 554 Content-Type: application/json 555 Location: https://notify.exampleidp/Events 557 { 558 "sets":{ } 559 } 561 Figure 7: Example No SETs Poll Response 563 Upon receiving the JSON document (e.g. as shown in Figure 6), the 564 Event Receiver parses and verifies the received SETs and notifies the 565 Event Transmitter via the next poll request to the Event Transmitter 566 as described in Section 2.2.3.3 or Section 2.2.3.4. 568 2.3. Error Response Handling 570 If a SET is invalid, the following error codes are defined: 572 +-----------+-------------------------------------------------------+ 573 | Err Value | Description | 574 +-----------+-------------------------------------------------------+ 575 | json | Invalid JSON object. | 576 | jwtParse | Invalid or unparsable JWT or JSON structure. | 577 | jwtHdr | In invalid JWT header was detected. | 578 | jwtCrypto | Unable to parse due to unsupported algorithm. | 579 | jws | Signature was not validated. | 580 | jwe | Unable to decrypt JWE encoded data. | 581 | jwtAud | Invalid audience value. | 582 | jwtIss | Issuer not recognized. | 583 | setType | An unexpected Event type was received. | 584 | setParse | Invalid structure was encountered such as an | 585 | | inability to parse or an incomplete set of Event | 586 | | claims. | 587 | setData | SET event claims incomplete or invalid. | 588 | dup | A duplicate SET was received and has been ignored. | 589 +-----------+-------------------------------------------------------+ 591 Table 1: SET Errors 593 An error response SHALL include a JSON object which provides details 594 about the error. The JSON object includes the JSON attributes: 596 err 597 A value which is a keyword that describes the error (see Table 1). 599 description 600 A human-readable text that provides additional diagnostic 601 information. 603 When included as part of a batch of SETs, the above JSON is included 604 as part of the "setErrs" attribute as defined in Section 2.2.2 and 605 Section 2.2.3.4 607 3. Authentication and Authorization 609 The SET delivery method described in this specification is based upon 610 HTTP and depends on the use of TLS and/or standard HTTP 611 authentication and authorization schemes as per [RFC7235]. For 612 example, the following methodologies could be used among others: 614 TLS Client Authentication 615 Event delivery endpoints MAY request TLS mutual client 616 authentication. See Section 7.3 [RFC5246]. 618 Bearer Tokens 619 Bearer tokens [RFC6750] MAY be used when combined with TLS and a 620 token framework such as OAuth 2.0 [RFC6749]. For security 621 considerations regarding the use of bearer tokens in SET delivery 622 see Section 4.4.1. 624 Basic Authentication 625 Usage of basic authentication should be avoided due to its use of 626 a single factor that is based upon a relatively static, symmetric 627 secret. Implementers SHOULD combine the use of basic 628 authentication with other factors. The security considerations of 629 HTTP BASIC, are well documented in [RFC7617] and SHOULD be 630 considered along with using signed SETs (see SET Payload 631 Authentication below). 633 As per Section 4.1 of [RFC7235], a SET delivery endpoint SHALL 634 indicate supported HTTP authentication schemes via the "WWW- 635 Authenticate" header. 637 Because SET Delivery describes a simple function, authorization for 638 the ability to pick-up or deliver SETs can be derived by considering 639 the identity of the SET issuer, or via an authentication method 640 above. This specification considers authentication as a feature to 641 prevent denial-of-service attacks. Because SETs are not commands 642 (see ), Event Receivers are free to ignore SETs that are not of 643 interest. 645 For illustrative purposes only, SET delivery examples show an OAuth2 646 bearer token value [RFC6750] in the authorization header. This is 647 not intended to imply that bearer tokens are preferred. However, the 648 use of bearer tokens in the specification does reflect common 649 practice. 651 3.1. Use of Tokens as Authorizations 653 When using bearer tokens or proof-of-possession tokens that represent 654 an authorization grant such as issued by OAuth (see [RFC6749]), 655 implementers SHOULD consider the type of authorization granted, any 656 authorized scopes (see Section 3.3 of [RFC6749]), and the security 657 subject(s) that SHOULD be mapped from the authorization when 658 considering local access control rules. Section 6 of the OAuth 659 Assertions draft [RFC7521], documents common scenarios for 660 authorization including: 662 o Clients using an assertion to authenticate and/or act on behalf of 663 itself; 665 o Clients acting on behalf of a user; and, 667 o A Client acting on behalf of an anonymous user (e.g., see next 668 section). 670 When using OAuth authorization tokens, implementers MUST take into 671 account the threats and countermeasures documented in the security 672 considerations for the use of client authorizations (see Section 8 of 673 [RFC7521]). When using other token formats or frameworks, 674 implementers MUST take into account similar threats and 675 countermeasures, especially those documented by the relevant 676 specifications. 678 4. Security Considerations 680 4.1. Authentication Using Signed SETs 682 In scenarios where HTTP authorization or TLS mutual authentication 683 are not used or are considered weak, JWS signed SETs SHOULD be used 684 (see [RFC7515] and Security Considerations 685 [I-D.ietf-secevent-token]). This enables the Event Receiver to 686 validate that the SET issuer is authorized to deliver SETs. 688 4.2. HTTP Considerations 690 SET delivery depends on the use of Hypertext Transfer Protocol and 691 thus subject to the security considerations of HTTP Section 9 692 [RFC7230] and its related specifications. 694 As stated in Section 2.7.1 [RFC7230], an HTTP requestor MUST NOT 695 generate the "userinfo" (i.e., username and password) component (and 696 its "@" delimiter) when an "http" URI reference is generated with a 697 message as they are now disallowed in HTTP. 699 4.3. TLS Support Considerations 701 SETs contain sensitive information that is considered PII (e.g. 702 subject claims). Therefore, Event Transmitters and Event Receivers 703 MUST require the use of a transport-layer security mechanism. Event 704 delivery endpoints MUST support TLS 1.2 [RFC5246] and MAY support 705 additional transport-layer mechanisms meeting its security 706 requirements. When using TLS, the client MUST perform a TLS/SSL 707 server certificate check, per [RFC6125]. Implementation security 708 considerations for TLS can be found in "Recommendations for Secure 709 Use of TLS and DTLS" [RFC7525]. 711 4.4. Authorization Token Considerations 713 When using authorization tokens such as those issued by OAuth 2.0 714 [RFC6749], implementers MUST take into account threats and 715 countermeasures documented in Section 8 of [RFC7521]. 717 4.4.1. Bearer Token Considerations 719 Due to the possibility of interception, Bearer tokens MUST be 720 exchanged using TLS. 722 Bearer tokens MUST have a limited lifetime that can be determined 723 directly or indirectly (e.g., by checking with a validation service) 724 by the service provider. By expiring tokens, clients are forced to 725 obtain a new token (which usually involves re-authentication) for 726 continued authorized access. For example, in OAuth2, a client MAY 727 use OAuth token refresh to obtain a new bearer token after 728 authenticating to an authorization server. See Section 6 of 729 [RFC6749]. 731 Implementations supporting OAuth bearer tokens need to factor in 732 security considerations of this authorization method [RFC7521]. 733 Since security is only as good as the weakest link, implementers also 734 need to consider authentication choices coupled with OAuth bearer 735 tokens. The security considerations of the default authentication 736 method for OAuth bearer tokens, HTTP BASIC, are well documented in 737 [RFC7617], therefore implementers are encouraged to prefer stronger 738 authentication methods. Designating the specific methods of 739 authentication and authorization are out-of-scope for the delivery of 740 SET tokens, however this information is provided as a resource to 741 implementers. 743 5. Privacy Considerations 745 If a SET needs to be retained for audit purposes, JWS MAY be used to 746 provide verification of its authenticity. 748 Event Transmitters SHOULD attempt to specialize Event Streams so that 749 the content is targeted to the specific business and protocol needs 750 of subscribers. 752 When sharing personally identifiable information or information that 753 is otherwise considered confidential to affected users, Event 754 Transmitters and Receivers MUST have the appropriate legal agreements 755 and user consent or terms of service in place. 757 The propagation of subject identifiers can be perceived as personally 758 identifiable information. Where possible, Event Transmitters and 759 Receivers SHOULD devise approaches that prevent propagation -- for 760 example, the passing of a hash value that requires the subscriber to 761 already know the subject. 763 6. IANA Considerations 765 There are no IANA considerations. 767 7. References 769 7.1. Normative References 771 [I-D.ietf-secevent-token] 772 Hunt, P., Denniss, W., Ansari, M., and M. Jones, "Security 773 Event Token (SET)", draft-ietf-secevent-token-00 (work in 774 progress), January 2017. 776 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 777 Requirement Levels", BCP 14, RFC 2119, 778 DOI 10.17487/RFC2119, March 1997, 779 . 781 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 782 Resource Identifier (URI): Generic Syntax", STD 66, 783 RFC 3986, DOI 10.17487/RFC3986, January 2005, 784 . 786 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 787 (TLS) Protocol Version 1.2", RFC 5246, 788 DOI 10.17487/RFC5246, August 2008, 789 . 791 [RFC5988] Nottingham, M., "Web Linking", RFC 5988, 792 DOI 10.17487/RFC5988, October 2010, 793 . 795 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 796 Verification of Domain-Based Application Service Identity 797 within Internet Public Key Infrastructure Using X.509 798 (PKIX) Certificates in the Context of Transport Layer 799 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 800 2011, . 802 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 803 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 804 2014, . 806 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 807 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 808 DOI 10.17487/RFC7231, June 2014, 809 . 811 [RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517, 812 DOI 10.17487/RFC7517, May 2015, 813 . 815 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 816 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 817 . 819 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 820 "Recommendations for Secure Use of Transport Layer 821 Security (TLS) and Datagram Transport Layer Security 822 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 823 2015, . 825 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 826 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 827 May 2017, . 829 7.2. Informative References 831 [openid-connect-core] 832 NRI, "OpenID Connect Core 1.0", Nov 2014. 834 [POSIX.1] Institute of Electrical and Electronics Engineers, "The 835 Open Group Base Specifications Issue 7", IEEE Std 1003.1, 836 2013 Edition, 2013. 838 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 839 Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, 840 . 842 [RFC6202] Loreto, S., Saint-Andre, P., Salsano, S., and G. Wilkins, 843 "Known Issues and Best Practices for the Use of Long 844 Polling and Streaming in Bidirectional HTTP", RFC 6202, 845 DOI 10.17487/RFC6202, April 2011, 846 . 848 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 849 RFC 6749, DOI 10.17487/RFC6749, October 2012, 850 . 852 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 853 Framework: Bearer Token Usage", RFC 6750, 854 DOI 10.17487/RFC6750, October 2012, 855 . 857 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 858 Protocol (HTTP/1.1): Message Syntax and Routing", 859 RFC 7230, DOI 10.17487/RFC7230, June 2014, 860 . 862 [RFC7235] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 863 Protocol (HTTP/1.1): Authentication", RFC 7235, 864 DOI 10.17487/RFC7235, June 2014, 865 . 867 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 868 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 869 2015, . 871 [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", 872 RFC 7516, DOI 10.17487/RFC7516, May 2015, 873 . 875 [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, 876 "Assertion Framework for OAuth 2.0 Client Authentication 877 and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, 878 May 2015, . 880 [RFC7617] Reschke, J., "The 'Basic' HTTP Authentication Scheme", 881 RFC 7617, DOI 10.17487/RFC7617, September 2015, 882 . 884 [saml-core-2.0] 885 Internet2, "Assertions and Protocols for the OASIS 886 Security Assertion Markup Language (SAML) V2.0", March 887 2005. 889 Appendix A. Other Streaming Specifications 891 [[EDITORS NOTE: This section to be removed prior to publication]] 893 The following pub/sub, queuing, streaming systems were reviewed as 894 possible solutions or as input to the current draft: 896 XMPP Events 898 The WG considered the XMPP events ands its ability to provide a 899 single messaging solution without the need for both polling and push 900 modes. The feeling was the size and methodology of XMPP was to far 901 apart from the current capabilities of the SECEVENTs community which 902 focuses in on HTTP based service delivery and authorization. 904 Amazon Simple Notification Service 906 Simple Notification Service, is a pub/sub messaging product from AWS. 907 SNS supports a variety of subscriber types: HTTP/HTTPS endpoints, AWS 908 Lambda functions, email addresses (as JSON or plain text), phone 909 numbers (via SMS), and AWS SQS standard queues. It doesn't directly 910 support pull, but subscribers can get the pull model by creating an 911 SQS queue and subscribing it to the topic. Note that this puts the 912 cost of pull support back onto the subscriber, just as it is in the 913 push model. It is not clear that one way is strictly better than the 914 other; larger, sophisticated developers may be happy to own message 915 persistence so they can have their own internal delivery guarantees. 916 The long tail of OIDC clients may not care about that, or may fail to 917 get it right. Regardless, I think we can learn something from the 918 Delivery Policies supported by SNS, as well as the delivery controls 919 that SQS offers (e.g. Visibility Timeout, Dead-Letter Queues). I'm 920 not suggesting that we need all of these things in the spec, but they 921 give an idea of what features people have found useful. 923 Other information: 925 o API Reference: 926 http://docs.aws.amazon.com/AWSSimpleQueueService/latest/ 927 APIReference/Welcome.html 929 o Visibility Timeouts: 930 http://docs.aws.amazon.com/AWSSimpleQueueService/latest/ 931 SQSDeveloperGuide/sqs-visibility-timeout.html 933 Apache Kafka 935 Apache Kafka is an Apache open source project based upon TCP for 936 distributed streaming. It prescribes some interesting general 937 purpose features that seem to extend far beyond the simpler streaming 938 model SECEVENTs is after. A comment from MS has been that Kafka does 939 an acknowledge with poll combination event which seems to be a 940 performance advantage. See: https://kafka.apache.org/intro 942 Google Pub/Sub 944 Google Pub Sub system favours a model whereby polling and 945 acknowledgement of events is done as separate endpoints as separate 946 functions. 948 Information: 950 o Cloud Overview - https://cloud.google.com/pubsub/ 952 o Subscriber Overview - https://cloud.google.com/pubsub/docs/ 953 subscriber 955 o Subscriber Pull(poll) - https://cloud.google.com/pubsub/docs/pull 957 Appendix B. Acknowledgments 959 The editors would like to thanks the members of the SCIM WG which 960 began discussions of provisioning events starting with: draft-hunt- 961 scim-notify-00 in 2015. 963 The editors would like to thank the authors of draft-ietf-secevent- 964 delivery-02, on which this draft is based. 966 The editors would like to thank the participants in the the SECEVENTS 967 working group for their support of this specification. 969 Appendix C. Change Log 971 Draft 00 - AB - Based on draft-ietf-secevent-delivery-02 with the 972 following additions: 974 o Renamed to "Poll-Based SET Token Delivery Using HTTP" 976 o Removed references to the HTTP Push delivery method. 978 Authors' Addresses 980 Annabelle Backman (editor) 981 Amazon 983 Email: richanna@amazon.com 985 Michael B. Jones (editor) 986 Microsoft 988 Email: mbj@microsoft.com 989 URI: http://self-issued.info/ 991 Phil Hunt (editor) 992 Oracle Corporation 994 Email: phil.hunt@yahoo.com 996 Marius Scurtescu 997 Google 999 Email: mscurtescu@google.com 1001 Morteza Ansari 1002 Cisco 1004 Email: morteza.ansari@cisco.com 1006 Anthony Nadalin 1007 Microsoft 1009 Email: tonynad@microsoft.com