Internet-Draft | draft-ietf-scim-events | June 2024 |
Hunt, et al. | Expires 8 December 2024 | [Page] |
This specification defines a set of SCIM Security Events using the Security Event Token Specification RFC8417 to enable the asynchronous exchange of messages between SCIM Service Providers and receivers. SCIM Security Events are typically used for: asynchronous request completion, resource replication, and provisioning co-ordination.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 8 December 2024.¶
Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This specification defines Security Events for SCIM Service Providers and receivers as specified by the Security Event Tokens (SET) [RFC8417] specification. SCIM Security Events in this specification include: asynchronous request completion, resource replication, and provisioning co-ordination.¶
This specification also profiles the use of the HTTP Header "Prefer: Async-response
" [RFC7240]
to allow a SCIM Protocol Client [RFC7644] to request an asynchronous response (see Section 2.5.1.1).¶
In a typical HTTP client-server relationship, a SCIM Protocol Client issues commands to a SCIM Service Provider using HTTP methods such as POST, PATCH, and DELETE [RFC7644] that cause a state change to a SCIM Resource. When multiple independent SCIM Clients update SCIM Resources, individual clients become out of date as state changes occur. Some clients may need to be informed of these changes for co-ordination or reconciliation purposes. This could be done using periodic SCIM GET requests over time, but this rapidly becomes problematic as the number of changes and the number of resources increases.¶
Security Event Tokens [RFC8417] and SCIM Events offer the ability to exchange messages that act as triggers for receivers to monitor over time in an asynchronous approach. This enables greater scale and timeliness, where only changed information is exchanged between parties.¶
A SET token conveys information about a state change that has occured in a publishing SCIM Service Provider. That token may be of interest to one or more receivers and can be delivered asynchronously to the originating SCIM Client making the change. Unlike SCIM Protocol requests which convey protocol commands, Security Events describe statements of fact about changes by the SCIM Service Provider. This approach allows the Event Receiver to determine the best local follow-up action to take within its own context. For example, the receiver can reconcile intentional schema and population differences between the domain.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
For purposes of readability examples are not URL encoded. Implementers MUST percent encode URLs as described in Section 2.1 of [RFC3986].¶
Throughout this document all figures MAY contain spaces and extra line-wrapping for readability and space limitations. Similarly, some URI's contained within examples, have been shortened for space and readability reasons.¶
This specification uses definitions from the following specifications:¶
In JSON Web Tokens and Security Event Tokens, the term "claim" refers to JSON attribute values in a JSON Web Token [RFC7519] structure. The term "claim" in tokens is used to indicate that an attribute value may not be verified and its accuracy can be questioned. In the context of SCIM, claims are referred to as attributes. For the purposes of this specification claims and attributes are inter-changeable. For consistency, JWT and SET IANA registered attributes will continue to be called claims, while event attributes (i.e. those in an event payload) will be referred to as attributes.¶
Additionally, the following terms are defined:¶
full
mode variation of change events including
the data
payload attribute. This eliminates the need for a callback
to retrieve additional data.¶
A SCIM event is a signal, in the form of a Security Event Token [RFC8417], that describe some event that has occurred. A SET event consists of a set of standard JWT "top-level" claims and an "events" claim that contains one or more event URI subclaims (JSON attributes) each with a JSON object containing relevant event information.¶
SCIM Events SHALL use the "sub_id" claim defined by Subject Identifiers for
Security Event Tokens [RFC9493] specification to identify the subject of events. The sub_id
claim MUST be contained within the main JWT claims body and SHALL NOT be located within an Event
payload within the events
claim. A SET with multiple event URIs indicates that the events
arise from the same transaction or resource state change for a single resource or subject. Finally,
as recommended in [RFC8417] the JWT "sub" claim SHALL NOT be used.¶
The top-level claim "sub_id" SHALL contain the subclaim "format" whose value is set to scim
to indicate
the other attributes present are SCIM attributes. The following sub_id attributes are defined:¶
id
. For example /Users/2b2f880af6674ac284bae9381673d462
.
This attribute MUST be provided in a SCIM Event sub_id
claim. Note the relative path
is the path component after the SCIM Service Provider Base URI as defined in Section 1.3 [RFC7644].
In cases where the Event Receiver is unable to match a URI, the Event Receiver MAY issue a callback
to a previously agreed SCIM Service Provider Base URI plus the relative uri
value and
perform a SCIM GET request per Section 3.4.1 [RFC7644].¶
externalId
value of the SCIM Resource that MAY be used by a receiver to identify
the corresponding resource in the Event Receiver's domain.¶
uri
claim.¶
id
and
externalId
) are insufficient to identify a common resource between an Event Publisher
and Event Receiver.¶
The following attributes are available for all events defined. Some attributes are defined as SET/JWT claims, while others are "Event Payload" claims as defined in Section 1.2 [RFC8417].¶
txn
claim is REQUIRED. The SET jti
claim MAY be used
in addition to the txn
claim. Where txn
identifies a unique transaction within a
SCIM Service Provider, multiple SETs MAY be issued each with distinct JTI's stemming from a
common originating transaction with identical txn
values.¶
data
attribute, Section 3.7 [RFC7644]. The JSON object
contains the equivalent SCIM command processed by the SCIM Service Provider. For example, after
processing a SCIM Create operation, the data contained includes the final representation of the
created entity by the SCIM Service Provider including the assigned id
value.¶
path
> (Section 3.5.2
[RFC7644]). For example: "attributes": ["username","emails","name.familyName"]
¶
Only one of data
or attributes
claims SHALL be provided depending on the event
definition.¶
This specification defines a new URI prefix urn:ietf:params:SCIM:event
which is used
as the prefix for the following defined SCIM Events (see Section 6.2).¶
This section defines events related to changes in the content of an event feed. Such as,
SCIM Resources that are being added or removed from an event feed or events used in
Co-operative Provisioning scenarios where only a sub-set of entities are shared across an
Event Feed. The URI prefix for these events is
urn:ietf:params:SCIM:event:feed
¶
The specified resource has been added to the Event Feed. A feed:add
does not indicate a
resource is new or has been recently created. For example,
an existing user has had a new role (e.g. CRM_User) added to
their profile which has caused their resource to join a feed.¶
The specified resource has been removed from the feed. Removal does not indicate that the resource was deleted or otherwise deactivated. This event has minimal disclosure.¶
This section defines resource changes that have occurred within a SCIM Service Provider. These
events are used in both Domain Based Replication (DBR) and Co-operative Provisioning (CP) mode. The
URI prefix for these events is urn:ietf:params:SCIM:event:prov
.¶
Indicates a new SCIM resource has been created by the SCIM Service Provider
and has been added to the Event Feed. When the data
payload attribute is included, the
event URI SHALL end with full
, otherwise the event URI ends with notice
. In
full
mode, the set of values reflecting the final state of the resource at the Service Provider
are provided using the data
attribute. In notice
mode,
attributes
is returned disclosing the list of attributes included in the create request.
Note that because the event MAY be used for replication, the final id
attribute that was assigned by the SCIM Service Provider is shared so that all replicas in the
domain MAY use the same resource identifier.¶
The event above notifies the Event Receiver which attributes
have changed but does not convey
the actual information. The Event Receiver MAY retrieve that information
by performing a SCIM GET to the sub
value specified.¶
The specified resource has been updated using SCIM PATCH. In full
mode, the
data
payload attribute is included. When the event URI ends with notice
, the
list of modified attributes is provided.¶
The specified resource has been updated (e.g. one or more attributes has
changed). In full
mode, the SCIM PUT request body is included in the data
attribute. In notice
mode, the modified attributes are listed using attributes
.¶
The specified resource has been deleted from the SCIM Service Provider.
The resource is also removed from the feed. When a
DELETE is sent, a corresponding feedRemove
SHALL NOT be issued. A delete
event has no payload attributes. Note that because the delete event has
no attributes, the qualifiers full
and notice
SHALL NOT be used.¶
The specified resource (e.g. User) has been "activated". This does not necessarily reflect any particular state change at the SCIM Service Provider but may simply indicate the account defined by the SCIM resource is ready for use as agreed upon by the Event Publisher and Event Receiver. For example, an activated resource can represent an account that may be logged in.¶
The specified resource (e.g. User) has been deactivated and disabled. The exact meaning SHOULD be agreed to by the Event Publisher and its corresponding Event Receiver. Typically, this means the subject may no longer have an active security session. As with the activate event, this event has minimal disclosure requirements.¶
This section defines related miscellaneous events such as Asynchronous Request completion
that has occurred within a SCIM Service Provider. The URI prefix for these events is
urn:ietf:params:SCIM:event:misc
.¶
A SCIM Client making SCIM HTTP requests defined in [RFC7644] MAY request "asynchronous" processing using the "Prefer" HTTP Header as defined in Section 4.1 [RFC7240]. The client may do this for a number of reasons such as: avoiding holding HTTP connections open during long requests, because the result of the request is not needed, or for co-ordination reasons where the result is delivered to another entity for further action.¶
To initiate an async SCIM request, a normal SCIM protocol POST, PUT,
PATCH, or DELETE request is performed with the HTTP Header Prefer
with a value of
respond-async
as defined in [RFC9110]. The HTTP Accept
header SHALL be ignored.¶
In response, and as indicated in the SCIM Service Provider Configuration (see
Section 3, the SCIM Service Provider responds with either a
normal SCIM response or asynchronously by returning HTTP Status 202 Accepted.
The asynchronous response SHOULD contain no response body. To enable correlation of the
future event, the HTTP response header "Set-txn" is returned with a value corresponding
to a future Security Event Token to be received whose "txn" claim SHALL match. Per Section 3
[RFC7240], the response will also include the header
Preference-Applied
. The Location
header returned SHALL be one of the following:¶
In the following non-normative example, a "Prefer" header is set to "respond-async":¶
The SCIM Service Provider responds with HTTP 202 Accepted and includes the Set-txn header:¶
SCIM Protocol Section 3.7 [RFC7644] provides the ability to submit multiple SCIM operations in a single request. When an asynchronous response is requested, a single Async Request Completion Event SHALL be generated for each requested operation. For example, if a single SCIM Bulk request had 10 operations, then 10 Async Event completions events would be generated.¶
The "txn" claim MUST be set to the value originally returned to the requesting SCIM Client (see Section 2.5.1.1) appended with a colon (":") followed by the request operation number. For example, if the "txn" claim value was "2d80e537a3f64622b0347b641ebc8f44", then the first Async Response Event Token representing the first operation SHALL have a "txn" claim value of "2d80e537a3f64622b0347b641ebc8f44:1", the second operation SHALL have a value of "2d80e537a3f64622b0347b641ebc8f44:2", and so on.¶
If a SCIM Service Provider elects to optimize the sequence of operations (per Section 3.7 [RFC7644]), the Async Request Completion events generated MAY also be generated out of sequence from the order of operations in the original request. In this case, the "txn" claims generated SHALL use operation numbers that correspond to the original request order.¶
The Async Response event signals the completion of a SCIM request. The event payload contains the attributes defined in SCIM Bulk Section 3.7 [RFC7644] and is the same a single SCIM Bulk Response Operation as per Section 3.7.3. In the event, the "txn" claim must be set to the value originally returned to the requesting SCIM Client (see Section 2.5.1.1).¶
An error may occur in the SCIM Service Provider's asynchronous processing of the SCIM request. In that case, the event's operation MUST include a "response" attribute to indicate a non-200-series HTTP status as defined in Section 3.7 [RFC7644]. The response attribute MUST contain the sub-attributes defined in Section 3.12 [RFC7644]. Note that the "status" attribute of the event operation should match the "status" attribute of the response.¶
The following 4 figures show Async Completion events for the example in Section 3.7.3 of [RFC7644].¶
Section 5 of [RFC7643] defines SCIM Service Provider configuration schemas. This section defines additional attributes that enable a SCIM Client to discover the additional capabilities defined by this specification.¶
A SCIM Complex attribute that specifies the available capabilities related to asynchronous Security Events based on [RFC8417]. This attribute is OPTIONAL and when absent indicates the SCIM Service Provider does not support or is not currently configured for Security Events. The following sub-attributes are defined:¶
A string value specifying one of the following:¶
NONE
indicates async SCIM requests defined in Section 2.5.1.1 are not supported;¶
LONG
indicates the SCIM Service Provider MAY complete asynchronously at its discretion (e.g.
based on a max wait time);¶
REQUEST
indicates the request SHALL complete asynchronously when requested by
the SCIM Client.¶
A multivalued string listing the SET Event URIs (defined in [RFC8417]) that the server is capable of generating and deliverable via a SET Stream (see [RFC8935] and [RFC8936]). This information is informational only. Stream registration and configuration are out of scope of this specification.¶
This specification depends on the Security Considerations for [RFC8417].¶
The use of JSON Web Encryption (JWE) [RFC7516] can impose performance limitations when used in high event frequency scenarios. JWE is useful when the transfer of SETs is not end-to-end encrypted. TLS termination, for example, may occur before the destination of the SET. JWE ensures that the content of the SET is encrypted after TLS termination to prevent disclosure.¶
For SCIM Provisioning events, the long-term series of changes may be critical to both sides. As such, Event Publishers SHOULD consider storing events for receivers for longer periods of time in the case of an extended SET Transfer service failure. Similarly, Event Receivers MUST ensure events are persisted directly or indirectly to meet local recovery needs before acknowledging the SET Events were received.¶
When SET Events are stored for future delivery or retained local recovery, they MUST be limited only to the parties needed to support recovery or SET forwarding.¶
JWS [RFC7515] signed SET Events SHOULD be used to verify authenticity of the origin of a SET Event. Validating event signatures is both useful on the initial transfer of SET Events, and may also be useful for auditing purposes. Signed SET Events are protected from tampering in the event that an intermediate system, such as a TLS-terminating proxy, decrypts the SET payload before sending it onward to its intended recipient.¶
In operation, some SCIM Resources such as SCIM Groups may have a high rate of change such a groups with more than 100k member values. This could lead to an excessive event rate that SHOULD be considered by Event Publishers and Receivers. Consider the following to help mitigate throughput issues:¶
When using Asynchronous SCIM Requests (see Section 2.5.1.1), and a location returned in a SCIM Accepted response is a URI for retrieving the event result, the URI SHOULD be protected requiring an HTTP Authorization header or some other form of client authentication.¶
This specification enables the sharing of information between domains. The specification assumes that implementers and deployers are operating under one of the following scenarios:¶
In general, the sharing of SCIM Event information falls within a pre-existing SCIM Client and Service Provider relationship and carry no additional personal information.¶
This specification registers the HTTP Set-txn
field name in the "HTTP Field Name Registry" defined in Section 16.3.1 [RFC9110].¶
IANA will add a new registry called “SCIM Event URIs” to the “System for Cross-domain Identity Management (SCIM) Schema URIs” registry group initiated by Section 10.1 of [RFC7643] at https://www.iana.org/assignments/scim.¶
The Namespace Specific String (NSS) of all URNs that use the "event" Namespace ID SHALL have the following structure:¶
"urn:ietf:params:scim:event:{class}:{name}:{other}¶
The keywords have the following meaning:¶
An event registration MUST include the following fields:¶
Initial values to be added to the SCIM Events Registry Section 6.3.¶
Summary of Event URI registrations:¶
Event URI | Name | Ref. |
---|---|---|
urn:ietf:params:SCIM:event:feed:add | Resource added to Feed Event | Section 2.3.1 |
urn:ietf:params:SCIM:event:feed:remove | Remove resource From Feed Event | Section 2.3.2 |
urn:ietf:params:SCIM:event:prov:create: notice | New Resource Event (notice only) | Section 2.4.1 |
urn:ietf:params:SCIM:event:prov:create: full | New Resource Event (full data) | Section 2.4.1 |
urn:ietf:params:SCIM:event:prov:patch: notice | Resource Patch Event (notice only) | Section 2.4.2 |
urn:ietf:params:SCIM:event:prov:patch: full | Resource Patch Event (full data) | Section 2.4.2 |
urn:ietf:params:SCIM:event:prov:put: notice | Resource Put Event (notice only) | Section 2.4.3 |
urn:ietf:params:SCIM:event:prov:put:full | Resource Put Event (full data) | Section 2.4.3 |
urn:ietf:params:SCIM:event:prov:delete | Resource Deleted Event | Section 2.4.4 |
urn:ietf:params:SCIM:event:prov:activate | Resource Activated Event | Section 2.4.5 |
urn:ietf:params:SCIM:event:prov:deactivate | Resource Deactivated Event | Section 2.4.6 |
urn:ietf:params:SCIM:event:misc:asyncResp | Async Request Completion | Section 2.5.1 |
SCIM Events may be used in a number of ways. The following non-normative sections describe some of the expected uses.¶
The objective of "Domain Based Replication" events (DBR) is to synchronize resource changes between SCIM Service Providers in a common administrative domain. In this mode, complete information about modified resources are shared between replicas for immediate processing.¶
From a security perspective, it is assumed that servers sharing DBR events are secured by a common access policy and all servers are required to be up-to-date. From a privacy perspective, because all servers are in the same administrative domain, the primary objective is to keep individual Service Provider nodes or cluster synchronized.¶
In "Co-ordinated Provisioning" (CP), SCIM resource change events perform the function of change notification without the need to provide raw data. In any Event Publisher and Receiver relationship, the set of SCIM Resources (e.g. Users) that are linked or co-ordinated is managed within the context of an event feed and MAY be a subset of the total set of resources on either side. For example, an event feed could be limited to users who have consented to the sharing of information between domains. To support capability, "feed" specific events are defined to indicate the addition and removal of SCIM Resources from a feed. For example, when a user consents to the sharing of information between domains, events about the User MAY be added to the feed between the Event Publisher and Receiver.¶
In CP mode, the receiver of an event must callback to the originating SCIM Service Provider (e.g. using a SCIM GET request) to reconcile the newly changed resource in order to obtain the changes.¶
Co-ordinated provisioning has the following benefits:¶
A disadvantage of the CP approach is that it may be considered costly in the sense that each event received might trigger a callback to the event issuer. This cost should be weighed against the cost producing filtered information in each event for each receiver. Furthermore, a receiver is not required to make a callback on every provisioning event.¶
It is assumed that an underlying relationship between domains exists that permits the exchange of personal information and credentials. For example, in a cross-domain scenario a SCIM Service Provider would have been previously authorized to perform SCIM provisioning operations and publish change events. As such, appropriate confidentiality and privacy agreements should be in place between the domains.¶
When sharing information between parties, CP Events minimize the information shared in each message and require the Security Event Receiver to receive more information from the Event Publisher as needed. In this way, the Event Receiver is able to have regular access to information through normal SCIM protocol access restrictions. The Event Receiver and Publisher may agree to communicate these updates through a variety of transmission methods such as push and pull based HTTP like in [RFC8935], [RFC8936], or HTTP GET (see Section 2.5.1.1), streaming technologies (e.g., Kafka or Kinesis), or via webhooks like in the Shared Signals Framework [SSF].¶
The authors would like to thank the following contributors:¶
Draft 00 - PH - First WG Draft¶
Draft 01 - PH - Moved non-normative sections to Appendix, Security and Privacy Considerations¶
Draft 02 - PH - Clarifications on Async Events, IANA Considerations¶
Draft 03 - PH - Fixed Header Field registration to RFC9110."Preference-Applied" header in async response. Support for Async Bulk requests. Added IANA SCIM Event Registry¶
Draft 04 - PH - Removed Event Delivery Feeds and Appendix A(not normative), Removed "sig" events, change bulk txn separator to ":", Updated SubId Reference to RFC9493, other comments, fixed IANA registry paragraph, SCIM Signals Removed¶
Draft 05 - PH - Removed Signals Events, Removed Delivery Section (not normative), Version(etag) definition added, Security Considerations revisions, Syntax for Attributes¶
Draft 06 - PH - Editorial edits and clarifications, add SSF reference¶