idnits 2.17.1 draft-ietf-secevent-token-01.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document date (March 9, 2017) is 2595 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: 'RFC7009' is defined on line 697, but no explicit reference was found in the text == Unused Reference: 'RFC7517' is defined on line 709, but no explicit reference was found in the text ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) ** Obsolete normative reference: RFC 7525 (Obsoleted by RFC 9325) Summary: 3 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Security Events Working Group P. Hunt, Ed. 3 Internet-Draft Oracle 4 Intended status: Standards Track W. Denniss 5 Expires: September 10, 2017 Google 6 M. Ansari 7 Cisco 8 M. Jones 9 Microsoft 10 March 9, 2017 12 Security Event Token (SET) 13 draft-ietf-secevent-token-01 15 Abstract 17 This specification defines the Security Event Token, which may be 18 distributed via a protocol such as HTTP. The Security Event Token 19 (SET) specification profiles the JSON Web Token (JWT), which can be 20 optionally signed and/or encrypted. A SET describes a statement of 21 fact from the perspective of an issuer that it intends to share with 22 one or more receivers. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on September 10, 2017. 41 Copyright Notice 43 Copyright (c) 2017 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction and Overview . . . . . . . . . . . . . . . . . . 2 59 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 4 60 1.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 4 61 2. The Security Event Token (SET) . . . . . . . . . . . . . . . 5 62 2.1. Core SET Claims . . . . . . . . . . . . . . . . . . . . . 8 63 2.2. Security Event Token Construction . . . . . . . . . . . . 9 64 3. Security Considerations . . . . . . . . . . . . . . . . . . . 11 65 3.1. Confidentiality and Integrity . . . . . . . . . . . . . . 12 66 3.2. Delivery . . . . . . . . . . . . . . . . . . . . . . . . 12 67 3.3. Sequencing . . . . . . . . . . . . . . . . . . . . . . . 12 68 3.4. Timing Issues . . . . . . . . . . . . . . . . . . . . . . 13 69 3.5. Distinguishing SETs from Access Tokens . . . . . . . . . 13 70 4. Privacy Considerations . . . . . . . . . . . . . . . . . . . 14 71 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 72 5.1. JSON Web Token Claims Registration . . . . . . . . . . . 14 73 5.1.1. Registry Contents . . . . . . . . . . . . . . . . . . 14 74 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 75 6.1. Normative References . . . . . . . . . . . . . . . . . . 14 76 6.2. Informative References . . . . . . . . . . . . . . . . . 15 77 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 16 78 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 16 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 81 1. Introduction and Overview 83 This specification defines an extensible Security Event Token (SET) 84 format which may be exchanged using protocols such as HTTP. The 85 specification builds on the JSON Web Token (JWT) format [RFC7519] in 86 order to provide a self-contained token that can be optionally signed 87 using JSON Web Signature (JWS) [RFC7515] and/or encrypted using JSON 88 Web Encryption (JWE) [RFC7516]. 90 This specification profiles the use of JWT for the purpose of issuing 91 security event tokens (SETs). This specification defines a base 92 format upon which profiling specifications define actual events and 93 their meanings. Unless otherwise specified, this specification uses 94 non-normative example events intended to demonstrate how events may 95 be constructed. 97 This specification is scoped to security and identity related events. 98 While security event tokens may be used for other purposes, the 99 specification only considers security and privacy concerns relevant 100 to identity and personal information. 102 Security Events are not commands issued between parties. A security 103 event is a statement of fact from the perspective of an issuer about 104 the state of a security subject (e.g., a web resource, token, IP 105 address, the issuer itself) that the issuer controls or is aware of, 106 that has changed in some way (explicitly or implicitly). A security 107 subject MAY be permanent (e.g., a user account) or temporary (e.g., 108 an HTTP session) in nature. A state change could describe a direct 109 change of entity state, an implicit change of state or other higher- 110 level security statements such as: 112 o The creation, modification, removal of a resource. 114 o The resetting or suspension of an account. 116 o The revocation of a security token prior to its expiry. 118 o The logout of a user session. Or, 120 o A cumulative conclusion such as to indicate that a user has taken 121 over an email identifier that may have been used in the past by 122 another user. 124 While subject state changes are often triggered by a user-agent or 125 security-subsystem, the issuance and transmission of an event often 126 occurs asynchronously and in a back-channel to the action which 127 caused the change that generated the security event. Subsequently, 128 an Event Receiver having received a SET, validates and interprets the 129 received SET and takes its own independent action, if any. For 130 example, having been informed of a personal identifier being 131 associated with a different security subject (e.g., an email address 132 is being used by someone else), the Event Receiver may choose to 133 ensure that the new user is not granted access to resources 134 associated with the previous user. Or, the Event Receiver may not 135 have any relationship with the subject, and no action is taken. 137 While Event Receivers will often take actions upon receiving SETs, 138 security events MUST NOT be assumed to be commands or requests. The 139 intent of this specification is to define a way of exchanging 140 statements of fact that subscribers may interpret for their own 141 purposes. As such, SETs have no capability for error signaling other 142 to ensure the validation of a received SET. 144 1.1. Notational Conventions 146 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 147 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 148 document are to be interpreted as described in [RFC2119]. These 149 keywords are capitalized when used to unambiguously specify 150 requirements of the protocol or application features and behavior 151 that affect the inter-operability and security of implementations. 152 When these words are not capitalized, they are meant in their 153 natural-language sense. 155 For purposes of readability, examples are not URL encoded. 156 Implementers MUST percent encode URLs as described in Section 2.1 of 157 [RFC3986]. 159 Throughout this document, all figures MAY contain spaces and extra 160 line-wrapping for readability and space limitations. Similarly, some 161 URIs contained within examples have been shortened for space and 162 readability reasons. 164 1.2. Definitions 166 The following definitions are used with SETs: 168 Security Event Token (SET) 169 A SET is a JWT [RFC7519] that is distributed to one or more 170 registered Event Receivers. 172 Event Transmitter 173 A service provider that delivers SETs to other providers known as 174 Event Receivers. 176 Event Receiver 177 An Event Receiver is an entity that receives SETs through some 178 distribution method. 180 Subject 181 A SET describes an event or state change that has occurred about a 182 Subject. A Subject may be a principal (e.g., Section 4.1.2 183 [RFC7519]), a web resource, an entity such as an IP address, or 184 the issuer itself that a SET might reference. 186 Profiling Specification A specification that uses the SET Token 187 specification to define one or more event types and the associated 188 claims included. 190 2. The Security Event Token (SET) 192 A SET conveys a statement (in the form of a JWT [RFC7519]) about a 193 single security event in relation to a Subject. 195 The schema and structure of a SET follows the JWT [RFC7519] 196 specification. A SET has the following structure: 198 o An outer JSON object that acts as the SET "envelope". The 199 envelope contains a set of name/value pairs called the JWT Claims 200 Set, typically common to every SET or common to a number of 201 different Events within a single Profiling Specification or a 202 related series of specifications. Claims in the envelope (the 203 outer JSON structure) SHOULD be registered in the JWT Token Claims 204 Registry Section 10.1 [RFC7519] or be Public Claims or Private 205 Claims as also defined in [RFC7519]. 207 o Envelope claims that are profiled and defined in this 208 specification are used to validate a SET and declare the contents 209 of the event data included in the SET. The claim "events" 210 identifies the event types expressed that are related to the 211 Security Subject and MAY also include event-specific data. 213 o Each JSON member of the "events" object is a name and value pair. 214 The JSON attribute name is a URI String value that expresses an 215 event type, and the corresponding value is a JSON object known as 216 the event "payload". The payload JSON object contains claims 217 typically unique to the event's URI type value and are not 218 registered as JWT claims. These claims are defined by their 219 associated Profiling Specification. An event with no payload 220 claims SHALL be represented as the empty JSON object ("{}"). In 221 many cases, one event URI expresses the primary event URI, while 222 other events might be considered extensions that MAY be used to do 223 things such as: 225 * A categorization event type to provide classification 226 information (e.g., threat type or level). 228 * An enhancement of an existing specifications the arise over 229 time. 231 * An extension needed to link a potential series of events. 233 * Localized specific purpose event URI used between a particular 234 Event Transmitter and Receiver. 236 The following is a non-normative example showing the JWT Claims Set 237 for a hypothetical SCIM password reset SET. This example shows an 238 additional events value ("https://example.com/scim/event/ 239 passwordResetExt") used to convey additional information -- in this 240 case, the current count of reset attempts: 242 { 243 "jti": "3d0c3cf797584bd193bd0fb1bd4e7d30", 244 "iat": 1458496025, 245 "iss": "https://scim.example.com", 246 "aud": [ 247 "https://jhub.example.com/Feeds/98d52461fa5bbc879593b7754", 248 "https://jhub.example.com/Feeds/5d7604516b1d08641d7676ee7" 249 ], 250 "sub": "https://scim.example.com/Users/44f6142df96bd6ab61e7521d9", 251 "events": { 252 "urn:ietf:params:scim:event:passwordReset": 253 { "id":"44f6142df96bd6ab61e7521d9"}, 254 "https://example.com/scim/event/passwordResetExt": 255 { "resetAttempts":5} 256 } 257 } 259 Figure 1: Example SCIM Password Reset Event 261 The event in the figure above expresses hypothetical password reset 262 event for SCIM [RFC7644]. The JWT consists of: 264 o An "events" claim specifying the hypothetical SCIM URN 265 ("urn:ietf:params:scim:event:passwordReset") for a password reset, 266 and a local schema, "https://example.com/scim/event/ 267 passwordResetExt", that is used to provide additional event 268 information such as the current count of resets. 270 o An "iss" claim, denoting the Event Transmitter. 272 o The "sub" claim specifies the SCIM resource URI that was affected. 274 o The "aud" claim specifies the intended audiences for the event. 275 The syntax of the "aud" claim is defined in Section 4.1.3 276 [RFC7519]. 278 In this example, the SCIM event indicates that a password has been 279 updated and the current password reset count is 5. Notice that the 280 value for "resetAttempts" is actually part of its own JSON object 281 associated with its own event URI attribute. 283 Here is another example JWT Claims Set for a security event token, 284 this one for a Logout Token: 286 { 287 "iss": "https://server.example.com", 288 "sub": "248289761001", 289 "aud": "s6BhdRkqt3", 290 "iat": 1471566154, 291 "jti": "bWJq", 292 "sid": "08a5019c-17e1-4977-8f42-65a12843ea02", 293 "events": { 294 "http://schemas.openid.net/event/backchannel-logout": {} 295 } 296 } 298 Figure 2: Example OpenID Back-Channel Logout Event 300 Note that the above SET has an empty JSON object and uses the JWT 301 registered claims "sub" and "sid" to identify the subject that was 302 logged-out. 304 In the following example JWT Claims Set, a fictional medical service 305 collects consent for medical actions and notifies other parties. The 306 individual for whom consent is identified was originally 307 authenticated via OpenID Connect. In this case, the issuer of the 308 security event is an application rather than the OpenID provider: 310 { 311 "jti": "fb4e75b5411e4e19b6c0fe87950f7749", 313 "sub": "248289761001", 314 "iat": 1458496025, 315 "iss": "https://my.examplemed.com", 316 "aud": [ 317 "https://rp.example.com" 318 ], 319 "events": { 320 "https://openid.net/heart/specs/consent.html":{ 321 "iss":"https://connect.example.com", 322 "consentUri":[ 323 "https://terms.examplemed.com/labdisclosure.html#Agree" 324 ] 325 } 326 } 327 } 329 Figure 3: Example Consent Event 331 In the above example, the attribute "iss" contained within the 332 payload for the event "https://openid.net/heart/specs/consent.html", 333 refers to the issuer of the Security Subject ("sub") rather than the 334 event issuer "https://my.examplemed.com". They are distinct from the 335 top level value of "iss" which always refers to the issuer of the 336 event - a medical consent service that is a relying party to the 337 OpenID Provider. 339 2.1. Core SET Claims 341 The following are claims that are based on [RFC7519] claim 342 definitions and are profiled for use in an event token: 344 jti 345 As defined by Section 4.1.7 [RFC7519] contains a unique identifier 346 for an event. The identifier SHOULD be unique within a particular 347 event feed and MAY be used by clients to track whether a 348 particular event has already been received. This claim is 349 REQUIRED. 351 iss 352 A single valued String containing the URI of the service provider 353 publishing the SET (the issuer). This claim is REQUIRED. Note 354 that when a SET is expressing an event about a Security Subject 355 for which the SET issuer is not the issuer of the Security 356 Subject, the conflict SHALL be resolved by including the Security 357 Subject "iss" value within the event "payload" (see "events" 358 claim). 360 aud 361 The syntax of the claim is as defined in Section 4.1.3 [RFC7519]. 362 This claim MAY contains one or more audience identifiers for the 363 SET. This claim is RECOMMENDED. 365 iat 366 As defined by Section 4.1.6 [RFC7519], a value containing a 367 NumericDate, which represents when the event was issued. Unless 368 otherwise specified, the value SHOULD be interpreted as equivalent 369 to the actual time of the event. This claim is REQUIRED. 371 nbf 372 Defined by Section 4.1.5 [RFC7519], a number whose value is a 373 NumericDate. In the context of the SET token it SHALL be 374 interpreted to mean a date in which the event is believed to have 375 occurred (in the past) or will occur in the future. Note: there 376 MAY be some cases where "nbf" is still smaller than "iat" such as 377 when it took an extended time for a SET to be issued (for example 378 after some analysis). This claim is OPTIONAL. 380 sub As defined by Section 4.1.2 [RFC7519], a String or URI value 381 representing the principal or the subject of the SET. This is 382 usually the entity whose "state" was changed. For example, an IP 383 Address was added to a black list. A URI representing a user 384 resource that was modified. A token identifier for a revoked 385 token. If used, the Profile Specification SHOULD define the 386 content and format semantics for the value. This claim is 387 OPTIONAL, as the principal for any given profile may already be 388 identified without the inclusion of a subject claim. 390 exp As defined by [RFC7519], this claim is time on which the JWT 391 MUST NOT be accepted for processing. In the context of a SET 392 however, this notion does not apply since a SET reflects something 393 that has already been processed and is historical in nature. 394 While some specifications MAY have a need for this claim, its use 395 in general cases is NOT RECOMMENDED. 397 The following are new claims defined by this specification: 399 events 400 The semantics of this claim is to define a set of event statements 401 that each MAY add additional claims to fully describe a single 402 logical event that has occurred (e.g. a state change to a 403 subject). Multiple event statements of the same type SHALL NOT be 404 accepted. The "events" claim SHOULD NOT be used to express 405 multiple logical events. 407 The value of "events" is a JSON object whose members are a set of 408 JSON name/value pairs whose names are URIs representing the event 409 statements being expressed. Event URI values SHOULD be stable 410 values (e.g. a permanent URL for an event specification). For 411 each name present, the corresponding value SHALL be a JSON object. 412 The JSON object MAY be an empty object ("{}"), or it MAY be a JSON 413 object containing data as described by the Profiling 414 Specification. 416 txn 417 An OPTIONAL String value that represents a unique transaction 418 identifier. In cases where multiple SETs are issued based on 419 different event URIs, the transaction identifier MAY be used to 420 correlate SETs to the same originating event or stateful change. 422 2.2. Security Event Token Construction 424 A SET is a JWT [RFC7519] that is constructed by building a JSON 425 structure that constitutes an event object which is then used as the 426 body of a JWT. 428 While this specification uses JWT to convey a SET, implementers SHALL 429 NOT use SETs to convey authentication or authorization assertions. 431 The following is an example JWT Claims Set for a security event token 432 (which has been formatted for readability): 434 { 435 "jti": "4d3559ec67504aaba65d40b0363faad8", 436 "iat": 1458496404, 437 "iss": "https://scim.example.com", 438 "aud": [ 439 "https://scim.example.com/Feeds/98d52461fa5bbc879593b7754", 440 "https://scim.example.com/Feeds/5d7604516b1d08641d7676ee7" 441 ], 443 "events": { 444 "urn:ietf:params:scim:event:create": { 445 "ref": 446 "https://scim.example.com/Users/44f6142df96bd6ab61e7521d9", 447 "attributes":["id", "name", "userName", "password", "emails"] 448 } 449 } 450 } 452 Figure 4: Example Event Claims 454 When transmitted, the above JSON body must be converted into a JWT as 455 per [RFC7519]. 457 The following is an example of a SCIM Event expressed as an unsecured 458 JWT. The JWT header of: 460 {"alg":"none"} 462 Base64url encoding of the octets of the UTF-8 representation of the 463 header yields: 465 eyJhbGciOiJub25lIn0 466 The example JSON Event Data is encoded as follows: 468 e3sgIAogICJqdGkiOiAiNGQzNTU5ZWM2NzUwNGFhYmE2NWQ0MGIwMzYzZmFhZDgiLAog 469 ICJpYXQiOiAxNDU4NDk2NDA0LAogICJpc3MiOiAiaHR0cHM6Ly9zY2ltLmV4YW1wbGUu 470 Y29tIiwgIAogICJhdWQiOiBbCiAgICJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vRmVl 471 ZHMvOThkNTI0NjFmYTViYmM4Nzk1OTNiNzc1NCIsCiAgICJodHRwczovL3NjaW0uZXhh 472 bXBsZS5jb20vRmVlZHMvNWQ3NjA0NTE2YjFkMDg2NDFkNzY3NmVlNyIKICBdLCAgCiAg 473 CiAgImV2ZW50cyI6IHsKICAgICJ1cm46aWV0ZjpwYXJhbXM6c2NpbTpldmVudDpjcmVh 474 dGUiOiB7CiAgICAgICJyZWYiOgogICAgICAgICJodHRwczovL3NjaW0uZXhhbXBsZS5j 475 b20vVXNlcnMvNDRmNjE0MmRmOTZiZDZhYjYxZTc1MjFkOSIsCiAgICAgICJhdHRyaWJ1 476 dGVzIjpbImlkIiwgIm5hbWUiLCAidXNlck5hbWUiLCAicGFzc3dvcmQiLCAiZW1haWxz 477 Il0KICAgIH0KICB9Cn0 479 The encoded JWS signature is the empty string. Concatenating the 480 parts yields: 482 eyJhbGciOiJub25lIn0 483 . 484 e3sgIAogICJqdGkiOiAiNGQzNTU5ZWM2NzUwNGFhYmE2NWQ0MGIwMzYzZmFhZDgiLAog 485 ICJpYXQiOiAxNDU4NDk2NDA0LAogICJpc3MiOiAiaHR0cHM6Ly9zY2ltLmV4YW1wbGUu 486 Y29tIiwgIAogICJhdWQiOiBbCiAgICJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vRmVl 487 ZHMvOThkNTI0NjFmYTViYmM4Nzk1OTNiNzc1NCIsCiAgICJodHRwczovL3NjaW0uZXhh 488 bXBsZS5jb20vRmVlZHMvNWQ3NjA0NTE2YjFkMDg2NDFkNzY3NmVlNyIKICBdLCAgCiAg 489 CiAgImV2ZW50cyI6IHsKICAgICJ1cm46aWV0ZjpwYXJhbXM6c2NpbTpldmVudDpjcmVh 490 dGUiOiB7CiAgICAgICJyZWYiOgogICAgICAgICJodHRwczovL3NjaW0uZXhhbXBsZS5j 491 b20vVXNlcnMvNDRmNjE0MmRmOTZiZDZhYjYxZTc1MjFkOSIsCiAgICAgICJhdHRyaWJ1 492 dGVzIjpbImlkIiwgIm5hbWUiLCAidXNlck5hbWUiLCAicGFzc3dvcmQiLCAiZW1haWxz 493 Il0KICAgIH0KICB9Cn0 494 . 496 Figure 5: Example Unsecured Security Event Token 498 For the purpose of a simpler example in Figure 5, an unencrypted 499 token was shown. When SETs are not signed or encrypted, the Event 500 Receiver MUST depend upon TLS and HTTP to authenticate the sender and 501 the security of the channel to authenticate the SET and its sender. 503 When validation (i.e. auditing), or additional transmission security 504 is required, JWS Signing and JWS Encryption MAY be used. To create 505 and or validate a signed or encrypted SET, follow the instructions in 506 section 7 of [RFC7519]. 508 3. Security Considerations 509 3.1. Confidentiality and Integrity 511 SETs may often contain sensitive information. Therefore, methods for 512 distribution of events SHOULD require the use of a transport-layer 513 security mechanism when distributing events. Parties MUST support 514 TLS 1.2 [RFC5246] and MAY support additional transport-layer 515 mechanisms meeting its security requirements. When using TLS, the 516 client MUST perform a TLS/SSL server certificate check, per 517 [RFC6125]. Implementation security considerations for TLS can be 518 found in "Recommendations for Secure Use of TLS and DTLS" [RFC7525]. 520 Security Events distributed through third-parties or that carry 521 personally identifiable information, SHOULD be encrypted using JWE 522 [RFC7516] or secured for confidentiality by other means. 524 Security Events distributed without authentication over the channel, 525 such as via TLS ([RFC5246] and [RFC6125]), and/or OAuth2 [RFC6749], 526 or Basic Authentication [RFC7617], MUST be signed using JWS [RFC7515] 527 so that individual events MAY be authenticated and validated by the 528 Event Receiver. 530 3.2. Delivery 532 This specification does not define a delivery mechanism by itself. 533 In addition to confidentiality and integrity (discussed above), 534 implementers and Profile Specifications MUST consider the 535 consequences of delivery mechanisms that are not secure and/or not 536 assured. For example, while a SET may be end-to-end secured using 537 JWE encrypted SETs, without TLS there is no assurance that the 538 correct endpoint received the SET and that it could be successfully 539 processed. 541 3.3. Sequencing 543 As defined in this specification, there is no defined way to order 544 multiple SETs in a sequence. Depending on the type and nature of SET 545 event, order may or may not matter. For example, in provisioning, 546 event order is critical -- an object could not be modified before it 547 was created. In other SET types, such as a token revocation, the 548 order of SETs for revoked tokens does not matter. If however, the 549 event was described as a log-in or logged-out status for a user 550 subject, then order becomes important. 552 Profiling Specifications and implementers SHOULD take caution when 553 using timestamps such as "iat" to define order. Distributed systems 554 will have some amount of clock-skew and thus time by itself will not 555 guarantee order. 557 Specifications profiling SET SHOULD define a mechanism for detecting 558 order or sequence of events. For example, the "txn" claim could 559 contain an ordered value (e.g., a counter) that the issuer defines. 561 3.4. Timing Issues 563 When SETs are delivered asynchronously and/or out-of-band with 564 respect to the original action that incurred the security event, it 565 is important to consider that a SET might be delivered to a 566 Subscriber in advance or well behind the process that caused the 567 event. For example, a user having been required to logout and then 568 log back in again, may cause a logout SET to be issued that may 569 arrive at the same time as the user-agent accesses a web site having 570 just logged-in. If timing is not handled properly, the effect would 571 be to erroneously treat the new user session as logged out. 572 Profiling Specifications SHOULD be careful to anticipate timing and 573 subject selection information. For example, it might be more 574 appropriate to cancel a "session" rather than a "user". 575 Alternatively, the specification could use timestamps that allows new 576 sessions to be started immediately after a stated logout event time. 578 3.5. Distinguishing SETs from Access Tokens 580 Because [RFC7519] states that "all claims that are not understood by 581 implementations MUST be ignored.", there is a consideration that a 582 SET token might be confused as an access or authorization token in 583 the case where a SET is mistakenly or intentionally intercepted and 584 presented as an access token. To avoid this, it is recommended that 585 implementers consider one or more of the following: 587 o Avoid use of the JWT claim "exp" within the envelope. 589 o Where possible, use a separate "aud" claim value to distinguish 590 between the SET subscriber and the audience of an access token. 591 For example, a Logout while intended for the same relying party 592 could use a different audience to distinguish between normal 593 access and logout notification. 595 o Modify access validation systems to check for the presence of the 596 "events" claim as a means to detect security event tokens. This 597 is particularly useful if the same endpoint may receive both types 598 of tokens. 600 o Consider avoiding use of the "sub" claim at the top level. 602 4. Privacy Considerations 604 If a SET needs to be retained for audit purposes, JWS MAY be used to 605 provide verification of its authenticity. 607 Event Transmitters SHOULD attempt to specialize feeds so that the 608 content is targeted to the specific business and protocol needs of 609 subscribers. 611 When sharing personally identifiable information or information that 612 is otherwise considered confidential to affected users, Event 613 Transmitters and Receivers MUST have the appropriate legal agreements 614 and user consent or terms of service in place. 616 The propagation of subject identifiers can be perceived as personally 617 identifiable information. Where possible, Event Transmitters and 618 Receivers SHOULD devise approaches that prevent propagation -- for 619 example, the passing of a hash value that requires the subscriber to 620 already know the subject. 622 5. IANA Considerations 624 5.1. JSON Web Token Claims Registration 626 This specification registers the "events" and "txn" claims in the 627 IANA "JSON Web Token Claims" registry [IANA.JWT.Claims] established 628 by [RFC7519]. 630 5.1.1. Registry Contents 632 o Claim Name: "events" 633 o Claim Description: Security Event Object 634 o Change Controller: IESG 635 o Specification Document(s): Section 2 of [[ this specification ]] 637 o Claim Name: "txn" 638 o Claim Description: Transaction Identifier 639 o Change Controller: IESG 640 o Specification Document(s): Section 2 of [[ this specification ]] 642 6. References 644 6.1. Normative References 646 [IANA.JWT.Claims] 647 IANA, "JSON Web Token Claims", 648 . 650 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 651 Requirement Levels", BCP 14, RFC 2119, 652 DOI 10.17487/RFC2119, March 1997, 653 . 655 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 656 Resource Identifier (URI): Generic Syntax", STD 66, 657 RFC 3986, DOI 10.17487/RFC3986, January 2005, 658 . 660 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 661 (TLS) Protocol Version 1.2", RFC 5246, 662 DOI 10.17487/RFC5246, August 2008, 663 . 665 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 666 Verification of Domain-Based Application Service Identity 667 within Internet Public Key Infrastructure Using X.509 668 (PKIX) Certificates in the Context of Transport Layer 669 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 670 2011, . 672 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 673 RFC 6749, DOI 10.17487/RFC6749, October 2012, 674 . 676 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 677 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 678 . 680 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 681 "Recommendations for Secure Use of Transport Layer 682 Security (TLS) and Datagram Transport Layer Security 683 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 684 2015, . 686 [RFC7617] Reschke, J., "The 'Basic' HTTP Authentication Scheme", 687 RFC 7617, DOI 10.17487/RFC7617, September 2015, 688 . 690 6.2. Informative References 692 [openid-connect-core] 693 Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and 694 C. Mortimore, "OpenID Connect Core 1.0", November 2014, 695 . 697 [RFC7009] Lodderstedt, T., Ed., Dronia, S., and M. Scurtescu, "OAuth 698 2.0 Token Revocation", RFC 7009, DOI 10.17487/RFC7009, 699 August 2013, . 701 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 702 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 703 2015, . 705 [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", 706 RFC 7516, DOI 10.17487/RFC7516, May 2015, 707 . 709 [RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517, 710 DOI 10.17487/RFC7517, May 2015, 711 . 713 [RFC7644] Hunt, P., Ed., Grizzle, K., Ansari, M., Wahlstroem, E., 714 and C. Mortimore, "System for Cross-domain Identity 715 Management: Protocol", RFC 7644, DOI 10.17487/RFC7644, 716 September 2015, . 718 [saml-core-2.0] 719 Internet2, "Assertions and Protocols for the OASIS 720 Security Assertion Markup Language (SAML) V2.0", March 721 2005. 723 Appendix A. Acknowledgments 725 The editors would like to thank the members of the SCIM WG which 726 began discussions of provisioning events starting with: draft-hunt- 727 scim-notify-00 in 2015. 729 The editors would like to thank the participants in the IETF id-event 730 mailing list and related working groups for their support of this 731 specification. 733 Appendix B. Change Log 735 From the original draft-hunt-idevent-token: 737 Draft 01 - PH - Renamed eventUris to events 739 Draft 00 - PH - First Draft 741 Draft 01 - PH - Fixed some alignment issues with JWT. Remove event 742 type attribute. 744 Draft 02 - PH - Renamed to Security Events, removed questions, 745 clarified examples and intro text, and added security and privacy 746 section. 748 Draft 03 - PH 750 General edit corrections from Sarah Squire 751 Changed "event" term to "SET" 752 Corrected author organization for William Denniss to Google 753 Changed definition of SET to be 2 parts, an envelope and 1 or more 754 payloads. 755 Clarified that the intent is to express a single event with 756 optional extensions only. 758 - mbj - Registered "events" claim, and proof-reading corrections. 760 Draft 04 - PH - 762 o Re-added the "sub" claim with clarifications that any SET type may 763 use it. 764 o Added additional clarification on the use of envelope vs. payload 765 attributes 766 o Added security consideration for event timing. 767 o Switched use of "attribute" to "claim" for consistency. 768 o Revised examples to put "sub" claim back in the top level. 769 o Added clarification that SETs typically do not use "exp". 770 o Added security consideration for distinguishing Access Tokens and 771 SETs. 773 Draft 05 - PH - Fixed find/replace error that resulted in claim being 774 spelled claimc 776 Draft 06 - PH - 778 o Corrected typos 779 o New txn claim 780 o New security considerations Sequencing and Timing Issues 782 Draft 07 - 784 o PH - Moved payload objects to be values of event URI attributes, 785 per discussion. 786 o mbj - Applied terminology consistency and grammar cleanups. 788 Draft 08 - PH - 790 o Added clarification to status of examples 791 o Changed from primary vs. extension to state that multiple events 792 may be expressed, some of which may or may not be considered 793 extensions of others (which is for the subscriber or profiling 794 specifications to determine). 795 o Other editorial changes suggested by Yaron 796 From draft-ietf-secevent-token: 798 Draft 00 - PH - First WG Draft based on draft-hunt-idevent-token 800 Draft 01 - PH - Changes as follows: 802 o Changed terminology away from pub-sub to transmitter/receiver 803 based on WG feedback 804 o Cleaned up/removed some text about extensions (now only used as 805 example) 806 o Clarify purpose of spec vs. future profiling specs that define 807 actual events 809 Authors' Addresses 811 Phil Hunt (editor) 812 Oracle Corporation 814 Email: phil.hunt@yahoo.com 816 William Denniss 817 Google 819 Email: wdenniss@google.com 821 Morteza Ansari 822 Cisco 824 Email: morteza.ansari@cisco.com 826 Michael B. Jones 827 Microsoft 829 Email: mbj@microsoft.com 830 URI: http://self-issued.info/