draft-ietf-secevent-token-03.txt   draft-ietf-secevent-token-04.txt 
Security Events Working Group P. Hunt, Ed. Security Events Working Group P. Hunt, Ed.
Internet-Draft Oracle Internet-Draft Oracle
Intended status: Standards Track W. Denniss Intended status: Standards Track M. Jones
Expires: April 29, 2018 Google Expires: July 24, 2018 Microsoft
W. Denniss
Google
M. Ansari M. Ansari
Cisco Cisco
M. Jones January 20, 2018
Microsoft
October 26, 2017
Security Event Token (SET) Security Event Token (SET)
draft-ietf-secevent-token-03 draft-ietf-secevent-token-04
Abstract Abstract
This specification defines the Security Event Token, which may be This specification defines the Security Event Token (SET) data
distributed via a protocol such as HTTP. The Security Event Token structure. A SET describes a statement of fact from the perspective
(SET) specification profiles the JSON Web Token (JWT), which can be of an issuer, which is intended to be shared with one or more
optionally signed and/or encrypted. A SET describes a statement of recipients. A SET is a JSON Web Token (JWT), which can be optionally
fact from the perspective of an issuer that it intends to share with signed and/or encrypted. SETs can be distributed via protocols such
one or more receivers. as HTTP.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 29, 2018. This Internet-Draft will expire on July 24, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction and Overview . . . . . . . . . . . . . . . . . . 2 1. Introduction and Overview . . . . . . . . . . . . . . . . . . 2
1.1. Notational Conventions . . . . . . . . . . . . . . . . . 4 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 4
1.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 4 1.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 4
2. The Security Event Token (SET) . . . . . . . . . . . . . . . 5 2. The Security Event Token (SET) . . . . . . . . . . . . . . . 5
2.1. Core SET Claims . . . . . . . . . . . . . . . . . . . . . 8 2.1. Illustrative Examples . . . . . . . . . . . . . . . . . . 6
2.2. Explicit Typing of SETs . . . . . . . . . . . . . . . . . 10 2.1.1. SCIM Example . . . . . . . . . . . . . . . . . . . . 6
2.3. Security Event Token Construction . . . . . . . . . . . . 10 2.1.2. Logout Example . . . . . . . . . . . . . . . . . . . 7
3. Requirements for SET Profiles . . . . . . . . . . . . . . . . 12 2.1.3. Consent Example . . . . . . . . . . . . . . . . . . . 7
4. Security Considerations . . . . . . . . . . . . . . . . . . . 13 2.1.4. RISC Example . . . . . . . . . . . . . . . . . . . . 8
4.1. Confidentiality and Integrity . . . . . . . . . . . . . . 13 2.2. Core SET Claims . . . . . . . . . . . . . . . . . . . . . 9
4.2. Delivery . . . . . . . . . . . . . . . . . . . . . . . . 13 2.3. Explicit Typing of SETs . . . . . . . . . . . . . . . . . 11
4.3. Sequencing . . . . . . . . . . . . . . . . . . . . . . . 13 2.4. Security Event Token Construction . . . . . . . . . . . . 11
4.4. Timing Issues . . . . . . . . . . . . . . . . . . . . . . 14 3. Requirements for SET Profiles . . . . . . . . . . . . . . . . 13
4.5. Distinguishing SETs from ID Tokens . . . . . . . . . . . 14 4. Security Considerations . . . . . . . . . . . . . . . . . . . 14
4.6. Distinguishing SETs from Access Tokens . . . . . . . . . 15 4.1. Confidentiality and Integrity . . . . . . . . . . . . . . 14
4.7. Distinguishing SETs from other kinds of JWTs . . . . . . 15 4.2. Delivery . . . . . . . . . . . . . . . . . . . . . . . . 14
5. Privacy Considerations . . . . . . . . . . . . . . . . . . . 16 4.3. Sequencing . . . . . . . . . . . . . . . . . . . . . . . 15
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 4.4. Timing Issues . . . . . . . . . . . . . . . . . . . . . . 15
6.1. JSON Web Token Claims Registration . . . . . . . . . . . 17 4.5. Distinguishing SETs from ID Tokens . . . . . . . . . . . 15
6.1.1. Registry Contents . . . . . . . . . . . . . . . . . . 17 4.6. Distinguishing SETs from Access Tokens . . . . . . . . . 16
6.2. Media Type Registration . . . . . . . . . . . . . . . . . 17 4.7. Distinguishing SETs from other kinds of JWTs . . . . . . 17
6.2.1. Registry Contents . . . . . . . . . . . . . . . . . . 17 5. Privacy Considerations . . . . . . . . . . . . . . . . . . . 17
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18
7.1. Normative References . . . . . . . . . . . . . . . . . . 18 6.1. JSON Web Token Claims Registration . . . . . . . . . . . 18
7.2. Informative References . . . . . . . . . . . . . . . . . 19 6.1.1. Registry Contents . . . . . . . . . . . . . . . . . . 18
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 20 6.2. Media Type Registration . . . . . . . . . . . . . . . . . 18
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 20 6.2.1. Registry Contents . . . . . . . . . . . . . . . . . . 18
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 23 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.1. Normative References . . . . . . . . . . . . . . . . . . 19
7.2. Informative References . . . . . . . . . . . . . . . . . 20
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 22
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 22
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25
1. Introduction and Overview 1. Introduction and Overview
This specification defines an extensible Security Event Token (SET) This specification defines an extensible Security Event Token (SET)
format which may be exchanged using protocols such as HTTP. The data structure, which can be exchanged using protocols such as HTTP.
specification builds on the JSON Web Token (JWT) format [RFC7519] in The specification builds on the JSON Web Token (JWT) format [RFC7519]
order to provide a self-contained token that can be optionally signed in order to provide a self-contained token that can be optionally
using JSON Web Signature (JWS) [RFC7515] and/or encrypted using JSON signed using JSON Web Signature (JWS) [RFC7515] and/or encrypted
Web Encryption (JWE) [RFC7516]. using JSON Web Encryption (JWE) [RFC7516].
This specification profiles the use of JWT for the purpose of issuing This specification profiles the use of JWT for the purpose of issuing
security event tokens (SETs). This specification defines a base Security Event Tokens (SETs). This specification defines a base
format upon which profiling specifications define actual events and format used by profiling specifications to define actual events and
their meanings. Unless otherwise specified, this specification uses their meanings. This specification uses non-normative example events
non-normative example events intended to demonstrate how events may to demonstrate how events can be constructed.
be constructed.
This specification is scoped to security and identity related events. This specification is scoped to security and identity related events.
While security event tokens may be used for other purposes, the While security event tokens may be used for other purposes, the
specification only considers security and privacy concerns relevant specification only considers security and privacy concerns relevant
to identity and personal information. to identity and personal information.
Security Events are not commands issued between parties. A security Security Events are not commands issued between parties. A security
event is a statement of fact from the perspective of an issuer about event is a statement of fact from the perspective of an issuer about
the state of a security subject (e.g., a web resource, token, IP the state of a security subject (e.g., a web resource, token, IP
address, the issuer itself) that the issuer controls or is aware of, address, the issuer itself) that the issuer controls or is aware of,
that has changed in some way (explicitly or implicitly). A security that has changed in some way (explicitly or implicitly). A security
subject MAY be permanent (e.g., a user account) or temporary (e.g., subject MAY be permanent (e.g., a user account) or temporary (e.g.,
an HTTP session) in nature. A state change could describe a direct an HTTP session) in nature. A state change could describe a direct
change of entity state, an implicit change of state or other higher- change of entity state, an implicit change of state, or other higher-
level security statements such as: level security statements such as:
o The creation, modification, removal of a resource. o The creation, modification, removal of a resource.
o The resetting or suspension of an account. o The resetting or suspension of an account.
o The revocation of a security token prior to its expiry. o The revocation of a security token prior to its expiry.
o The logout of a user session. Or, o The logout of a user session. Or,
o A cumulative conclusion such as to indicate that a user has taken o An indication that a user has been given control of an email
over an email identifier that may have been used in the past by identifier that was previously controlled by another user.
another user.
While subject state changes are often triggered by a user-agent or While subject state changes are often triggered by a user agent or
security-subsystem, the issuance and transmission of an event often security subsystem, the issuance and transmission of an event may
occurs asynchronously and in a back-channel to the action which occur asynchronously and in a back channel to the action that caused
caused the change that generated the security event. Subsequently, the change that generated the security event. Subsequently, an Event
an Event Receiver, having received a SET, validates and interprets Recipient, having received a SET, validates and interprets the
the received SET and takes its own independent actions, if any. For received SET and takes its own independent actions, if any. For
example, having been informed of a personal identifier being example, having been informed of a personal identifier being
associated with a different security subject (e.g., an email address associated with a different security subject (e.g., an email address
is being used by someone else), the Event Receiver may choose to is being used by someone else), the Event Recipient may choose to
ensure that the new user is not granted access to resources ensure that the new user is not granted access to resources
associated with the previous user. Or, the Event Receiver may not associated with the previous user. Or, the Event Recipient may not
have any relationship with the subject, and no action is taken. have any relationship with the subject, and no action is taken.
While Event Receivers will often take actions upon receiving SETs, While Event Recipients will often take actions upon receiving SETs,
security events cannot be assumed to be commands or requests. The security events cannot be assumed to be commands or requests. The
intent of this specification is to define a way of exchanging intent of this specification is to define a syntax for statements of
statements of fact that Event Receivers may interpret for their own fact that Event Recipients may interpret for their own purposes. As
purposes. As such, SETs have no capability for error signaling other such, SETs have no capability for error signaling to ensure the
to ensure the validation of a received SET. validation of a received SET.
1.1. Notational Conventions 1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
[RFC2119]. These keywords are capitalized when used to unambiguously [RFC2119]. These keywords are capitalized when used to unambiguously
specify requirements of the protocol or application features and specify requirements of the protocol or application features and
behavior that affect the inter-operability and security of behavior that affect the inter-operability and security of
implementations. When these words are not capitalized, they are implementations. When these words are not capitalized, they are
skipping to change at page 4, line 37 skipping to change at page 4, line 37
Throughout this document, all figures MAY contain spaces and extra Throughout this document, all figures MAY contain spaces and extra
line-wrapping for readability and space limitations. Similarly, some line-wrapping for readability and space limitations. Similarly, some
URIs contained within examples have been shortened for space and URIs contained within examples have been shortened for space and
readability reasons. readability reasons.
1.2. Definitions 1.2. Definitions
The following definitions are used with SETs: The following definitions are used with SETs:
Security Event Token (SET) Security Event Token (SET)
A SET is a JWT [RFC7519] that is distributed to one or more A SET is a JWT [RFC7519] conforming to this specification that is
registered Event Receivers. distributed to one or more Event Recipients.
Event Transmitter Event Issuer
A service provider that delivers SETs to other providers known as A service provider that creates SETs to be sent to other providers
Event Receivers. known as Event Recipients.
Event Receiver Event Recipient
An Event Receiver is an entity that receives SETs through some An Event Recipient is an entity that receives SETs through some
distribution method. An Event Receiver is the same entity distribution method. An Event Recipient is the same entity
referred as "recipient" or "receiver" in and related referred as a "recipient" or "receiver" in [RFC7519] and related
specifications. [RFC7519] specifications.
Subject Subject
A SET describes an event or state change that has occurred about a A SET describes an event or state change that has occurred about a
Subject. A Subject may be a principal (e.g., Section 4.1.2 Subject. A Subject might, for instance, be a principal (e.g.,
Section 4.1.2 of [RFC7519]), a web resource, an entity such as an
[RFC7519]), a web resource, an entity such as an IP address, or IP address, or the issuer of the SET.
the issuer itself that a SET might reference.
Profiling Specification A specification that uses the SET Token Profiling Specification
specification to define one or more event types and the associated A specification that profiles the SET data structure to define one
claims included. or more specific event types and their associated claims and
processing rules.
2. The Security Event Token (SET) 2. The Security Event Token (SET)
A SET is a data structure (in the form of a JWT [RFC7519]) A SET is a JWT [RFC7519] data structure that represents one or more
representing one or more related security events about a Subject. related aspects of a security event about a Subject. The JWT Claims
Set in a SET has the following structure:
The schema and structure of a SET follows the JWT [RFC7519]
specification. A SET has the following structure:
o An outer JSON object that acts as the SET "envelope". The o The top-level claims in the JWT Claims Set are called the SET
envelope contains a set of name/value pairs called the JWT Claims "envelope". Some of these claims are present in every SET; others
Set, typically common to every SET or common to a number of will be specific to particular SET profiles or profile families.
different Events within a single Profiling Specification or a Claims in the envelope SHOULD be registered in the "JSON Web Token
related series of specifications. Claims in the envelope (the Claims" registry [IANA.JWT.Claims] or be Public Claims or Private
outer JSON structure) SHOULD be registered in the JWT Token Claims Claims, as defined in [RFC7519].
Registry [IANA.JWT.Claims] or be Public Claims or Private Claims
as also defined in [RFC7519].
o Envelope claims that are profiled and defined in this o Envelope claims that are profiled and defined in this
specification are used to validate a SET and declare the contents specification are used to validate the SET and provide information
of the event data included in the SET. The claim "events" about the event data included in the SET. The claim "events"
identifies the event types expressed that are related to the contains the event identifiers and event-specific data expressed
Security Subject and MAY also include event-specific data. about the Security Subject. The envelope MAY include event-
specific or profile-specific data.
o Each JSON member of the "events" object is a name and value pair. o Each member of the "events" JSON object is a name/value pair. The
The JSON attribute name is a URI String value that expresses an JSON member name is a URI string value is an event identifier, and
event type, and the corresponding value is a JSON object known as the corresponding value is a JSON object known as the event
the event "payload". The payload JSON object contains claims "payload". The payload JSON object contains claims that pertain
typically unique to the event's URI type value and are not to that event identifier and need not be registered as JWT claims.
registered as JWT claims. These claims are defined by their These claims are defined by the Profiling Specification that
associated Profiling Specification. An event with no payload defines the event. An event with no payload claims SHALL be
claims SHALL be represented as the empty JSON object ("{}"). In represented as the empty JSON object ("{}").
many cases, one event URI expresses the primary event URI, while
other events might be considered extensions that MAY be used to do
things such as:
* A categorization event type to provide classification o When multiple event identifiers are contained in a SET, they
information (e.g., threat type or level). represent multiple aspects of the same state transition that
occurred to the Security Subject. They are not intended to be
used to aggregate distinct events about the same subject. Beyond
this, the interpretation of SETs containing multiple event
identifiers is out of scope for this specification; Profiling
Specifications MAY define their own rules regarding their use of
SETs containing multiple event identifiers, as described in
Section 3. Possible uses of multiple values include, but are not
limited to:
* An enhancement of an existing specifications the arise over * Values to provide classification information (e.g., threat type
time. or level).
* An extension needed to link a potential series of events. * Additions to existing event representations.
* Localized specific purpose event URI used between a particular * Values used to link potential series of events.
Event Transmitter and Receiver.
* Specific-purpose event URIs used between particular Event
Issuers and Event Recipients.
2.1. Illustrative Examples
2.1.1. SCIM Example
The following is a non-normative example showing the JWT Claims Set The following is a non-normative example showing the JWT Claims Set
for a hypothetical SCIM password reset SET. This example shows an for a hypothetical SCIM [RFC7644] password reset SET. This example
additional events value ("https://example.com/scim/event/ uses a second "events" value ("https://example.com/scim/event/
passwordResetExt") used to convey additional information -- in this passwordResetExt") to convey additional information about the state
case, the current count of reset attempts: change -- in this case, the current count of reset attempts:
{ {
"jti": "3d0c3cf797584bd193bd0fb1bd4e7d30", "jti": "3d0c3cf797584bd193bd0fb1bd4e7d30",
"iat": 1458496025, "iat": 1458496025,
"iss": "https://scim.example.com", "iss": "https://scim.example.com",
"aud": [ "aud": [
"https://jhub.example.com/Feeds/98d52461fa5bbc879593b7754", "https://jhub.example.com/Feeds/98d52461fa5bbc879593b7754",
"https://jhub.example.com/Feeds/5d7604516b1d08641d7676ee7" "https://jhub.example.com/Feeds/5d7604516b1d08641d7676ee7"
], ],
"sub": "https://scim.example.com/Users/44f6142df96bd6ab61e7521d9", "sub": "https://scim.example.com/Users/44f6142df96bd6ab61e7521d9",
"events": { "events": {
"urn:ietf:params:scim:event:passwordReset": "urn:ietf:params:scim:event:passwordReset":
{ "id":"44f6142df96bd6ab61e7521d9"}, { "id": "44f6142df96bd6ab61e7521d9"},
"https://example.com/scim/event/passwordResetExt": "https://example.com/scim/event/passwordResetExt":
{ "resetAttempts":5} { "resetAttempts": 5}
} }
} }
Figure 1: Example SCIM Password Reset Event Figure 1: Example SCIM Password Reset Event
The event in the figure above expresses hypothetical password reset The JWT Claims Set consists of:
event for SCIM [RFC7644]. The JWT consists of:
o An "events" claim specifying the hypothetical SCIM URN o The "events" claim specifying the hypothetical SCIM URN
("urn:ietf:params:scim:event:passwordReset") for a password reset, ("urn:ietf:params:scim:event:passwordReset") for a password reset,
and a local schema, "https://example.com/scim/event/ and a second value, "https://example.com/scim/event/
passwordResetExt", that is used to provide additional event passwordResetExt", that is used to provide additional event
information such as the current count of resets. information such as the current count of resets.
o An "iss" claim, denoting the Event Transmitter. o The "iss" claim, denoting the Event Issuer.
o The "sub" claim specifies the SCIM resource URI that was affected. o The "sub" claim, specifying the SCIM resource URI that was
affected.
o The "aud" claim specifies the intended audiences for the event. o The "aud" claim, specifying the intended audiences for the event.
The syntax of the "aud" claim is defined in Section 4.1.3 (The syntax of the "aud" claim is defined in Section 4.1.3 of
[RFC7519]. [RFC7519].)
In this example, the SCIM event indicates that a password has been In this example, the SCIM event indicates that a password has been
updated and the current password reset count is 5. Notice that the updated and the current password reset count is 5. Notice that the
value for "resetAttempts" is actually part of its own JSON object value for "resetAttempts" is in the event payload of an event used to
associated with its own event URI attribute. convey this information.
2.1.2. Logout Example
Here is another example JWT Claims Set for a security event token, Here is another example JWT Claims Set for a security event token,
this one for a Logout Token: this one for a Logout Token:
{ {
"iss": "https://server.example.com", "iss": "https://server.example.com",
"sub": "248289761001", "sub": "248289761001",
"aud": "s6BhdRkqt3", "aud": "s6BhdRkqt3",
"iat": 1471566154, "iat": 1471566154,
"jti": "bWJq", "jti": "bWJq",
"sid": "08a5019c-17e1-4977-8f42-65a12843ea02", "sid": "08a5019c-17e1-4977-8f42-65a12843ea02",
"events": { "events": {
"http://schemas.openid.net/event/backchannel-logout": {} "http://schemas.openid.net/event/backchannel-logout": {}
} }
} }
Figure 2: Example OpenID Back-Channel Logout Event Figure 2: Example OpenID Back-Channel Logout Event
Note that the above SET has an empty JSON object and uses the JWT Note that the above SET has an empty JSON object and uses the JWT
registered claims "sub" and "sid" to identify the subject that was registered claims "sub" and "sid" to identify the subject that was
logged-out. logged out.
2.1.3. Consent Example
In the following example JWT Claims Set, a fictional medical service In the following example JWT Claims Set, a fictional medical service
collects consent for medical actions and notifies other parties. The collects consent for medical actions and notifies other parties. The
individual for whom consent is identified was originally individual for whom consent is identified was originally
authenticated via OpenID Connect. In this case, the issuer of the authenticated via OpenID Connect. In this case, the issuer of the
security event is an application rather than the OpenID provider: security event is an application rather than the OpenID provider:
{ {
"jti": "fb4e75b5411e4e19b6c0fe87950f7749", "jti": "fb4e75b5411e4e19b6c0fe87950f7749",
"iat": 1458496025, "iat": 1458496025,
"iss": "https://my.examplemed.com", "iss": "https://my.examplemed.com",
"aud": [ "aud": [
"https://rp.example.com" "https://rp.example.com"
], ],
"events": { "events": {
"https://openid.net/heart/specs/consent.html":{ "https://openid.net/heart/specs/consent.html": {
"iss":"https://connect.example.com", "iss": "https://connect.example.com",
"sub": "248289761001", "sub": "248289761001",
"consentUri":[ "consentUri": [
"https://terms.examplemed.com/labdisclosure.html#Agree" "https://terms.examplemed.com/labdisclosure.html#Agree"
] ]
} }
} }
} }
Figure 3: Example Consent Event Figure 3: Example Consent Event
In the above example, the attribute "iss" contained within the In the above example, the attribute "iss" contained within the
payload for the event "https://openid.net/heart/specs/consent.html" payload for the event "https://openid.net/heart/specs/consent.html"
refers to the issuer of the Security Subject ("sub") rather than the refers to the issuer of the Security Subject ("sub") rather than the
event issuer "https://my.examplemed.com". They are distinct from the event issuer "https://my.examplemed.com". They are distinct from the
top level value of "iss", which always refers to the issuer of the top level value of "iss", which always refers to the issuer of the
event - a medical consent service that is a relying party to the event - a medical consent service that is a relying party to the
OpenID Provider. OpenID Provider.
2.1. Core SET Claims 2.1.4. RISC Example
The following example JWT Claims Set is for an account disabled
event. This example was taken from a working draft of the RISC
events specification, where RISC is the OpenID RISC (Risk and
Incident Sharing and Coordination) working group [RISC]. The example
is subject to change.
The following are claims that are based on [RFC7519] claim {
definitions and are profiled for use in an event token: "iss": "https://idp.example.com/",
"sub": "7375626A656374",
"jti": "756E69717565206964656E746966696572",
"iat": 1508184845,
"aud": "636C69656E745F6964",
"events": {
"http://schemas.openid.net/secevent/risc/event-type/\
account-disabled": {
"reason": "hijacking",
"cause-time": 1508012752,
}
}
}
Figure 4: Example RISC Event
Notice that parameters to the event are included in the event
payload, in this case, the "reason" and "cause-time" values. The
account that is the subject of the event is identified using the
"iss" and "sub" values, in the same manner as OpenID Connect
[OpenID.Core] ID Tokens.
2.2. Core SET Claims
The following claims from [RFC7519] are profiled for use in SETs:
jti jti
As defined by Section 4.1.7 [RFC7519] contains a unique identifier As defined by Section 4.1.7 of [RFC7519] contains a unique
for an event. The identifier SHOULD be unique within a particular identifier for an event. The identifier SHOULD be unique within a
event feed and MAY be used by clients to track whether a particular event feed and MAY be used by clients to track whether
particular event has already been received. This claim is a particular event has already been received. This claim is
REQUIRED. REQUIRED.
iss iss
A single valued String containing the URI of the service provider A string identifying the service provider publishing the SET (the
publishing the SET (the issuer). This claim is REQUIRED. Note issuer). In some cases, the SET issuer is not the issuer of the
that when a SET is expressing an event about a Security Subject Security Subject. Therefore, implementers cannot assume that the
for which the SET issuer is not the issuer of the Security issuers are the same unless the Profiling Specification specifies
Subject, the conflict SHALL be resolved by including the Security that they are for SETs conforming to that profile. This claim is
Subject "iss" value within the event "payload" (see "events" REQUIRED.
claim).
aud aud
The syntax of the claim is as defined in Section 4.1.3 [RFC7519]. The syntax of the claim is as defined in Section 4.1.3 of
This claim contains one or more audience identifiers for the SET. [RFC7519]. This claim contains one or more audience identifiers
This claim is RECOMMENDED. for the SET. This claim is RECOMMENDED.
iat iat
As defined by Section 4.1.6 [RFC7519], a value containing a As defined by Section 4.1.6 of [RFC7519], a value representing
NumericDate, which represents when the event was issued. Unless when the event was issued. Unless otherwise specified, the value
otherwise specified, the value SHOULD be interpreted as equivalent SHOULD be interpreted as equivalent to the actual time of the
to the actual time of the event. This claim is REQUIRED. event. This claim is REQUIRED.
toe A number whose value is a Numeric Data ( see Section 2
[RFC7519]). The value is the date and time in which the event is
believed to have occurred in the past or will occur in the future.
This claim is RECOMMENDED. Note that some profiles may choose to
omit "toe" and convey event time information with the "iat"claim
or another claim.
sub As defined by Section 4.1.2 [RFC7519], a String or URI value sub
As defined by Section 4.1.2 of [RFC7519], a String or URI value
representing the principal or the subject of the SET. This is representing the principal or the subject of the SET. This is
usually the entity whose "state" was changed. For example, an IP usually the entity whose "state" was changed. For example, an IP
Address was added to a black list. A URI representing a user Address was added to a black list. A URI representing a user
resource that was modified. A token identifier for a revoked resource that was modified. A token identifier for a revoked
token. If used, the Profiling Specification SHOULD define the token. If used, the Profiling Specification SHOULD define the
content and format semantics for the value. This claim is content and format semantics for the value. This claim is
OPTIONAL, as the principal for any given profile may already be OPTIONAL, as the principal for any given profile may already be
identified without the inclusion of a subject claim. Note that identified without the inclusion of a subject claim. Note that
some SET profiles MAY choose to convey event subject information some SET profiles MAY choose to convey event subject information
in the event payload (either using the "sub" member name or in the event payload (either using the "sub" member name or
another name), particularly if the subject information is relative another name), particularly if the subject information is relative
to issuer information that is also conveyed in the event payload, to issuer information that is also conveyed in the event payload,
which may be the case for some identity SET profiles. which may be the case for some identity SET profiles.
exp As defined by [RFC7519], this claim is time on which the JWT exp
MUST NOT be accepted for processing. In the context of a SET As defined by Section 4.1.4 of [RFC7519], this claim is time after
however, this notion does not apply since a SET reflects something which the JWT MUST NOT be accepted for processing. In the context
that has already been processed and is historical in nature. of a SET however, this notion does not apply, since a SET
While some specifications MAY have a need for this claim, its use represents something that has already occurred and is historical
in general cases is NOT RECOMMENDED. in nature. While some profiles MAY choose to use this claim, its
use is NOT RECOMMENDED.
The following are new claims defined by this specification: The following new claims are defined by this specification:
events events
The semantics of this claim is to define a set of event statements This claim contains a set of event statements that each provide
that each MAY add additional claims to fully describe a single information describing a single logical event that has occurred
logical event that has occurred (e.g. a state change to a about a Security Subject (e.g., a state change to the subject).
subject). Multiple event statements of the same type SHALL NOT be Multiple event identifiers with the same value MUST NOT be used.
accepted. The "events" claim SHOULD NOT be used to express The "events" claim SHOULD NOT be used to express multiple
multiple logical events. independent logical events.
The value of "events" is a JSON object whose members are a set of The value of the "events" claim is a JSON object whose members are
JSON name/value pairs whose names are URIs representing the event name/value pairs whose names are URIs identifying the event
statements being expressed. Event URI values SHOULD be stable statements being expressed. Event identifiers SHOULD be stable
values (e.g. a permanent URL for an event specification). For values (e.g., a permanent URL for an event specification). For
each name present, the corresponding value SHALL be a JSON object. each name present, the corresponding value MUST be a JSON object.
The JSON object MAY be an empty object ("{}"), or it MAY be a JSON The JSON object MAY be an empty object ("{}"), or it MAY be a JSON
object containing data as described by the Profiling object containing data described by the Profiling Specification.
Specification.
txn txn
An OPTIONAL String value that represents a unique transaction An OPTIONAL string value that represents a unique transaction
identifier. In cases where multiple SETs are issued based on identifier. In cases in which multiple related JWTs are issued,
different event URIs, the transaction identifier MAY be used to the transaction identifier claim can be used to correlate these
correlate SETs to the same originating event or stateful change. related JWTs.
2.2. Explicit Typing of SETs toe
A value that represents the date and time at which the event
occurred. This value is a NumericDate (see Section 2 of
[RFC7519]). This claim is RECOMMENDED. Note that some profiles
may choose to omit "toe" and convey event time information with
the "iat" claim or another claim.
2.3. Explicit Typing of SETs
This specification registers the "application/secevent+jwt" media This specification registers the "application/secevent+jwt" media
type, which can be used to indicate that the content is a SET. SETs type, which can be used to indicate that the content is a SET. SETs
MAY include this media type in the "typ" header parameter of the JWT MAY include this media type in the "typ" header parameter of the JWT
representing the SET to explicitly declare that the JWT is a SET. representing the SET to explicitly declare that the JWT is a SET.
This MUST be included if the SET could be used in an application This MUST be included if the SET could be used in an application
context in which it could be confused with other kinds of JWTs. context in which it could be confused with other kinds of JWTs.
Per the definition of "typ" in Section 4.1.9 of [RFC7515], it is Per the definition of "typ" in Section 4.1.9 of [RFC7515], it is
RECOMMENDED that the "application/" prefix be omitted. Therefore, RECOMMENDED that the "application/" prefix be omitted. Therefore,
the "typ" value used SHOULD be "secevent+jwt". the "typ" value used SHOULD be "secevent+jwt".
2.3. Security Event Token Construction 2.4. Security Event Token Construction
A SET is a JWT [RFC7519] that is constructed by building a JSON
structure that constitutes an event object which is then used as the
body of a JWT.
While this specification uses JWT to convey a SET, implementers SHALL This section describes how to construct a SET.
NOT use SETs to convey authentication or authorization assertions.
The following is an example JWT Claims Set for a security event token The following is an example JWT Claims Set for a hypothetical SCIM
(which has been formatted for readability): SET (which has been formatted for readability):
{ {
"jti": "4d3559ec67504aaba65d40b0363faad8", "jti": "4d3559ec67504aaba65d40b0363faad8",
"iat": 1458496404, "iat": 1458496404,
"iss": "https://scim.example.com", "iss": "https://scim.example.com",
"aud": [ "aud": [
"https://scim.example.com/Feeds/98d52461fa5bbc879593b7754", "https://scim.example.com/Feeds/98d52461fa5bbc879593b7754",
"https://scim.example.com/Feeds/5d7604516b1d08641d7676ee7" "https://scim.example.com/Feeds/5d7604516b1d08641d7676ee7"
], ],
"events": { "events": {
"urn:ietf:params:scim:event:create": { "urn:ietf:params:scim:event:create": {
"ref": "ref":
"https://scim.example.com/Users/44f6142df96bd6ab61e7521d9", "https://scim.example.com/Users/44f6142df96bd6ab61e7521d9",
"attributes":["id", "name", "userName", "password", "emails"] "attributes": ["id", "name", "userName", "password", "emails"]
} }
} }
} }
Figure 4: Example Event Claims Figure 5: Example Event Claims
When transmitted, the above JSON body must be converted into a JWT as The JSON Claims Set is encoded per [RFC7519].
per [RFC7519].
The following is an example of a SCIM Event expressed as an unsecured In this example, the SCIM SET claims are encoded in an unsecured JWT.
JWT. The JOSE Header is: The JOSE Header for this example is:
{"typ":"secevent+jwt","alg":"none"} {"typ":"secevent+jwt","alg":"none"}
Base64url encoding of the octets of the UTF-8 representation of the Base64url encoding of the octets of the UTF-8 representation of the
JOSE Header yields: JOSE Header yields:
eyJ0eXAiOiJzZWNldmVudCtqd3QiLCJhbGciOiJub25lIn0 eyJ0eXAiOiJzZWNldmVudCtqd3QiLCJhbGciOiJub25lIn0
The example JWT Claims Set is encoded as follows: The above example JWT Claims Set is encoded as follows:
eyJqdGkiOiI0ZDM1NTllYzY3NTA0YWFiYTY1ZDQwYjAzNjNmYWFkOCIsImlhdCI6MTQ1 eyJqdGkiOiI0ZDM1NTllYzY3NTA0YWFiYTY1ZDQwYjAzNjNmYWFkOCIsImlhdCI6MTQ1
ODQ5NjQwNCwiaXNzIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tIiwiYXVkIjpbImh0 ODQ5NjQwNCwiaXNzIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tIiwiYXVkIjpbImh0
dHBzOi8vc2NpbS5leGFtcGxlLmNvbS9GZWVkcy85OGQ1MjQ2MWZhNWJiYzg3OTU5M2I3 dHBzOi8vc2NpbS5leGFtcGxlLmNvbS9GZWVkcy85OGQ1MjQ2MWZhNWJiYzg3OTU5M2I3
NzU0IiwiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIxZDA4 NzU0IiwiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIxZDA4
NjQxZDc2NzZlZTciXSwiZXZlbnRzIjp7InVybjppZXRmOnBhcmFtczpzY2ltOmV2ZW50 NjQxZDc2NzZlZTciXSwiZXZlbnRzIjp7InVybjppZXRmOnBhcmFtczpzY2ltOmV2ZW50
OmNyZWF0ZSI6eyJyZWYiOiJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vVXNlcnMvNDRm OmNyZWF0ZSI6eyJyZWYiOiJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vVXNlcnMvNDRm
NjE0MmRmOTZiZDZhYjYxZTc1MjFkOSIsImF0dHJpYnV0ZXMiOlsiaWQiLCJuYW1lIiwi NjE0MmRmOTZiZDZhYjYxZTc1MjFkOSIsImF0dHJpYnV0ZXMiOlsiaWQiLCJuYW1lIiwi
dXNlck5hbWUiLCJwYXNzd29yZCIsImVtYWlscyJdfX19 dXNlck5hbWUiLCJwYXNzd29yZCIsImVtYWlscyJdfX19
The encoded JWS signature is the empty string. Concatenating the The encoded JWS signature is the empty string. Concatenating the
parts yields: parts yields this complete SET:
eyJ0eXAiOiJzZWNldmVudCtqd3QiLCJhbGciOiJub25lIn0. eyJ0eXAiOiJzZWNldmVudCtqd3QiLCJhbGciOiJub25lIn0.
eyJqdGkiOiI0ZDM1NTllYzY3NTA0YWFiYTY1ZDQwYjAzNjNmYWFkOCIsImlhdCI6MTQ1 eyJqdGkiOiI0ZDM1NTllYzY3NTA0YWFiYTY1ZDQwYjAzNjNmYWFkOCIsImlhdCI6MTQ1
ODQ5NjQwNCwiaXNzIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tIiwiYXVkIjpbImh0 ODQ5NjQwNCwiaXNzIjoiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tIiwiYXVkIjpbImh0
dHBzOi8vc2NpbS5leGFtcGxlLmNvbS9GZWVkcy85OGQ1MjQ2MWZhNWJiYzg3OTU5M2I3 dHBzOi8vc2NpbS5leGFtcGxlLmNvbS9GZWVkcy85OGQ1MjQ2MWZhNWJiYzg3OTU5M2I3
NzU0IiwiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIxZDA4 NzU0IiwiaHR0cHM6Ly9zY2ltLmV4YW1wbGUuY29tL0ZlZWRzLzVkNzYwNDUxNmIxZDA4
NjQxZDc2NzZlZTciXSwiZXZlbnRzIjp7InVybjppZXRmOnBhcmFtczpzY2ltOmV2ZW50 NjQxZDc2NzZlZTciXSwiZXZlbnRzIjp7InVybjppZXRmOnBhcmFtczpzY2ltOmV2ZW50
OmNyZWF0ZSI6eyJyZWYiOiJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vVXNlcnMvNDRm OmNyZWF0ZSI6eyJyZWYiOiJodHRwczovL3NjaW0uZXhhbXBsZS5jb20vVXNlcnMvNDRm
NjE0MmRmOTZiZDZhYjYxZTc1MjFkOSIsImF0dHJpYnV0ZXMiOlsiaWQiLCJuYW1lIiwi NjE0MmRmOTZiZDZhYjYxZTc1MjFkOSIsImF0dHJpYnV0ZXMiOlsiaWQiLCJuYW1lIiwi
dXNlck5hbWUiLCJwYXNzd29yZCIsImVtYWlscyJdfX19. dXNlck5hbWUiLCJwYXNzd29yZCIsImVtYWlscyJdfX19.
Figure 5: Example Unsecured Security Event Token Figure 6: Example Unsecured Security Event Token
For the purpose of a simpler example in Figure 5, an unsecured token For the purpose of having a simpler example in Figure 6, an unsecured
was shown. When SETs are not signed or encrypted, the Event Receiver token is shown. When SETs are not signed or encrypted, the Event
MUST employ other mechanisms such as TLS and HTTP to provide Recipient MUST employ other mechanisms such as TLS to provide
integrity, confidentiality, and issuer validation, as needed by the integrity, confidentiality, and issuer validation, as needed by the
application. application.
When validation (i.e. auditing), or additional transmission security When validation (i.e., auditing), or additional transmission security
is required, JWS signing and/or JWE encryption MAY be used. To is required, JWS signing and/or JWE encryption MAY be used. To
create and or validate a signed and/or encrypted SET, follow the create and or validate a signed and/or encrypted SET, follow the
instructions in Section 7 of [RFC7519]. instructions in Section 7 of [RFC7519].
3. Requirements for SET Profiles 3. Requirements for SET Profiles
Profiling Specifications for SETs define the syntax and semantics of Profiling Specifications for SETs define the syntax and semantics of
SETs conforming to that SET profile and rules for validating those SETs conforming to that SET profile and rules for validating those
SETs. The syntax defined by profiling specifications includes what SETs. The syntax defined by profiling specifications includes what
claims and event payload values are used by SETs utilizing the claims and event payload values are used by SETs utilizing the
skipping to change at page 13, line 7 skipping to change at page 14, line 7
allows (or requires) that the JWT be unsecured, the means by which allows (or requires) that the JWT be unsecured, the means by which
the integrity of the JWT is ensured MUST be specified. the integrity of the JWT is ensured MUST be specified.
Profiling Specifications MUST define how the event Subject is Profiling Specifications MUST define how the event Subject is
identified in the SET, as well as how to differentiate between the identified in the SET, as well as how to differentiate between the
event Subject's Issuer and the SET Issuer, if applicable. It is NOT event Subject's Issuer and the SET Issuer, if applicable. It is NOT
RECOMMENDED for Profiling Specifications to use the "sub" claim in RECOMMENDED for Profiling Specifications to use the "sub" claim in
cases in which the Subject is not globally unique and has a different cases in which the Subject is not globally unique and has a different
Issuer from the SET itself. Issuer from the SET itself.
Among the syntax and semantics of SETs that Profiling Specifications
define is whether and how multiple "events" values are used for SETs
conforming to those profiles. Many valid choices are possible. For
instance, some profiles might allow multiple event identifiers to be
present and specify that any that are not understood by recipients be
ignored, thus enabling extensibility. Other profiles might allow
multiple event identifiers to be present but require that all be
understood if the SET is to be accepted. Some profiles might require
that only a single value be present. All such choices are within the
scope of Profiling Specifications to define.
Profiling Specifications MUST clearly specify the steps that a Profiling Specifications MUST clearly specify the steps that a
recipient of a SET utilizing that profile MUST perform to validate recipient of a SET utilizing that profile MUST perform to validate
that the SET is both syntactically and semantically valid. that the SET is both syntactically and semantically valid.
4. Security Considerations 4. Security Considerations
4.1. Confidentiality and Integrity 4.1. Confidentiality and Integrity
SETs may often contain sensitive information. Therefore, methods for SETs may contain sensitive information. Therefore, methods for
distribution of events SHOULD require the use of a transport-layer distribution of events SHOULD require the use of a transport-layer
security mechanism when distributing events. Parties MUST support security mechanism when distributing events. Parties MUST support
TLS 1.2 [RFC5246] and MAY support additional transport-layer TLS 1.2 [RFC5246] and MAY support additional transport-layer
mechanisms meeting its security requirements. When using TLS, the mechanisms meeting its security requirements. When using TLS, the
client MUST perform a TLS/SSL server certificate check, per client MUST perform a TLS/SSL server certificate check, per
[RFC6125]. Implementation security considerations for TLS can be [RFC6125]. Implementation security considerations for TLS can be
found in "Recommendations for Secure Use of TLS and DTLS" [RFC7525]. found in "Recommendations for Secure Use of TLS and DTLS" [RFC7525].
Security Events distributed through third-parties or that carry Security Events distributed through third parties or that carry
personally identifiable information, SHOULD be encrypted using JWE personally identifiable information SHOULD be encrypted using JWE
[RFC7516] or secured for confidentiality by other means. [RFC7516] or secured for confidentiality by other means.
Unless integrity of the JWT is ensured by other means, it MUST be Unless integrity of the JWT is ensured by other means, it MUST be
signed using JWS [RFC7515] so that individual events can be signed using JWS [RFC7515] so that the SET can be authenticated and
authenticated and validated by the Event Receiver. validated by the Event Recipient.
4.2. Delivery 4.2. Delivery
This specification does not define a delivery mechanism by itself. This specification does not define a delivery mechanism for SETs. In
In addition to confidentiality and integrity (discussed above), addition to confidentiality and integrity (discussed above),
implementers and Profiling Specifications MUST consider the implementers and Profiling Specifications MUST consider the
consequences of delivery mechanisms that are not secure and/or not consequences of delivery mechanisms that are not secure and/or not
assured. For example, while a SET may be end-to-end secured using assured. For example, while a SET may be end-to-end secured using
JWE encrypted SETs, without TLS there is no assurance that the JWE encrypted SETs, without TLS, there is no assurance that the
correct endpoint received the SET and that it could be successfully correct endpoint received the SET and that it could be successfully
processed. processed.
4.3. Sequencing 4.3. Sequencing
As defined in this specification, there is no defined way to order This specification defines no means of ordering multiple SETs in a
multiple SETs in a sequence. Depending on the type and nature of SET sequence. Depending on the type and nature of the events represented
event, order may or may not matter. For example, in provisioning, by SETs, order may or may not matter. For example, in provisioning,
event order is critical -- an object could not be modified before it event order is critical -- an object cannot be modified before it is
was created. In other SET types, such as a token revocation, the created. In other SET types, such as a token revocation, the order
order of SETs for revoked tokens does not matter. If however, the of SETs for revoked tokens does not matter. If however, the event
event was described as a log-in or logged-out status for a user conveys a logged in or logged out status for a user subject, then
subject, then order becomes important. order becomes important.
Profiling Specifications and implementers SHOULD take caution when Profiling Specifications and implementers SHOULD take caution when
using timestamps such as "iat" to define order. Distributed systems using timestamps such as "iat" to define order. Distributed systems
will have some amount of clock-skew and thus time by itself will not will have some amount of clock skew. Thus, time by itself will not
guarantee order. guarantee order.
Specifications profiling SET SHOULD define a mechanism for detecting Specifications profiling SET SHOULD define a mechanism for detecting
order or sequence of events. For example, the "txn" claim could order or sequence of events when the order matters. For example, the
contain an ordered value (e.g., a counter) that the issuer defines. "txn" claim could contain an ordered value (e.g., a counter) that the
issuer includes.
4.4. Timing Issues 4.4. Timing Issues
When SETs are delivered asynchronously and/or out-of-band with When SETs are delivered asynchronously and/or out-of-band with
respect to the original action that incurred the security event, it respect to the original action that incurred the security event, it
is important to consider that a SET might be delivered to an Event is important to consider that a SET might be delivered to an Event
Receiver in advance or well behind the process that caused the event. Recipient in advance of or behind the process that caused the event.
For example, a user having been required to logout and then log back For example, a user having been required to log out and then log back
in again, may cause a logout SET to be issued that may arrive at the in again, may cause a logout SET to be issued that may arrive at the
same time as the user-agent accesses a web site having just logged- same time as the user agent accesses a web site having just logged
in. If timing is not handled properly, the effect would be to in. If timing is not handled properly, the effect would be to
erroneously treat the new user session as logged out. Profiling erroneously treat the new user session as logged out. Profiling
Specifications SHOULD be careful to anticipate timing and subject Specifications SHOULD be careful to anticipate timing and subject
selection information. For example, it might be more appropriate to selection information. For example, it might be more appropriate to
cancel a "session" rather than a "user". Alternatively, the cancel a "session" rather than a "user". Alternatively, the
specification could use timestamps that allows new sessions to be specification could use timestamps that allow new sessions to be
started immediately after a stated logout event time. started immediately after a stated logout event time.
4.5. Distinguishing SETs from ID Tokens 4.5. Distinguishing SETs from ID Tokens
Because [RFC7519] states that "all claims that are not understood by Because [RFC7519] states that "all claims that are not understood by
implementations MUST be ignored", there is a consideration that a SET implementations MUST be ignored", there is a consideration that a SET
token might be confused with ID Token [OpenID.Core] if a SET is might be confused with ID Token [OpenID.Core] if a SET is mistakenly
mistakenly or intentionally used in a context requiring an ID Token. or intentionally used in a context requiring an ID Token. If a SET
If a SET could otherwise be interpreted as a valid ID Token (because could otherwise be interpreted as a valid ID Token (because it
it includes the required claims for an ID Token and valid issuer and includes the required claims for an ID Token and valid issuer and
audience claim values for an ID Token) then that SET profile MUST audience claim values for an ID Token) then that SET profile MUST
require that the "exp" claim not be present in the SET. Because require that the "exp" claim not be present in the SET. Because
"exp" is a required claim in ID Tokens, valid ID Token "exp" is a required claim in ID Tokens, valid ID Token
implementations will reject such a SET if presented as if it were an implementations will reject such a SET if presented as if it were an
ID Token. ID Token.
Excluding "exp" from SETs that could otherwise be confused with ID Excluding "exp" from SETs that could otherwise be confused with ID
Tokens is actually defense in depth. In any OpenID Connect contexts Tokens is actually defense in depth. In any OpenID Connect contexts
in which an attacker could attempt to substitute a SET for an ID in which an attacker could attempt to substitute a SET for an ID
Token, the SET would actually already be rejected as an ID Token Token, the SET would actually already be rejected as an ID Token
because it would not contain the correct "nonce" claim value for the because it would not contain the correct "nonce" claim value for the
ID Token to be accepted in contexts for which substitution is ID Token to be accepted in contexts for which substitution is
possible. possible.
Note that the use of explicit typing, as described in Section 2.2, Note that the use of explicit typing, as described in Section 2.3,
will not achieve disambiguation between ID Tokens and SETs, as the ID will not achieve disambiguation between ID Tokens and SETs, as the ID
Token validation rules do not use the "typ" header parameter value. Token validation rules do not use the "typ" header parameter value.
4.6. Distinguishing SETs from Access Tokens 4.6. Distinguishing SETs from Access Tokens
OAuth 2.0 [RFC6749] defines access tokens as being opaque. OAuth 2.0 [RFC6749] defines access tokens as being opaque.
Nonetheless, some implementations implement access tokens as JWTs. Nonetheless, some implementations implement access tokens as JWTs.
Because the structure of these JWTs is implementation-specific, Because the structure of these JWTs is implementation-specific,
ensuring that a SET cannot be confused with such an access token is ensuring that a SET cannot be confused with such an access token is
therefore likewise, in general, implementation specific. therefore likewise, in general, implementation specific.
Nonetheless, it is recommended that SET profiles employ the following Nonetheless, it is recommended that SET profiles employ the following
strategies to prevent possible substitutions of SETs for access strategies to prevent possible substitutions of SETs for access
tokens in contexts in which that might be possible: tokens in contexts in which that might be possible:
o Prohibit use of the "exp" claim, as is done to prevent ID Token o Prohibit use of the "exp" claim, as is done to prevent ID Token
confusion. confusion.
o Where possible, use a separate "aud" claim value to distinguish o Where possible, use a separate "aud" claim value to distinguish
between the Event Receiver and the protected resource that is the between the Event Recipient and the protected resource that is the
audience of an access token. audience of an access token.
o Modify access token validation systems to check for the presence o Modify access token validation systems to check for the presence
of the "events" claim as a means to detect security event tokens. of the "events" claim as a means to detect security event tokens.
This is particularly useful if the same endpoint may receive both This is particularly useful if the same endpoint may receive both
types of tokens. types of tokens.
o Employ explicit typing, as described in Section 2.2, and modify o Employ explicit typing, as described in Section 2.3, and modify
access token validation systems to use the "typ" header parameter access token validation systems to use the "typ" header parameter
value. value.
4.7. Distinguishing SETs from other kinds of JWTs 4.7. Distinguishing SETs from other kinds of JWTs
JWTs are now being used in application areas beyond the identity JWTs are now being used in application areas beyond the identity
applications in which they first appeared. For instance, the Session applications in which they first appeared. For instance, the Session
Initiation Protocol (SIP) Via Header Field [RFC8055] and Personal Initiation Protocol (SIP) Via Header Field [RFC8055] and Personal
Assertion Token (PASSporT) [I-D.ietf-stir-passport] specifications Assertion Token (PASSporT) [I-D.ietf-stir-passport] specifications
both define JWT profiles that use mostly or completely different sets both define JWT profiles that use mostly or completely different sets
of claims than are used by ID Tokens. If it would otherwise be of claims than are used by ID Tokens. If it would otherwise be
possible for an attacker to substitute a SET for one of these (or possible for an attacker to substitute a SET for one of these (or
other) kinds of JWTs, then the SET profile must be defined in such a other) kinds of JWTs, then the SET profile must be defined in such a
way that any substituted SET will result in its rejection when way that any substituted SET will result in its rejection when
validated as the intended kind of JWT. validated as the intended kind of JWT.
The most direct way to prevent confusion is to employ explicit The most direct way to prevent confusion is to employ explicit
typing, as described in Section 2.2, and modify applicable token typing, as described in Section 2.3, and modify applicable token
validation systems to use the "typ" header parameter value. This validation systems to use the "typ" header parameter value. This
approach can be employed for new systems but may not be applicable to approach can be employed for new systems but may not be applicable to
existing systems. existing systems.
Another way to ensure that a SET is not confused with another kind of Another way to ensure that a SET is not confused with another kind of
JWT is to have the JWT validation logic reject JWTs containing an JWT is to have the JWT validation logic reject JWTs containing an
"events" claim unless the JWT is intended to be a SET. This approach "events" claim unless the JWT is intended to be a SET. This approach
can be employed for new systems but may not be applicable to existing can be employed for new systems but may not be applicable to existing
systems. systems.
For many use cases, the simplest way to prevent substitution is For many use cases, the simplest way to prevent substitution is
requiring that the SET not include claims that are required for the requiring that the SET not include claims that are required for the
kind of JWT that might be the target of an attack. For example, for kind of JWT that might be the target of an attack. For example, for
[RFC8055], the "sip_callid" claim could be omitted and for [RFC8055], the "sip_callid" claim could be omitted and for
[I-D.ietf-stir-passport], the "orig" claim could be omitted. [I-D.ietf-stir-passport], the "orig" claim could be omitted.
In many contexts, simple measures such as these will accomplish the In many contexts, simple measures such as these will accomplish the
task, should confusion otherwise even be possible. Note that this task, should confusion otherwise even be possible. Note that this
topic is being explored in a more general fashion in JSON Web Token topic is being explored in a more general fashion in JSON Web Token
Best Current Practices [I-D.sheffer-oauth-jwt-bcp]. The proposed Best Current Practices [I-D.ietf-oauth-jwt-bcp]. The proposed best
best practices in that draft may also be applicable for particular practices in that draft may also be applicable for particular SET
SET profiles and use cases. profiles and use cases.
5. Privacy Considerations 5. Privacy Considerations
If a SET needs to be retained for audit purposes, JWS MAY be used to If a SET needs to be retained for audit purposes, the signature can
provide verification of its authenticity. be used to provide verification of its authenticity.
Event Transmitters SHOULD attempt to specialize feeds so that the Event Issuers SHOULD attempt to specialize SETs so that their content
content is targeted to the specific business and protocol needs of an is targeted to the specific business and protocol needs of the
Event Receiver. intended Event Recipients.
When sharing personally identifiable information or information that When sharing personally identifiable information or information that
is otherwise considered confidential to affected users, Event is otherwise considered confidential to affected users, Event Issuers
Transmitters and Receivers MUST have the appropriate legal agreements and Recipients MUST have the appropriate legal agreements and user
and user consent or terms of service in place. consent and/or terms of service in place.
The propagation of subject identifiers can be perceived as personally The propagation of subject identifiers can be perceived as personally
identifiable information. Where possible, Event Transmitters and identifiable information. Where possible, Event Issuers and
Receivers SHOULD devise approaches that prevent propagation -- for Recipients SHOULD devise approaches that prevent propagation -- for
example, the passing of a hash value that requires the Event Receiver example, the passing of a hash value that requires the Event
to know the subject. Recipient to know the subject.
6. IANA Considerations 6. IANA Considerations
6.1. JSON Web Token Claims Registration 6.1. JSON Web Token Claims Registration
This specification registers the "events", "toe", and "txn" claims in This specification registers the "events", "toe", and "txn" claims in
the IANA "JSON Web Token Claims" registry [IANA.JWT.Claims] the IANA "JSON Web Token Claims" registry [IANA.JWT.Claims]
established by [RFC7519]. established by [RFC7519].
6.1.1. Registry Contents 6.1.1. Registry Contents
o Claim Name: "events" o Claim Name: "events"
o Claim Description: Security Event URI o Claim Description: Security Event URI
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 2.1 of [[ this specification ]] o Specification Document(s): Section 2.2 of [[ this specification ]]
o Claim Name: "toe" o Claim Name: "toe"
o Claim Description: Time Of Event o Claim Description: Time of Event
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 2.1 of [[ this specification ]] o Specification Document(s): Section 2.2 of [[ this specification ]]
o Claim Name: "txn" o Claim Name: "txn"
o Claim Description: Transaction Identifier o Claim Description: Transaction Identifier
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 2.1 of [[ this specification ]] o Specification Document(s): Section 2.2 of [[ this specification ]]
6.2. Media Type Registration 6.2. Media Type Registration
6.2.1. Registry Contents 6.2.1. Registry Contents
This section registers the "application/secevent+jwt" media type This section registers the "application/secevent+jwt" media type
[RFC2046] in the "Media Types" registry [IANA.MediaTypes] in the [RFC2046] in the "Media Types" registry [IANA.MediaTypes] in the
manner described in [RFC6838], which can be used to indicate that the manner described in [RFC6838], which can be used to indicate that the
content is a SET. content is a SET.
o Type name: application o Type name: application
o Subtype name: secevent+jwt o Subtype name: secevent+jwt
o Required parameters: n/a o Required parameters: n/a
o Optional parameters: n/a o Optional parameters: n/a
o Encoding considerations: 8bit; A SET is a JWT; JWT values are o Encoding considerations: 8bit; A SET is a JWT; JWT values are
encoded as a series of base64url-encoded values (some of which may encoded as a series of base64url-encoded values (some of which may
be the empty string) separated by period ('.') characters. be the empty string) separated by period ('.') characters.
o Security considerations: See the Security Considerations section o Security considerations: See the Security Considerations section
of [[ this specification ]] of [[ this specification ]]
o Interoperability considerations: n/a o Interoperability considerations: n/a
o Published specification: Section 2.2 of [[ this specification ]] o Published specification: Section 2.3 of [[ this specification ]]
o Applications that use this media type: TBD o Applications that use this media type: TBD
o Fragment identifier considerations: n/a o Fragment identifier considerations: n/a
o Additional information: o Additional information:
Magic number(s): n/a Magic number(s): n/a
File extension(s): n/a File extension(s): n/a
Macintosh file type code(s): n/a Macintosh file type code(s): n/a
o Person & email address to contact for further information: o Person & email address to contact for further information:
Michael B. Jones, mbj@microsoft.com Michael B. Jones, mbj@microsoft.com
skipping to change at page 19, line 25 skipping to change at page 20, line 37
Security (TLS) and Datagram Transport Layer Security Security (TLS) and Datagram Transport Layer Security
(DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May
2015, <https://www.rfc-editor.org/info/rfc7525>. 2015, <https://www.rfc-editor.org/info/rfc7525>.
[RFC7617] Reschke, J., "The 'Basic' HTTP Authentication Scheme", [RFC7617] Reschke, J., "The 'Basic' HTTP Authentication Scheme",
RFC 7617, DOI 10.17487/RFC7617, September 2015, RFC 7617, DOI 10.17487/RFC7617, September 2015,
<https://www.rfc-editor.org/info/rfc7617>. <https://www.rfc-editor.org/info/rfc7617>.
7.2. Informative References 7.2. Informative References
[I-D.ietf-oauth-jwt-bcp]
Sheffer, Y., Hardt, D., and M. Jones, "JSON Web Token Best
Current Practices", draft-ietf-oauth-jwt-bcp-00 (work in
progress), July 2017.
[I-D.ietf-stir-passport] [I-D.ietf-stir-passport]
Wendt, C. and J. Peterson, "Personal Assertion Token Wendt, C. and J. Peterson, "Personal Assertion Token
(PASSporT)", draft-ietf-stir-passport-11 (work in (PASSporT)", draft-ietf-stir-passport-11 (work in
progress), February 2017. progress), February 2017.
[I-D.sheffer-oauth-jwt-bcp]
Sheffer, Y., Hardt, D., and M. Jones, "JSON Web Token Best
Current Practices", draft-sheffer-oauth-jwt-bcp-00 (work
in progress), June 2017.
[OpenID.Core] [OpenID.Core]
Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and
C. Mortimore, "OpenID Connect Core 1.0", November 2014, C. Mortimore, "OpenID Connect Core 1.0", November 2014,
<http://openid.net/specs/openid-connect-core-1_0.html>. <http://openid.net/specs/openid-connect-core-1_0.html>.
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046, Extensions (MIME) Part Two: Media Types", RFC 2046,
DOI 10.17487/RFC2046, November 1996, DOI 10.17487/RFC2046, November 1996,
<https://www.rfc-editor.org/info/rfc2046>. <https://www.rfc-editor.org/info/rfc2046>.
skipping to change at page 20, line 27 skipping to change at page 21, line 41
[RFC7644] Hunt, P., Ed., Grizzle, K., Ansari, M., Wahlstroem, E., [RFC7644] Hunt, P., Ed., Grizzle, K., Ansari, M., Wahlstroem, E.,
and C. Mortimore, "System for Cross-domain Identity and C. Mortimore, "System for Cross-domain Identity
Management: Protocol", RFC 7644, DOI 10.17487/RFC7644, Management: Protocol", RFC 7644, DOI 10.17487/RFC7644,
September 2015, <https://www.rfc-editor.org/info/rfc7644>. September 2015, <https://www.rfc-editor.org/info/rfc7644>.
[RFC8055] Holmberg, C. and Y. Jiang, "Session Initiation Protocol [RFC8055] Holmberg, C. and Y. Jiang, "Session Initiation Protocol
(SIP) Via Header Field Parameter to Indicate Received (SIP) Via Header Field Parameter to Indicate Received
Realm", RFC 8055, DOI 10.17487/RFC8055, January 2017, Realm", RFC 8055, DOI 10.17487/RFC8055, January 2017,
<https://www.rfc-editor.org/info/rfc8055>. <https://www.rfc-editor.org/info/rfc8055>.
[RISC] OpenID Foundation, "OpenID Risk and Incident Sharing and
Coordination (RISC) Working Group",
<http://openid.net/wg/risc/>.
[saml-core-2.0] [saml-core-2.0]
Internet2, "Assertions and Protocols for the OASIS Internet2, "Assertions and Protocols for the OASIS
Security Assertion Markup Language (SAML) V2.0", March Security Assertion Markup Language (SAML) V2.0", March
2005. 2005.
Appendix A. Acknowledgments Appendix A. Acknowledgments
The editors would like to thank the members of the IETF SCIM working The editors would like to thank the members of the IETF SCIM working
group, which began discussions of provisioning events starting with group, which began discussions of provisioning events starting with
draft-hunt-scim-notify-00 in 2015. draft-hunt-scim-notify-00 in 2015.
The editors would like to thank the participants in the IETF id-event The editors would like to thank the participants in the IETF id-event
mailing list and related working groups for their support of this mailing list, the Security Events working group, and related working
specification. groups for their contributions to this specification.
Appendix B. Change Log Appendix B. Change Log
[[ to be removed by the RFC Editor before publication as an RFC ]]
From the original draft-hunt-idevent-token: From the original draft-hunt-idevent-token:
Draft 01 - PH - Renamed eventUris to events Draft 01 - PH - Renamed eventUris to events
Draft 00 - PH - First Draft Draft 00 - PH - First Draft
Draft 01 - PH - Fixed some alignment issues with JWT. Remove event Draft 01 - PH - Fixed some alignment issues with JWT. Remove event
type attribute. type attribute.
Draft 02 - PH - Renamed to Security Events, removed questions, Draft 02 - PH - Renamed to Security Events, removed questions,
skipping to change at page 23, line 25 skipping to change at page 24, line 48
o pjh - Corrected old "subscriber" to "Event Receiver". Added o pjh - Corrected old "subscriber" to "Event Receiver". Added
clarification in definition that Event Receiver is the same as JWT clarification in definition that Event Receiver is the same as JWT
recipient. recipient.
o pjh - Added definition for "toe" (and IANA registration). o pjh - Added definition for "toe" (and IANA registration).
o pjh - Removed "nbf" claim. o pjh - Removed "nbf" claim.
o pjh - Figure 3, moved "sub" to the events payload next to "iss". o pjh - Figure 3, moved "sub" to the events payload next to "iss".
o pjh - Clarified the use of "nonce" in contexts where susbstitution o pjh - Clarified the use of "nonce" in contexts where substitution
is possible. is possible.
o mbj - Addressed WGLC comments by Nat Sakimura. o mbj - Addressed WGLC comments by Nat Sakimura.
o mbj - Addressed WGLC comments by Annabelle Bachman. o mbj - Addressed WGLC comments by Annabelle Backman.
o mbj - Addressed WGLC comments by Marius Scurtescu. o mbj - Addressed WGLC comments by Marius Scurtescu.
Draft 04 - mbj - Changes were as follows:
o Clarified that all "events" values must represent aspects of the
same state change that occurred to the subject -- not an
aggregation of unrelated events about the subject.
o Removed ambiguities about the roles of multiple "events" values
and the responsibilities of profiling specifications for defining
how and when they are used.
o Corrected places where the term JWT was used when what was
actually being discussed was the JWT Claims Set.
o Addressed terminology inconsistencies. In particular,
standardized on using the term "issuer" to align with JWT
terminology and the "iss" claim. Previously the term
"transmitter" was sometimes used and "issuer" was sometimes used.
Likewise, standardized on using the term "recipient" instead of
"receiver" for the same reasons.
o Added a RISC event example, courtesy of Marius Scurtescu.
o Applied wording clarifications suggested by Annabelle Backman and
Yaron Sheffer.
o Applied numerous grammar, syntax, and formatting corrections.
Authors' Addresses Authors' Addresses
Phil Hunt (editor) Phil Hunt (editor)
Oracle Corporation Oracle Corporation
Email: phil.hunt@yahoo.com Email: phil.hunt@yahoo.com
Michael B. Jones
Microsoft
Email: mbj@microsoft.com
URI: http://self-issued.info/
William Denniss William Denniss
Google Google
Email: wdenniss@google.com Email: wdenniss@google.com
Morteza Ansari Morteza Ansari
Cisco Cisco
Email: morteza.ansari@cisco.com Email: morteza.ansari@cisco.com
Michael B. Jones
Microsoft
Email: mbj@microsoft.com
URI: http://self-issued.info/
 End of changes. 106 change blocks. 
274 lines changed or deleted 361 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/