Skip to content
Doc Html Rfc9865

Doc Html Rfc9865

datatracker.ietf.org • November 26, 2026

This document updates RFCs 7643 and 7644 by defining additional System for Cross-Domain Identity Management (SCIM) query parameters and result attributes to allow use of cursor-based pagination in SCIM service providers that are implemented with existing codebases, databases, or APIs where cursor-based pagination is already well established. ¶

This is an Internet Standards Track document. ¶

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841. ¶

Information the current status of this document, any errata, and how to provide feedback on it may be obtained at . ¶

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ( ) 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. ¶

The two common patterns for result pagination are index-based pagination and cursor-based pagination. Rather than attempt to compare and contrast the advantages and disadvantages of competing pagination patterns, this document simply recognizes that System for Cross-Domain Identity Management (SCIM) service providers are commonly implemented as an interoperability layer on top of already existing application codebases, databases, and/or APIs that already have a well established pagination pattern. ¶

Translating from an underlying cursor-based pagination pattern to the index-based pagination defined in Section 3.4.2.4 of [ RFC7644 ] ultimately requires the SCIM service provider to fully iterate the underlying cursor, store the results, and then serve indexed pages from the stored results. This task of "pagination translation" increases complexity and memory requirements for implementing a SCIM service provider, and may be an impediment to SCIM adoption for some applications and identity systems. ¶

This document defines a simple addition to the SCIM protocol that allows SCIM service providers to reuse underlying cursors without expensive translation. Support for cursor-based pagination in SCIM encourages broader cross-application identity management interoperability by encouraging SCIM service provider implementations for applications and identity systems where cursor-based pagination is already well established. ¶

This document updates RFCs 7643 and 7644 because it adds attributes to existing structures from those documents, as described in Section 2 . These changes are invoked when using the "cursor" parameter when making SCIM requests using GET or POST methods. ¶

1.1. Notational Conventions

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. ¶

This document uses the terms defined in Section 1.2 of [ RFC7643 ] . ¶

2. Query Parameters and Response Attributes

The following table describes the URL pagination query parameters for requesting cursor-based pagination: ¶

The following table describes cursor-based pagination attributes returned in a paged query response: ¶

Cursor values are URL-safe strings that are opaque to the client. To retrieve another result page for a query, the client MUST query the same service provider endpoint with all query parameters and values being identical to the initial query with the exception of the cursor value, which SHOULD be set to a nextCursor (or previousCursor ) value that was returned by the service provider in a response. ¶

For example, to retrieve the first 10 users with userName starting with J , use an empty cursor and set the count to 10: ¶

The SCIM service provider in response to the query above returns metadata regarding pagination similar to the following example (Resources omitted for brevity): ¶

Given the example above, to request the page of results, use the same query parameters and values except set the cursor to the value of nextCursor ( VZUTiyhEQJ94IR ): ¶

The service provider responds with: ¶

In the example above, the response includes the optional previousCursor indicating that the service provider supports forward and reverse traversal of result pages. ¶

As described in Section 3.4.1 of [ RFC7644 ] , service providers should return an accurate value for totalResults, which is the total number of resources for all pages. Service providers implementing cursor pagination that are unable to estimate totalResults MAY choose to omit the totalResults attribute. ¶

If a service provider encounters invalid pagination query parameters (invalid cursor value, count value, etc) or other error conditions, the service provider SHOULD return the appropriate HTTP response status code and detailed JSON error response as defined in Section 3.12 of [ RFC7644 ] . ¶

For HTTP status code 400 (Bad Request) responses, the following detail error types are defined. These error types extend the list defined in Table 9 ("SCIM Detail Error Keyword Values") of Section 3.12 of [ RFC7644 ] ¶

If sorting is implemented as described Section 3.4.2.3 of [ RFC7644 ] , then cursor-paged results should be sorted. ¶

3. Querying Resources Using HTTP POST

Section 3.4.3 of [ RFC7644 ] defines how clients may execute queries without passing parameters on the URL by using the POST verb combined with the /. path extension execute. When posting to /. , the client would pass the parameters defined in Section 2 in the body of the POST request. For example: ¶

Which would return a result containing a nextCursor value that may be used by the client in a subsequent call to return the page of resources: ¶

4. Service Provider Configuration

The /ServiceProviderConfig resource defined in Section 4 of [ RFC7644 ] facilitates discovery of SCIM service provider features. A SCIM service provider implementing cursor-based pagination SHOULD include the following additional attribute in a JSON document returned by the /ServiceProviderConfig endpoint: ¶

The following sub-attributes are defined: ¶

A Boolean value specifying support of cursor-based pagination. REQUIRED . ¶

A Boolean value specifying support of index-based pagination. REQUIRED . ¶

A string value specifying the type of pagination that the service provider defaults to when the client has not specified which method it wishes to use. Possible values are "cursor" and "index". OPTIONAL . ¶

Positive integer value specifying the default number of results returned in a page when a count is not specified in the query. OPTIONAL . ¶

Positive integer specifying the maximum number of results returned in a page regardless of what is specified for the count in a query. The maximum number of results returned may be further restricted by other criteria. OPTIONAL . ¶

Positive integer specifying the minimum number of seconds that a cursor is valid between page requests. Clients waiting too long between cursor pagination requests may receive an invalid cursor error response. No value being specified may mean that there is no cursor timeout or that the cursor timeout is not a static duration. OPTIONAL . ¶

Service providers may choose not to advertise Service Provider Configuration information regarding default pagination method, page size, or cursor validity. Clients MUST NOT interpret the lack of published Service Provider Configuration values to mean that no defaults or limits on page sizes or cursor lifetimes exist, or that there is no default pagination method. Service providers may choose not to publish values for the pagination sub-attributes for many reasons. Examples include: ¶

Service providers containing multiple resource types may have different values set for each resource type. ¶

Service providers containing multiple resource types may have different values set for each resource type. ¶

Default and maximum page size may be determined by factors besides or in addition to the number of resources returned, such as the size of each resource on the page. ¶

Default and maximum page size may be determined by factors besides or in addition to the number of resources returned, such as the size of each resource on the page. ¶

Before using cursor-based pagination, a SCIM client MAY fetch the Service Provider Configuration document from the SCIM service provider and verify that cursor-based pagination is supported. ¶

A service provider supporting both cursor-based pagination and index- based pagination would return a document similar to the following (full ServiceProviderConfig schema defined in Section 5 of [ RFC7643 ] has been omitted for brevity): ¶

5. Security Considerations

This section elaborates on the security considerations associated with the implementation of cursor pagination in SCIM. This document is under the same security and privacy considerations of those described in [ RFC7644 ] . It is imperative that implementers additionally consider the following security aspects to safeguard against both deliberate attacks and inadvertent misuse that may compromise the system's security posture. ¶

5.1. Threat Model and Security Environment

The threat landscape is characterized by two primary types of actors: ¶

Unauthenticated and Authenticated Malicious Actors: These individuals or entities represent a malevolent threat. Their objectives include unauthorized access to data, alteration, or deletion through cursor-enabled queries. They may also seek to deplete service provider resources deliberately, aiming to cause a denial-of-service state, thereby reducing service availability. ¶

Unauthenticated and Authenticated Malicious Actors: These individuals or entities represent a malevolent threat. Their objectives include unauthorized access to data, alteration, or deletion through cursor-enabled queries. They may also seek to deplete service provider resources deliberately, aiming to cause a denial-of-service state, thereby reducing service availability. ¶

Authenticated Benign Users: This category includes legitimate users who, due to confusion or a lack of understanding, inadvertently engage in actions that consume service-provider resources excessively. Such actions, while not ill intended, can lead to unintended denial of service by overwhelming the service provider's capacity. ¶

Authenticated Benign Users: This category includes legitimate users who, due to confusion or a lack of understanding, inadvertently engage in actions that consume service-provider resources excessively. Such actions, while not ill intended, can lead to unintended denial of service by overwhelming the service provider's capacity. ¶

To ensure that confidential data remains appropriately secured: ¶

Implementers MUST ensure that pagination through results sets is strictly confined to the data that the actor's current identity has been authorized to access. This holds true even in cases where the actor has obtained a cursor pertaining to a result set that was generated by a different actor. ¶

Implementers MUST ensure that pagination through results sets is strictly confined to the data that the actor's current identity has been authorized to access. This holds true even in cases where the actor has obtained a cursor pertaining to a result set that was generated by a different actor. ¶

Authorization checks MUST be continuously applied as an actor navigates through the result set associated with a cursor. Under no circumstances should possession of a cursor be interpreted as granting any supplementary access privileges to the actor. ¶

Authorization checks MUST be continuously applied as an actor navigates through the result set associated with a cursor. Under no circumstances should possession of a cursor be interpreted as granting any supplementary access privileges to the actor. ¶

When possible, service providers SHOULD invalidate all cursors corresponding to an actor immediately following a change in permissions. This ensures that any queries executed post-permission change, utilizing old cursors, will be denied. As an alternative approach, service providers may opt to retain the existing cursors but must ensure that any metadata tied to the result set, such as record counts, is updated to reflect the new permissions accurately. ¶

When possible, service providers SHOULD invalidate all cursors corresponding to an actor immediately following a change in permissions. This ensures that any queries executed post-permission change, utilizing old cursors, will be denied. As an alternative approach, service providers may opt to retain the existing cursors but must ensure that any metadata tied to the result set, such as record counts, is updated to reflect the new permissions accurately. ¶

In alignment with Section 2 , cursor values are URL-safe strings that are opaque to clients. Service providers should obfuscate cursors values to prevent clients from interpreting cursors or forging new cursors. Service providers should be able to easily detect forged cursor values and immediately return an invalidCursor as described in Section 2.1 . ¶

In alignment with Section 2 , cursor values are URL-safe strings that are opaque to clients. Service providers should obfuscate cursors values to prevent clients from interpreting cursors or forging new cursors. Service providers should be able to easily detect forged cursor values and immediately return an invalidCursor as described in Section 2.1 . ¶

The service provider MUST handle error scenarios without exposing sensitive data. For instance, if an actor attempts to access a page of results outside their authorized scope, or if a request is made for a non-existent page, the service provider should respond with identical error messages, so as not to disclose any details of the underlying data or the nature of the authorization failure. It is acceptable, however, for the service provider to log different messages to a log accessible by administrators or other authorized personnel. ¶

The service provider MUST handle error scenarios without exposing sensitive data. For instance, if an actor attempts to access a page of results outside their authorized scope, or if a request is made for a non-existent page, the service provider should respond with identical error messages, so as not to disclose any details of the underlying data or the nature of the authorization failure. It is acceptable, however, for the service provider to log different messages to a log accessible by administrators or other authorized personnel. ¶

The concern for availability primarily stems from the potential for Denial-of-Service (DoS) attacks. If the service provider elects to retain substantial data or metadata for each cursor, numerous initial queries that allocate cursors could strain and eventually exhaust service-provider resources. Such an attack could be orchestrated by an attacker with malicious intent or could occur unintentionally as a result of client testing or bugs. ¶

To mitigate risks, the following strategies are recommended for service providers: ¶

Clients should authenticate to retrieve large result sets. Anonymous queries yielding numerous results may return an HTTP status code 400 (Bad Request) with the error type "tooMany," as outlined in Section 3.12 of [ RFC7644 ] . ¶

Clients should authenticate to retrieve large result sets. Anonymous queries yielding numerous results may return an HTTP status code 400 (Bad Request) with the error type "tooMany," as outlined in Section 3.12 of [ RFC7644 ] . ¶

Implement rate limiting to control the volume and cadence of cursor requests. This approach should adhere to established standards for rate limiting; details can be found in [ RFC6585 ] . ¶

Implement rate limiting to control the volume and cadence of cursor requests. This approach should adhere to established standards for rate limiting; details can be found in [ RFC6585 ] . ¶

Allow administrator of the service provider to set a ceiling on the number of cursors permissible at any given time or to specify a maxPageSize value. Guidance on configuring such values should be documented in the implementation administrator/installation guide. ¶

Allow administrator of the service provider to set a ceiling on the number of cursors permissible at any given time or to specify a maxPageSize value. Guidance on configuring such values should be documented in the implementation administrator/installation guide. ¶

Cursor invalidation mechanisms (including mechanisms triggered by permissions changes) must be designed to be resource-efficient to prevent them from being exploited for DoS attacks. ¶

Cursor invalidation mechanisms (including mechanisms triggered by permissions changes) must be designed to be resource-efficient to prevent them from being exploited for DoS attacks. ¶

5.4. Other Security References

Using URIs to describe and locate resources has its own set of security considerations, as discussed in Section 7 of [ RFC3986 ] . Implementations should also refer to [ BCP195 ] and [ RFC9110 ] for additional security considerations that are relevant for underlying TLS and HTTP protocols. ¶

6. IANA Considerations

IANA has amended the "System for Cross-domain Identity Management (SCIM) Schema URIs" registry group established by [ RFC7643 ] as described below. ¶

IANA has updated the "SCIM Schema URIs for Data Resources" registry as follows: ¶

For the urn:ietf:params:scim:api:messages:2.0:ListResponse , Section 2 of this document has been added to the References column. ¶

For the urn:ietf:params:scim:api:messages:2.0:ListResponse , Section 2 of this document has been added to the References column. ¶

For the urn:ietf:params:scim:api:messages:2.0:SearchRequest , Section 2 of this document has been added to the References column. ¶

For the urn:ietf:params:scim:api:messages:2.0:SearchRequest , Section 2 of this document has been added to the References column. ¶

IANA has updated the "SCIM Server-Related Schema URIs" registry as follows: ¶

For the urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig , Section 4 of this document has been added to the References column. ¶

For the urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig , Section 4 of this document has been added to the References column. ¶

7.1. Normative References

7.2. Informative References

The authors would also like to acknowledge the following individuals who provided valuable feedback while reviewing the document: Aaron Parecki , David Brossard , Dean H. Saxe , and Pamela Dingle . ¶

The authors would like to acknowledge the contribution of Paul Lanzi (IDenovate) in leading the writing of the Security Considerations section. ¶

Extracted Entities

Attack Types (1)