SCIM 2.0
SCIM 2.0
Section titled “SCIM 2.0”Standards
Section titled “Standards”- RFC 7642 – SCIM Definitions, Overview, Concepts
- RFC 7643 – SCIM Core Schema
- RFC 7644 – SCIM Protocol
- RFC 6750, RFC 9068 – the bearer access tokens SCIM clients authenticate with
Available Flows
Section titled “Available Flows”| Flow ID | Name | Description |
|---|---|---|
user-lifecycle |
User Lifecycle | Create, read, update, deactivate users |
group-membership |
Group Membership | Group CRUD and membership management |
user-discovery |
User Discovery | Filter expressions and search queries |
bulk-operations |
Bulk Operations | Batch create/update/delete (documented; Looking Glass does not run this flow) |
schema-discovery |
Schema Discovery | ServiceProviderConfig, ResourceTypes, Schemas |
Outbound provisioning exists as a documented SCIM client pattern (outbound-provisioning) and is not executable in Looking Glass: it needs an external SCIM server.
Demo Scenarios
Section titled “Demo Scenarios”- Basic User Provisioning – User CRUD lifecycle
- Filter Expression Demo – SCIM filter query syntax
- PATCH Operations Demo – Add, remove, replace operations
Endpoints
Section titled “Endpoints”| Path | Methods | Purpose |
|---|---|---|
/scim/v2/ServiceProviderConfig |
GET | Service provider capabilities |
/scim/v2/ResourceTypes |
GET | Available resource types |
/scim/v2/ResourceTypes/{id} |
GET | Resource type by ID |
/scim/v2/Schemas |
GET | Supported schemas |
/scim/v2/Schemas/{id} |
GET | Schema by ID |
/scim/v2/Users |
GET, POST | List/create users |
/scim/v2/Users/{id} |
GET, PUT, PATCH, DELETE | User operations |
/scim/v2/Groups |
GET, POST | List/create groups |
/scim/v2/Groups/{id} |
GET, PUT, PATCH, DELETE | Group operations |
/scim/v2/Bulk |
POST | Bulk operations |
/scim/v2/.search, /scim/v2/Users/.search, /scim/v2/Groups/.search |
POST | Query with the parameters in the body |
/scim/v2 |
GET | Query Users and Groups together |
/scim/v2/Me |
any | Not offered: answers 501 (RFC 7644 Section 3.11) |
Authentication
Section titled “Authentication”RFC 7644 Section 2 defines no SCIM-specific scheme: “SCIM depends on the use of Transport Layer Security (TLS) and/or standard HTTP authentication and authorization schemes”. This service provider is an OAuth 2.0 protected resource. Every flow starts by requesting an access token, which Looking Glass shows as its first step.
GET /scim/v2/ServiceProviderConfigneeds no token. ItsauthenticationSchemesnames one scheme,oauthbearertoken.- The client requests a token from
POST /oauth2/tokenwithgrant_type=client_credentialsas the seeded clientscim-client(secret atGET /oauth2/demo/clients). Scopescim.readauthorizes retrieval;scim.writeauthorizes creation, modification and deletion. - The token is an RFC 9068 JWT access token. Its
audis the SCIM base URI{origin}/scim/v2and itsexpbounds its lifetime, which RFC 7644 Section 7.4 requires of every bearer token. - The client sends
Authorization: Bearer <access_token>on each SCIM request.
What the service provider returns when it refuses a request:
| Request | Status | WWW-Authenticate |
|---|---|---|
No Authorization header, or a scheme other than Bearer |
401 |
Bearer realm="scim" |
| Token that is expired, revoked, from another issuer or for another resource | 401 |
Bearer realm="scim", error="invalid_token", error_description="..." |
| Token without the scope the request needs | 403 |
Bearer realm="scim", error="insufficient_scope", error_description="...", scope="scim.write" |
The body is the RFC 7644 Section 3.12 error, with status as a JSON string. Deployment settings are on the SCIM service page.
How A Resource Is Returned
Section titled “How A Resource Is Returned”These are the rules a provisioning client can rely on here, with the text they come from. The SCIM User example page shows a captured User with every attribute annotated.
idis the service provider’s. RFC 7643 Section 3.1: “The value of the “id” attribute is always issued by the service provider and MUST NOT be specified by the client.” Anid,metaorgroupsin aPOSTorPUTbody is ignored (RFC 7644 Sections 3.3 and 3.5.1).meta.locationmatches the headers. A201carries the User’s URI inLocation(RFC 7644 Section 3.3). Every response that returns one resource carries it inContent-Location, andmeta.versioninETag(RFC 7643 Section 3.1).userNameis unique without regard to case.[email protected]and[email protected]are the same userName, compared with the PRECIS UsernameCaseMapped profile (RFC 7644 Section 5). A second one gets409withscimTypeuniqueness. A userName the profile does not allow, such as one with a space, gets400withinvalidValue.schemasis checked. It must be present, name the core schema of the resource type, name only schemas that type defines, and repeat nothing (RFC 7643 Section 3). Otherwise the response is400.- Conditional retrieval works.
GETwithIf-None-Matchset to the current entity-tag returns304and no body (RFC 7644 Section 3.14). Accept: application/jsonis honoured. The same JSON is labelledapplication/jsonfor a client that asks for that and not forapplication/scim+json(RFC 7644 Section 3.8).- Email domains are lower-cased on input (RFC 7643 Section 4.1.2).
- Passwords are not kept. The
passwordattribute is dropped on input and never returned, soServiceProviderConfigreportschangePassword.supportedasfalse.
Querying
Section titled “Querying”A query runs against one resource type, or against the Base URI for Users and Groups together (RFC 7644 Section 3.4.2).
- Filters follow the grammar of Section 3.4.2.2:
eq,ne,co,sw,ew,pr,gt,ge,lt,le, joined withand,orandnot, grouped with round brackets. A value filter in square brackets applies to one value of a multi-valued attribute:emails[type eq "work" and value co "@example.com"]. - Comparison follows the attribute.
userName eq "[email protected]"matches becauseuserNameis not case exact;idis. Dates compare chronologically.gton a boolean gets400withscimTypeinvalidFilter, and so does an operator the grammar does not have. - Attribute names may carry their schema URI, which extension attributes should:
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department eq "Security". - Sorting takes
sortByandsortOrder. Resources with no value for the attribute come last when ascending and first when descending. A multi-valued attribute sorts by its primary value. - Paging takes
startIndexandcount.count=0returnstotalResultsand no resources. A page holds at most 200. attributesandexcludedAttributeschoose what is returned, on queries and on the responses ofGET,POST,PUTandPATCH.idandschemasare always returned.
Changing Resources
Section titled “Changing Resources”- PATCH is atomic. If one operation fails, none is applied (RFC 7644 Section 3.5.2). A PATCH that changes nothing leaves
meta.versionandmeta.lastModifiedas they were. - PATCH respects the schema. Changing a read-only attribute such as
id,metaor a User’sgroups, or removing a required one such asuserName, gets400withscimTypemutability. A value filter that matches nothing getsnoTarget. - One primary value. Setting
primarytotrueon one value of a multi-valued attribute sets it tofalseon the others. If-Matchis honoured onPUT,PATCHandDELETE: an entity-tag that is not the currentmeta.versiongets412and nothing changes (RFC 7644 Section 3.14).- Group members are Users of this service provider. A member that is not one gets
400. A User’sgroupsattribute is read-only and follows the Groups. - Bulk performs each operation as the single request it stands for and reports each result.
bulkId:references are resolved whatever the order of the operations. More than 1000 operations or 1 MiB gets413.
What To Validate
Section titled “What To Validate”-
Authentication: the
WWW-Authenticatechallenge on a401, and the403ascim.readtoken gets onPOST /scim/v2/Users -
User schema:
userName,name,emails,active,meta -
Group membership:
membersarray with$refanddisplay -
PATCH semantics:
add,remove,replaceoperations -
Filter expressions:
eq,co,sw,gt,ltoperators -
Bulk: operation count, error handling, atomicity
-
ETag:
If-Match/If-None-Matchfor concurrent updates