idnits 2.17.1 draft-ietf-secevent-token-04.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 date (January 20, 2018) is 2288 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: 'RFC7617' is defined on line 894, but no explicit reference was found in the text == Unused Reference: 'RFC7009' is defined on line 925, but no explicit reference was found in the text == Unused Reference: 'RFC7517' is defined on line 937, 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) == Outdated reference: A later version (-07) exists of draft-ietf-oauth-jwt-bcp-00 Summary: 3 errors (**), 0 flaws (~~), 5 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 M. Jones 5 Expires: July 24, 2018 Microsoft 6 W. Denniss 7 Google 8 M. Ansari 9 Cisco 10 January 20, 2018 12 Security Event Token (SET) 13 draft-ietf-secevent-token-04 15 Abstract 17 This specification defines the Security Event Token (SET) data 18 structure. A SET describes a statement of fact from the perspective 19 of an issuer, which is intended to be shared with one or more 20 recipients. A SET is a JSON Web Token (JWT), which can be optionally 21 signed and/or encrypted. SETs can be distributed via protocols such 22 as HTTP. 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 https://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 July 24, 2018. 41 Copyright Notice 43 Copyright (c) 2018 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 (https://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. Illustrative Examples . . . . . . . . . . . . . . . . . . 6 63 2.1.1. SCIM Example . . . . . . . . . . . . . . . . . . . . 6 64 2.1.2. Logout Example . . . . . . . . . . . . . . . . . . . 7 65 2.1.3. Consent Example . . . . . . . . . . . . . . . . . . . 7 66 2.1.4. RISC Example . . . . . . . . . . . . . . . . . . . . 8 67 2.2. Core SET Claims . . . . . . . . . . . . . . . . . . . . . 9 68 2.3. Explicit Typing of SETs . . . . . . . . . . . . . . . . . 11 69 2.4. Security Event Token Construction . . . . . . . . . . . . 11 70 3. Requirements for SET Profiles . . . . . . . . . . . . . . . . 13 71 4. Security Considerations . . . . . . . . . . . . . . . . . . . 14 72 4.1. Confidentiality and Integrity . . . . . . . . . . . . . . 14 73 4.2. Delivery . . . . . . . . . . . . . . . . . . . . . . . . 14 74 4.3. Sequencing . . . . . . . . . . . . . . . . . . . . . . . 15 75 4.4. Timing Issues . . . . . . . . . . . . . . . . . . . . . . 15 76 4.5. Distinguishing SETs from ID Tokens . . . . . . . . . . . 15 77 4.6. Distinguishing SETs from Access Tokens . . . . . . . . . 16 78 4.7. Distinguishing SETs from other kinds of JWTs . . . . . . 17 79 5. Privacy Considerations . . . . . . . . . . . . . . . . . . . 17 80 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 81 6.1. JSON Web Token Claims Registration . . . . . . . . . . . 18 82 6.1.1. Registry Contents . . . . . . . . . . . . . . . . . . 18 83 6.2. Media Type Registration . . . . . . . . . . . . . . . . . 18 84 6.2.1. Registry Contents . . . . . . . . . . . . . . . . . . 18 85 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 86 7.1. Normative References . . . . . . . . . . . . . . . . . . 19 87 7.2. Informative References . . . . . . . . . . . . . . . . . 20 88 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 22 89 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 22 90 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25 92 1. Introduction and Overview 94 This specification defines an extensible Security Event Token (SET) 95 data structure, which can be exchanged using protocols such as HTTP. 96 The specification builds on the JSON Web Token (JWT) format [RFC7519] 97 in order to provide a self-contained token that can be optionally 98 signed using JSON Web Signature (JWS) [RFC7515] and/or encrypted 99 using JSON Web Encryption (JWE) [RFC7516]. 101 This specification profiles the use of JWT for the purpose of issuing 102 Security Event Tokens (SETs). This specification defines a base 103 format used by profiling specifications to define actual events and 104 their meanings. This specification uses non-normative example events 105 to demonstrate how events can be constructed. 107 This specification is scoped to security and identity related events. 108 While security event tokens may be used for other purposes, the 109 specification only considers security and privacy concerns relevant 110 to identity and personal information. 112 Security Events are not commands issued between parties. A security 113 event is a statement of fact from the perspective of an issuer about 114 the state of a security subject (e.g., a web resource, token, IP 115 address, the issuer itself) that the issuer controls or is aware of, 116 that has changed in some way (explicitly or implicitly). A security 117 subject MAY be permanent (e.g., a user account) or temporary (e.g., 118 an HTTP session) in nature. A state change could describe a direct 119 change of entity state, an implicit change of state, or other higher- 120 level security statements such as: 122 o The creation, modification, removal of a resource. 124 o The resetting or suspension of an account. 126 o The revocation of a security token prior to its expiry. 128 o The logout of a user session. Or, 130 o An indication that a user has been given control of an email 131 identifier that was previously controlled by another user. 133 While subject state changes are often triggered by a user agent or 134 security subsystem, the issuance and transmission of an event may 135 occur asynchronously and in a back channel to the action that caused 136 the change that generated the security event. Subsequently, an Event 137 Recipient, having received a SET, validates and interprets the 138 received SET and takes its own independent actions, if any. For 139 example, having been informed of a personal identifier being 140 associated with a different security subject (e.g., an email address 141 is being used by someone else), the Event Recipient may choose to 142 ensure that the new user is not granted access to resources 143 associated with the previous user. Or, the Event Recipient may not 144 have any relationship with the subject, and no action is taken. 146 While Event Recipients will often take actions upon receiving SETs, 147 security events cannot be assumed to be commands or requests. The 148 intent of this specification is to define a syntax for statements of 149 fact that Event Recipients may interpret for their own purposes. As 150 such, SETs have no capability for error signaling to ensure the 151 validation of a received SET. 153 1.1. Notational Conventions 155 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 156 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 157 "OPTIONAL" in this document are to be interpreted as described in 158 [RFC2119]. These keywords are capitalized when used to unambiguously 159 specify requirements of the protocol or application features and 160 behavior that affect the inter-operability and security of 161 implementations. When these words are not capitalized, they are 162 meant in their natural-language sense. 164 For purposes of readability, examples are not URL encoded. 165 Implementers MUST percent encode URLs as described in Section 2.1 of 166 [RFC3986]. 168 Throughout this document, all figures MAY contain spaces and extra 169 line-wrapping for readability and space limitations. Similarly, some 170 URIs contained within examples have been shortened for space and 171 readability reasons. 173 1.2. Definitions 175 The following definitions are used with SETs: 177 Security Event Token (SET) 178 A SET is a JWT [RFC7519] conforming to this specification that is 179 distributed to one or more Event Recipients. 181 Event Issuer 182 A service provider that creates SETs to be sent to other providers 183 known as Event Recipients. 185 Event Recipient 186 An Event Recipient is an entity that receives SETs through some 187 distribution method. An Event Recipient is the same entity 188 referred as a "recipient" or "receiver" in [RFC7519] and related 189 specifications. 191 Subject 192 A SET describes an event or state change that has occurred about a 193 Subject. A Subject might, for instance, be a principal (e.g., 194 Section 4.1.2 of [RFC7519]), a web resource, an entity such as an 195 IP address, or the issuer of the SET. 197 Profiling Specification 198 A specification that profiles the SET data structure to define one 199 or more specific event types and their associated claims and 200 processing rules. 202 2. The Security Event Token (SET) 204 A SET is a JWT [RFC7519] data structure that represents one or more 205 related aspects of a security event about a Subject. The JWT Claims 206 Set in a SET has the following structure: 208 o The top-level claims in the JWT Claims Set are called the SET 209 "envelope". Some of these claims are present in every SET; others 210 will be specific to particular SET profiles or profile families. 211 Claims in the envelope SHOULD be registered in the "JSON Web Token 212 Claims" registry [IANA.JWT.Claims] or be Public Claims or Private 213 Claims, as defined in [RFC7519]. 215 o Envelope claims that are profiled and defined in this 216 specification are used to validate the SET and provide information 217 about the event data included in the SET. The claim "events" 218 contains the event identifiers and event-specific data expressed 219 about the Security Subject. The envelope MAY include event- 220 specific or profile-specific data. 222 o Each member of the "events" JSON object is a name/value pair. The 223 JSON member name is a URI string value is an event identifier, and 224 the corresponding value is a JSON object known as the event 225 "payload". The payload JSON object contains claims that pertain 226 to that event identifier and need not be registered as JWT claims. 227 These claims are defined by the Profiling Specification that 228 defines the event. An event with no payload claims SHALL be 229 represented as the empty JSON object ("{}"). 231 o When multiple event identifiers are contained in a SET, they 232 represent multiple aspects of the same state transition that 233 occurred to the Security Subject. They are not intended to be 234 used to aggregate distinct events about the same subject. Beyond 235 this, the interpretation of SETs containing multiple event 236 identifiers is out of scope for this specification; Profiling 237 Specifications MAY define their own rules regarding their use of 238 SETs containing multiple event identifiers, as described in 239 Section 3. Possible uses of multiple values include, but are not 240 limited to: 242 * Values to provide classification information (e.g., threat type 243 or level). 245 * Additions to existing event representations. 247 * Values used to link potential series of events. 249 * Specific-purpose event URIs used between particular Event 250 Issuers and Event Recipients. 252 2.1. Illustrative Examples 254 2.1.1. SCIM Example 256 The following is a non-normative example showing the JWT Claims Set 257 for a hypothetical SCIM [RFC7644] password reset SET. This example 258 uses a second "events" value ("https://example.com/scim/event/ 259 passwordResetExt") to convey additional information about the state 260 change -- in this case, the current count of reset attempts: 262 { 263 "jti": "3d0c3cf797584bd193bd0fb1bd4e7d30", 264 "iat": 1458496025, 265 "iss": "https://scim.example.com", 266 "aud": [ 267 "https://jhub.example.com/Feeds/98d52461fa5bbc879593b7754", 268 "https://jhub.example.com/Feeds/5d7604516b1d08641d7676ee7" 269 ], 270 "sub": "https://scim.example.com/Users/44f6142df96bd6ab61e7521d9", 271 "events": { 272 "urn:ietf:params:scim:event:passwordReset": 273 { "id": "44f6142df96bd6ab61e7521d9"}, 274 "https://example.com/scim/event/passwordResetExt": 275 { "resetAttempts": 5} 276 } 277 } 279 Figure 1: Example SCIM Password Reset Event 281 The JWT Claims Set consists of: 283 o The "events" claim specifying the hypothetical SCIM URN 284 ("urn:ietf:params:scim:event:passwordReset") for a password reset, 285 and a second value, "https://example.com/scim/event/ 286 passwordResetExt", that is used to provide additional event 287 information such as the current count of resets. 289 o The "iss" claim, denoting the Event Issuer. 291 o The "sub" claim, specifying the SCIM resource URI that was 292 affected. 294 o The "aud" claim, specifying the intended audiences for the event. 295 (The syntax of the "aud" claim is defined in Section 4.1.3 of 296 [RFC7519].) 298 In this example, the SCIM event indicates that a password has been 299 updated and the current password reset count is 5. Notice that the 300 value for "resetAttempts" is in the event payload of an event used to 301 convey this information. 303 2.1.2. Logout Example 305 Here is another example JWT Claims Set for a security event token, 306 this one for a Logout Token: 308 { 309 "iss": "https://server.example.com", 310 "sub": "248289761001", 311 "aud": "s6BhdRkqt3", 312 "iat": 1471566154, 313 "jti": "bWJq", 314 "sid": "08a5019c-17e1-4977-8f42-65a12843ea02", 315 "events": { 316 "http://schemas.openid.net/event/backchannel-logout": {} 317 } 318 } 320 Figure 2: Example OpenID Back-Channel Logout Event 322 Note that the above SET has an empty JSON object and uses the JWT 323 registered claims "sub" and "sid" to identify the subject that was 324 logged out. 326 2.1.3. Consent Example 327 In the following example JWT Claims Set, a fictional medical service 328 collects consent for medical actions and notifies other parties. The 329 individual for whom consent is identified was originally 330 authenticated via OpenID Connect. In this case, the issuer of the 331 security event is an application rather than the OpenID provider: 333 { 334 "jti": "fb4e75b5411e4e19b6c0fe87950f7749", 335 "iat": 1458496025, 336 "iss": "https://my.examplemed.com", 337 "aud": [ 338 "https://rp.example.com" 339 ], 340 "events": { 341 "https://openid.net/heart/specs/consent.html": { 342 "iss": "https://connect.example.com", 343 "sub": "248289761001", 344 "consentUri": [ 345 "https://terms.examplemed.com/labdisclosure.html#Agree" 346 ] 347 } 348 } 349 } 351 Figure 3: Example Consent Event 353 In the above example, the attribute "iss" contained within the 354 payload for the event "https://openid.net/heart/specs/consent.html" 355 refers to the issuer of the Security Subject ("sub") rather than the 356 event issuer "https://my.examplemed.com". They are distinct from the 357 top level value of "iss", which always refers to the issuer of the 358 event - a medical consent service that is a relying party to the 359 OpenID Provider. 361 2.1.4. RISC Example 362 The following example JWT Claims Set is for an account disabled 363 event. This example was taken from a working draft of the RISC 364 events specification, where RISC is the OpenID RISC (Risk and 365 Incident Sharing and Coordination) working group [RISC]. The example 366 is subject to change. 368 { 369 "iss": "https://idp.example.com/", 370 "sub": "7375626A656374", 371 "jti": "756E69717565206964656E746966696572", 372 "iat": 1508184845, 373 "aud": "636C69656E745F6964", 374 "events": { 375 "http://schemas.openid.net/secevent/risc/event-type/\ 376 account-disabled": { 377 "reason": "hijacking", 378 "cause-time": 1508012752, 379 } 380 } 381 } 383 Figure 4: Example RISC Event 385 Notice that parameters to the event are included in the event 386 payload, in this case, the "reason" and "cause-time" values. The 387 account that is the subject of the event is identified using the 388 "iss" and "sub" values, in the same manner as OpenID Connect 389 [OpenID.Core] ID Tokens. 391 2.2. Core SET Claims 393 The following claims from [RFC7519] are profiled for use in SETs: 395 jti 396 As defined by Section 4.1.7 of [RFC7519] contains a unique 397 identifier for an event. The identifier SHOULD be unique within a 398 particular event feed and MAY be used by clients to track whether 399 a particular event has already been received. This claim is 400 REQUIRED. 402 iss 403 A string identifying the service provider publishing the SET (the 404 issuer). In some cases, the SET issuer is not the issuer of the 405 Security Subject. Therefore, implementers cannot assume that the 406 issuers are the same unless the Profiling Specification specifies 407 that they are for SETs conforming to that profile. This claim is 408 REQUIRED. 410 aud 411 The syntax of the claim is as defined in Section 4.1.3 of 412 [RFC7519]. This claim contains one or more audience identifiers 413 for the SET. This claim is RECOMMENDED. 415 iat 416 As defined by Section 4.1.6 of [RFC7519], a value representing 417 when the event was issued. Unless otherwise specified, the value 418 SHOULD be interpreted as equivalent to the actual time of the 419 event. This claim is REQUIRED. 421 sub 422 As defined by Section 4.1.2 of [RFC7519], a String or URI value 423 representing the principal or the subject of the SET. This is 424 usually the entity whose "state" was changed. For example, an IP 425 Address was added to a black list. A URI representing a user 426 resource that was modified. A token identifier for a revoked 427 token. If used, the Profiling Specification SHOULD define the 428 content and format semantics for the value. This claim is 429 OPTIONAL, as the principal for any given profile may already be 430 identified without the inclusion of a subject claim. Note that 431 some SET profiles MAY choose to convey event subject information 432 in the event payload (either using the "sub" member name or 433 another name), particularly if the subject information is relative 434 to issuer information that is also conveyed in the event payload, 435 which may be the case for some identity SET profiles. 437 exp 438 As defined by Section 4.1.4 of [RFC7519], this claim is time after 439 which the JWT MUST NOT be accepted for processing. In the context 440 of a SET however, this notion does not apply, since a SET 441 represents something that has already occurred and is historical 442 in nature. While some profiles MAY choose to use this claim, its 443 use is NOT RECOMMENDED. 445 The following new claims are defined by this specification: 447 events 448 This claim contains a set of event statements that each provide 449 information describing a single logical event that has occurred 450 about a Security Subject (e.g., a state change to the subject). 451 Multiple event identifiers with the same value MUST NOT be used. 452 The "events" claim SHOULD NOT be used to express multiple 453 independent logical events. 455 The value of the "events" claim is a JSON object whose members are 456 name/value pairs whose names are URIs identifying the event 457 statements being expressed. Event identifiers SHOULD be stable 458 values (e.g., a permanent URL for an event specification). For 459 each name present, the corresponding value MUST be a JSON object. 460 The JSON object MAY be an empty object ("{}"), or it MAY be a JSON 461 object containing data described by the Profiling Specification. 463 txn 464 An OPTIONAL string value that represents a unique transaction 465 identifier. In cases in which multiple related JWTs are issued, 466 the transaction identifier claim can be used to correlate these 467 related JWTs. 469 toe 470 A value that represents the date and time at which the event 471 occurred. This value is a NumericDate (see Section 2 of 472 [RFC7519]). This claim is RECOMMENDED. Note that some profiles 473 may choose to omit "toe" and convey event time information with 474 the "iat" claim or another claim. 476 2.3. Explicit Typing of SETs 478 This specification registers the "application/secevent+jwt" media 479 type, which can be used to indicate that the content is a SET. SETs 480 MAY include this media type in the "typ" header parameter of the JWT 481 representing the SET to explicitly declare that the JWT is a SET. 482 This MUST be included if the SET could be used in an application 483 context in which it could be confused with other kinds of JWTs. 485 Per the definition of "typ" in Section 4.1.9 of [RFC7515], it is 486 RECOMMENDED that the "application/" prefix be omitted. Therefore, 487 the "typ" value used SHOULD be "secevent+jwt". 489 2.4. Security Event Token Construction 491 This section describes how to construct a SET. 493 The following is an example JWT Claims Set for a hypothetical SCIM 494 SET (which has been formatted for readability): 496 { 497 "jti": "4d3559ec67504aaba65d40b0363faad8", 498 "iat": 1458496404, 499 "iss": "https://scim.example.com", 500 "aud": [ 501 "https://scim.example.com/Feeds/98d52461fa5bbc879593b7754", 502 "https://scim.example.com/Feeds/5d7604516b1d08641d7676ee7" 503 ], 505 "events": { 506 "urn:ietf:params:scim:event:create": { 507 "ref": 508 "https://scim.example.com/Users/44f6142df96bd6ab61e7521d9", 509 "attributes": ["id", "name", "userName", "password", "emails"] 510 } 511 } 512 } 514 Figure 5: Example Event Claims 516 The JSON Claims Set is encoded per [RFC7519]. 518 In this example, the SCIM SET claims are encoded in an unsecured JWT. 519 The JOSE Header for this example is: 521 {"typ":"secevent+jwt","alg":"none"} 523 Base64url encoding of the octets of the UTF-8 representation of the 524 JOSE Header yields: 526 eyJ0eXAiOiJzZWNldmVudCtqd3QiLCJhbGciOiJub25lIn0 528 The above example JWT Claims Set is encoded as follows: 530 eyJqdGkiOiI0ZDM1NTllYzY3NTA0YWFiYTY1ZDQwYjAzNjNmYWFkOCIsImlhdCI6MTQ1 531 ODQ5NjQwNCwiaXNzIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tIiwiYXVkIjpbImh0 532 dHBzOi8vc2NpbS5leGFtcGxlLmNvbS9GZWVkcy85OGQ1MjQ2MWZhNWJiYzg3OTU5M2I3 533 NzU0IiwiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIxZDA4 534 NjQxZDc2NzZlZTciXSwiZXZlbnRzIjp7InVybjppZXRmOnBhcmFtczpzY2ltOmV2ZW50 535 OmNyZWF0ZSI6eyJyZWYiOiJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vVXNlcnMvNDRm 536 NjE0MmRmOTZiZDZhYjYxZTc1MjFkOSIsImF0dHJpYnV0ZXMiOlsiaWQiLCJuYW1lIiwi 537 dXNlck5hbWUiLCJwYXNzd29yZCIsImVtYWlscyJdfX19 538 The encoded JWS signature is the empty string. Concatenating the 539 parts yields this complete SET: 541 eyJ0eXAiOiJzZWNldmVudCtqd3QiLCJhbGciOiJub25lIn0. 542 eyJqdGkiOiI0ZDM1NTllYzY3NTA0YWFiYTY1ZDQwYjAzNjNmYWFkOCIsImlhdCI6MTQ1 543 ODQ5NjQwNCwiaXNzIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tIiwiYXVkIjpbImh0 544 dHBzOi8vc2NpbS5leGFtcGxlLmNvbS9GZWVkcy85OGQ1MjQ2MWZhNWJiYzg3OTU5M2I3 545 NzU0IiwiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIxZDA4 546 NjQxZDc2NzZlZTciXSwiZXZlbnRzIjp7InVybjppZXRmOnBhcmFtczpzY2ltOmV2ZW50 547 OmNyZWF0ZSI6eyJyZWYiOiJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vVXNlcnMvNDRm 548 NjE0MmRmOTZiZDZhYjYxZTc1MjFkOSIsImF0dHJpYnV0ZXMiOlsiaWQiLCJuYW1lIiwi 549 dXNlck5hbWUiLCJwYXNzd29yZCIsImVtYWlscyJdfX19. 551 Figure 6: Example Unsecured Security Event Token 553 For the purpose of having a simpler example in Figure 6, an unsecured 554 token is shown. When SETs are not signed or encrypted, the Event 555 Recipient MUST employ other mechanisms such as TLS to provide 556 integrity, confidentiality, and issuer validation, as needed by the 557 application. 559 When validation (i.e., auditing), or additional transmission security 560 is required, JWS signing and/or JWE encryption MAY be used. To 561 create and or validate a signed and/or encrypted SET, follow the 562 instructions in Section 7 of [RFC7519]. 564 3. Requirements for SET Profiles 566 Profiling Specifications for SETs define the syntax and semantics of 567 SETs conforming to that SET profile and rules for validating those 568 SETs. The syntax defined by profiling specifications includes what 569 claims and event payload values are used by SETs utilizing the 570 profile. 572 Defining the semantics of the SET contents for SETs utilizing the 573 profile is equally important. Possibly most important is defining 574 the procedures used to validate the SET issuer and to obtain the keys 575 controlled by the issuer that were used for cryptographic operations 576 used in the JWT representing the SET. For instance, some profiles 577 may define an algorithm for retrieving the SET issuer's keys that 578 uses the "iss" claim value as its input. Likewise, if the profile 579 allows (or requires) that the JWT be unsecured, the means by which 580 the integrity of the JWT is ensured MUST be specified. 582 Profiling Specifications MUST define how the event Subject is 583 identified in the SET, as well as how to differentiate between the 584 event Subject's Issuer and the SET Issuer, if applicable. It is NOT 585 RECOMMENDED for Profiling Specifications to use the "sub" claim in 586 cases in which the Subject is not globally unique and has a different 587 Issuer from the SET itself. 589 Among the syntax and semantics of SETs that Profiling Specifications 590 define is whether and how multiple "events" values are used for SETs 591 conforming to those profiles. Many valid choices are possible. For 592 instance, some profiles might allow multiple event identifiers to be 593 present and specify that any that are not understood by recipients be 594 ignored, thus enabling extensibility. Other profiles might allow 595 multiple event identifiers to be present but require that all be 596 understood if the SET is to be accepted. Some profiles might require 597 that only a single value be present. All such choices are within the 598 scope of Profiling Specifications to define. 600 Profiling Specifications MUST clearly specify the steps that a 601 recipient of a SET utilizing that profile MUST perform to validate 602 that the SET is both syntactically and semantically valid. 604 4. Security Considerations 606 4.1. Confidentiality and Integrity 608 SETs may contain sensitive information. Therefore, methods for 609 distribution of events SHOULD require the use of a transport-layer 610 security mechanism when distributing events. Parties MUST support 611 TLS 1.2 [RFC5246] and MAY support additional transport-layer 612 mechanisms meeting its security requirements. When using TLS, the 613 client MUST perform a TLS/SSL server certificate check, per 614 [RFC6125]. Implementation security considerations for TLS can be 615 found in "Recommendations for Secure Use of TLS and DTLS" [RFC7525]. 617 Security Events distributed through third parties or that carry 618 personally identifiable information SHOULD be encrypted using JWE 619 [RFC7516] or secured for confidentiality by other means. 621 Unless integrity of the JWT is ensured by other means, it MUST be 622 signed using JWS [RFC7515] so that the SET can be authenticated and 623 validated by the Event Recipient. 625 4.2. Delivery 627 This specification does not define a delivery mechanism for SETs. In 628 addition to confidentiality and integrity (discussed above), 629 implementers and Profiling Specifications MUST consider the 630 consequences of delivery mechanisms that are not secure and/or not 631 assured. For example, while a SET may be end-to-end secured using 632 JWE encrypted SETs, without TLS, there is no assurance that the 633 correct endpoint received the SET and that it could be successfully 634 processed. 636 4.3. Sequencing 638 This specification defines no means of ordering multiple SETs in a 639 sequence. Depending on the type and nature of the events represented 640 by SETs, order may or may not matter. For example, in provisioning, 641 event order is critical -- an object cannot be modified before it is 642 created. In other SET types, such as a token revocation, the order 643 of SETs for revoked tokens does not matter. If however, the event 644 conveys a logged in or logged out status for a user subject, then 645 order becomes important. 647 Profiling Specifications and implementers SHOULD take caution when 648 using timestamps such as "iat" to define order. Distributed systems 649 will have some amount of clock skew. Thus, time by itself will not 650 guarantee order. 652 Specifications profiling SET SHOULD define a mechanism for detecting 653 order or sequence of events when the order matters. For example, the 654 "txn" claim could contain an ordered value (e.g., a counter) that the 655 issuer includes. 657 4.4. Timing Issues 659 When SETs are delivered asynchronously and/or out-of-band with 660 respect to the original action that incurred the security event, it 661 is important to consider that a SET might be delivered to an Event 662 Recipient in advance of or behind the process that caused the event. 663 For example, a user having been required to log out and then log back 664 in again, may cause a logout SET to be issued that may arrive at the 665 same time as the user agent accesses a web site having just logged 666 in. If timing is not handled properly, the effect would be to 667 erroneously treat the new user session as logged out. Profiling 668 Specifications SHOULD be careful to anticipate timing and subject 669 selection information. For example, it might be more appropriate to 670 cancel a "session" rather than a "user". Alternatively, the 671 specification could use timestamps that allow new sessions to be 672 started immediately after a stated logout event time. 674 4.5. Distinguishing SETs from ID Tokens 676 Because [RFC7519] states that "all claims that are not understood by 677 implementations MUST be ignored", there is a consideration that a SET 678 might be confused with ID Token [OpenID.Core] if a SET is mistakenly 679 or intentionally used in a context requiring an ID Token. If a SET 680 could otherwise be interpreted as a valid ID Token (because it 681 includes the required claims for an ID Token and valid issuer and 682 audience claim values for an ID Token) then that SET profile MUST 683 require that the "exp" claim not be present in the SET. Because 684 "exp" is a required claim in ID Tokens, valid ID Token 685 implementations will reject such a SET if presented as if it were an 686 ID Token. 688 Excluding "exp" from SETs that could otherwise be confused with ID 689 Tokens is actually defense in depth. In any OpenID Connect contexts 690 in which an attacker could attempt to substitute a SET for an ID 691 Token, the SET would actually already be rejected as an ID Token 692 because it would not contain the correct "nonce" claim value for the 693 ID Token to be accepted in contexts for which substitution is 694 possible. 696 Note that the use of explicit typing, as described in Section 2.3, 697 will not achieve disambiguation between ID Tokens and SETs, as the ID 698 Token validation rules do not use the "typ" header parameter value. 700 4.6. Distinguishing SETs from Access Tokens 702 OAuth 2.0 [RFC6749] defines access tokens as being opaque. 703 Nonetheless, some implementations implement access tokens as JWTs. 704 Because the structure of these JWTs is implementation-specific, 705 ensuring that a SET cannot be confused with such an access token is 706 therefore likewise, in general, implementation specific. 707 Nonetheless, it is recommended that SET profiles employ the following 708 strategies to prevent possible substitutions of SETs for access 709 tokens in contexts in which that might be possible: 711 o Prohibit use of the "exp" claim, as is done to prevent ID Token 712 confusion. 714 o Where possible, use a separate "aud" claim value to distinguish 715 between the Event Recipient and the protected resource that is the 716 audience of an access token. 718 o Modify access token validation systems to check for the presence 719 of the "events" claim as a means to detect security event tokens. 720 This is particularly useful if the same endpoint may receive both 721 types of tokens. 723 o Employ explicit typing, as described in Section 2.3, and modify 724 access token validation systems to use the "typ" header parameter 725 value. 727 4.7. Distinguishing SETs from other kinds of JWTs 729 JWTs are now being used in application areas beyond the identity 730 applications in which they first appeared. For instance, the Session 731 Initiation Protocol (SIP) Via Header Field [RFC8055] and Personal 732 Assertion Token (PASSporT) [I-D.ietf-stir-passport] specifications 733 both define JWT profiles that use mostly or completely different sets 734 of claims than are used by ID Tokens. If it would otherwise be 735 possible for an attacker to substitute a SET for one of these (or 736 other) kinds of JWTs, then the SET profile must be defined in such a 737 way that any substituted SET will result in its rejection when 738 validated as the intended kind of JWT. 740 The most direct way to prevent confusion is to employ explicit 741 typing, as described in Section 2.3, and modify applicable token 742 validation systems to use the "typ" header parameter value. This 743 approach can be employed for new systems but may not be applicable to 744 existing systems. 746 Another way to ensure that a SET is not confused with another kind of 747 JWT is to have the JWT validation logic reject JWTs containing an 748 "events" claim unless the JWT is intended to be a SET. This approach 749 can be employed for new systems but may not be applicable to existing 750 systems. 752 For many use cases, the simplest way to prevent substitution is 753 requiring that the SET not include claims that are required for the 754 kind of JWT that might be the target of an attack. For example, for 755 [RFC8055], the "sip_callid" claim could be omitted and for 756 [I-D.ietf-stir-passport], the "orig" claim could be omitted. 758 In many contexts, simple measures such as these will accomplish the 759 task, should confusion otherwise even be possible. Note that this 760 topic is being explored in a more general fashion in JSON Web Token 761 Best Current Practices [I-D.ietf-oauth-jwt-bcp]. The proposed best 762 practices in that draft may also be applicable for particular SET 763 profiles and use cases. 765 5. Privacy Considerations 767 If a SET needs to be retained for audit purposes, the signature can 768 be used to provide verification of its authenticity. 770 Event Issuers SHOULD attempt to specialize SETs so that their content 771 is targeted to the specific business and protocol needs of the 772 intended Event Recipients. 774 When sharing personally identifiable information or information that 775 is otherwise considered confidential to affected users, Event Issuers 776 and Recipients MUST have the appropriate legal agreements and user 777 consent and/or terms of service in place. 779 The propagation of subject identifiers can be perceived as personally 780 identifiable information. Where possible, Event Issuers and 781 Recipients SHOULD devise approaches that prevent propagation -- for 782 example, the passing of a hash value that requires the Event 783 Recipient to know the subject. 785 6. IANA Considerations 787 6.1. JSON Web Token Claims Registration 789 This specification registers the "events", "toe", and "txn" claims in 790 the IANA "JSON Web Token Claims" registry [IANA.JWT.Claims] 791 established by [RFC7519]. 793 6.1.1. Registry Contents 795 o Claim Name: "events" 796 o Claim Description: Security Event URI 797 o Change Controller: IESG 798 o Specification Document(s): Section 2.2 of [[ this specification ]] 800 o Claim Name: "toe" 801 o Claim Description: Time of Event 802 o Change Controller: IESG 803 o Specification Document(s): Section 2.2 of [[ this specification ]] 805 o Claim Name: "txn" 806 o Claim Description: Transaction Identifier 807 o Change Controller: IESG 808 o Specification Document(s): Section 2.2 of [[ this specification ]] 810 6.2. Media Type Registration 812 6.2.1. Registry Contents 814 This section registers the "application/secevent+jwt" media type 815 [RFC2046] in the "Media Types" registry [IANA.MediaTypes] in the 816 manner described in [RFC6838], which can be used to indicate that the 817 content is a SET. 819 o Type name: application 820 o Subtype name: secevent+jwt 821 o Required parameters: n/a 822 o Optional parameters: n/a 823 o Encoding considerations: 8bit; A SET is a JWT; JWT values are 824 encoded as a series of base64url-encoded values (some of which may 825 be the empty string) separated by period ('.') characters. 826 o Security considerations: See the Security Considerations section 827 of [[ this specification ]] 828 o Interoperability considerations: n/a 829 o Published specification: Section 2.3 of [[ this specification ]] 830 o Applications that use this media type: TBD 831 o Fragment identifier considerations: n/a 832 o Additional information: 834 Magic number(s): n/a 835 File extension(s): n/a 836 Macintosh file type code(s): n/a 838 o Person & email address to contact for further information: 839 Michael B. Jones, mbj@microsoft.com 840 o Intended usage: COMMON 841 o Restrictions on usage: none 842 o Author: Michael B. Jones, mbj@microsoft.com 843 o Change controller: IESG 844 o Provisional registration? No 846 7. References 848 7.1. Normative References 850 [IANA.JWT.Claims] 851 IANA, "JSON Web Token Claims", 852 . 854 [IANA.MediaTypes] 855 IANA, "Media Types", 856 . 858 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 859 Requirement Levels", BCP 14, RFC 2119, 860 DOI 10.17487/RFC2119, March 1997, 861 . 863 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 864 Resource Identifier (URI): Generic Syntax", STD 66, 865 RFC 3986, DOI 10.17487/RFC3986, January 2005, 866 . 868 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 869 (TLS) Protocol Version 1.2", RFC 5246, 870 DOI 10.17487/RFC5246, August 2008, 871 . 873 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 874 Verification of Domain-Based Application Service Identity 875 within Internet Public Key Infrastructure Using X.509 876 (PKIX) Certificates in the Context of Transport Layer 877 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 878 2011, . 880 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 881 RFC 6749, DOI 10.17487/RFC6749, October 2012, 882 . 884 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 885 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 886 . 888 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 889 "Recommendations for Secure Use of Transport Layer 890 Security (TLS) and Datagram Transport Layer Security 891 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 892 2015, . 894 [RFC7617] Reschke, J., "The 'Basic' HTTP Authentication Scheme", 895 RFC 7617, DOI 10.17487/RFC7617, September 2015, 896 . 898 7.2. Informative References 900 [I-D.ietf-oauth-jwt-bcp] 901 Sheffer, Y., Hardt, D., and M. Jones, "JSON Web Token Best 902 Current Practices", draft-ietf-oauth-jwt-bcp-00 (work in 903 progress), July 2017. 905 [I-D.ietf-stir-passport] 906 Wendt, C. and J. Peterson, "Personal Assertion Token 907 (PASSporT)", draft-ietf-stir-passport-11 (work in 908 progress), February 2017. 910 [OpenID.Core] 911 Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and 912 C. Mortimore, "OpenID Connect Core 1.0", November 2014, 913 . 915 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 916 Extensions (MIME) Part Two: Media Types", RFC 2046, 917 DOI 10.17487/RFC2046, November 1996, 918 . 920 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 921 Specifications and Registration Procedures", BCP 13, 922 RFC 6838, DOI 10.17487/RFC6838, January 2013, 923 . 925 [RFC7009] Lodderstedt, T., Ed., Dronia, S., and M. Scurtescu, "OAuth 926 2.0 Token Revocation", RFC 7009, DOI 10.17487/RFC7009, 927 August 2013, . 929 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 930 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 931 2015, . 933 [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", 934 RFC 7516, DOI 10.17487/RFC7516, May 2015, 935 . 937 [RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517, 938 DOI 10.17487/RFC7517, May 2015, 939 . 941 [RFC7644] Hunt, P., Ed., Grizzle, K., Ansari, M., Wahlstroem, E., 942 and C. Mortimore, "System for Cross-domain Identity 943 Management: Protocol", RFC 7644, DOI 10.17487/RFC7644, 944 September 2015, . 946 [RFC8055] Holmberg, C. and Y. Jiang, "Session Initiation Protocol 947 (SIP) Via Header Field Parameter to Indicate Received 948 Realm", RFC 8055, DOI 10.17487/RFC8055, January 2017, 949 . 951 [RISC] OpenID Foundation, "OpenID Risk and Incident Sharing and 952 Coordination (RISC) Working Group", 953 . 955 [saml-core-2.0] 956 Internet2, "Assertions and Protocols for the OASIS 957 Security Assertion Markup Language (SAML) V2.0", March 958 2005. 960 Appendix A. Acknowledgments 962 The editors would like to thank the members of the IETF SCIM working 963 group, which began discussions of provisioning events starting with 964 draft-hunt-scim-notify-00 in 2015. 966 The editors would like to thank the participants in the IETF id-event 967 mailing list, the Security Events working group, and related working 968 groups for their contributions to this specification. 970 Appendix B. Change Log 972 [[ to be removed by the RFC Editor before publication as an RFC ]] 974 From the original draft-hunt-idevent-token: 976 Draft 01 - PH - Renamed eventUris to events 978 Draft 00 - PH - First Draft 980 Draft 01 - PH - Fixed some alignment issues with JWT. Remove event 981 type attribute. 983 Draft 02 - PH - Renamed to Security Events, removed questions, 984 clarified examples and intro text, and added security and privacy 985 section. 987 Draft 03 - PH 989 General edit corrections from Sarah Squire 991 Changed "event" term to "SET" 993 Corrected author organization for William Denniss to Google 995 Changed definition of SET to be 2 parts, an envelope and 1 or more 996 payloads. 998 Clarified that the intent is to express a single event with 999 optional extensions only. 1001 - mbj - Registered "events" claim, and proof-reading corrections. 1003 Draft 04 - PH - 1005 o Re-added the "sub" claim with clarifications that any SET type may 1006 use it. 1008 o Added additional clarification on the use of envelope vs. payload 1009 attributes 1011 o Added security consideration for event timing. 1013 o Switched use of "attribute" to "claim" for consistency. 1015 o Revised examples to put "sub" claim back in the top level. 1017 o Added clarification that SETs typically do not use "exp". 1019 o Added security consideration for distinguishing Access Tokens and 1020 SETs. 1022 Draft 05 - PH - Fixed find/replace error that resulted in claim being 1023 spelled claimc 1025 Draft 06 - PH - 1027 o Corrected typos 1029 o New txn claim 1031 o New security considerations Sequencing and Timing Issues 1033 Draft 07 - 1035 o PH - Moved payload objects to be values of event URI attributes, 1036 per discussion. 1038 o mbj - Applied terminology consistency and grammar cleanups. 1040 Draft 08 - PH - 1042 o Added clarification to status of examples 1044 o Changed from primary vs. extension to state that multiple events 1045 may be expressed, some of which may or may not be considered 1046 extensions of others (which is for the subscriber or profiling 1047 specifications to determine). 1049 o Other editorial changes suggested by Yaron 1050 From draft-ietf-secevent-token: 1052 Draft 00 - PH - First WG Draft based on draft-hunt-idevent-token 1054 Draft 01 - PH - Changes as follows: 1056 o Changed terminology away from pub-sub to transmitter/receiver 1057 based on WG feedback 1059 o Cleaned up/removed some text about extensions (now only used as 1060 example) 1062 o Clarify purpose of spec vs. future profiling specs that define 1063 actual events 1065 Draft 02 - Changes are as follows: 1067 o mbj - Added the Requirements for SET Profiles section. 1069 o mbj - Expanded the Security Considerations section to describe how 1070 to prevent confusion of SETs with ID Tokens, access tokens, and 1071 other kinds of JWTs. 1073 o mbj - Registered the "application/secevent+jwt" media type and 1074 defined how to use it for explicit typing of SETs. 1076 o mbj - Clarified the misleading statement that used to say that a 1077 SET conveys a single security event. 1079 o mbj - Added a note explicitly acknowledging that some SET profiles 1080 may choose to convey event subject information in the event 1081 payload. 1083 o PH - Corrected encoded claim example on page 10. 1085 o mbj - Applied grammar corrections. 1087 Draft 03 - Changes As Follows: 1089 o pjh - Corrected old "subscriber" to "Event Receiver". Added 1090 clarification in definition that Event Receiver is the same as JWT 1091 recipient. 1093 o pjh - Added definition for "toe" (and IANA registration). 1095 o pjh - Removed "nbf" claim. 1097 o pjh - Figure 3, moved "sub" to the events payload next to "iss". 1099 o pjh - Clarified the use of "nonce" in contexts where substitution 1100 is possible. 1102 o mbj - Addressed WGLC comments by Nat Sakimura. 1104 o mbj - Addressed WGLC comments by Annabelle Backman. 1106 o mbj - Addressed WGLC comments by Marius Scurtescu. 1108 Draft 04 - mbj - Changes were as follows: 1110 o Clarified that all "events" values must represent aspects of the 1111 same state change that occurred to the subject -- not an 1112 aggregation of unrelated events about the subject. 1114 o Removed ambiguities about the roles of multiple "events" values 1115 and the responsibilities of profiling specifications for defining 1116 how and when they are used. 1118 o Corrected places where the term JWT was used when what was 1119 actually being discussed was the JWT Claims Set. 1121 o Addressed terminology inconsistencies. In particular, 1122 standardized on using the term "issuer" to align with JWT 1123 terminology and the "iss" claim. Previously the term 1124 "transmitter" was sometimes used and "issuer" was sometimes used. 1125 Likewise, standardized on using the term "recipient" instead of 1126 "receiver" for the same reasons. 1128 o Added a RISC event example, courtesy of Marius Scurtescu. 1130 o Applied wording clarifications suggested by Annabelle Backman and 1131 Yaron Sheffer. 1133 o Applied numerous grammar, syntax, and formatting corrections. 1135 Authors' Addresses 1137 Phil Hunt (editor) 1138 Oracle Corporation 1140 Email: phil.hunt@yahoo.com 1142 Michael B. Jones 1143 Microsoft 1145 Email: mbj@microsoft.com 1146 URI: http://self-issued.info/ 1147 William Denniss 1148 Google 1150 Email: wdenniss@google.com 1152 Morteza Ansari 1153 Cisco 1155 Email: morteza.ansari@cisco.com