TL;DR
- The System for Cross-domain Identity Management standard lets an identity provider create, change and remove user accounts inside each app.
- Every change is a plain web call with the user's details, and the app answers with its own identifier (ID) for that user, as in this example.
- A failed call, such as an expired token, can leave a leaver's account open while the identity side already shows them as gone.
- Check token expiry, deactivation tests and failed-call alerts before you trust the sync.
When someone joins a company, four or five apps need an account for them. When they leave, each account has to go, and somebody has to remember all of them. System for Cross-domain Identity Management, or SCIM, is the standard that does this work. The identity provider keeps the list of people and groups, and it talks to each app over a web interface to create, change and remove accounts.
Before you start: the OpenID Connect explainer covers sign-in. SCIM does not sign anyone in. It only keeps the accounts in place.
What SCIM is#
SCIM is a set of rules for user and group records. RFC 7643 defines the shape of a user, with fields such as a user name, a name, emails and an active flag. RFC 7644 defines the protocol: plain HTTP calls with JSON bodies.
The identity provider is the client that sends the calls. The app that receives them is the service provider. The app publishes a set of endpoints, and the identity provider knows where to find them.
Think of a building’s keycard desk. A manager sends a request with the new person’s name and the floors they need. The desk prints a card. When the person leaves, the desk cancels the card. The desk does not decide who should be in the building. It only follows the list it is given.
One example: a new hire on day one#
Maria joins on Monday. The identity provider creates her in a support tool with a POST to the tool’s user endpoint. The body carries her name, her work email and her group. The tool answers 201 Created and returns its own internal ID for her. The identity provider stores that ID, because every later call must name it.
The example uses made-up names and addresses.
The calls: create, read, change, remove#
Creating a user is a POST. Reading one is a GET. Changing a field is a PATCH, for example setting the active flag to false. Deleting is also possible, but many teams deactivate instead, so the history and the audit trail stay in the app.
The flow below shows the create call, the deactivate call, and the failure that matters most.
When the sync breaks#
On Friday, Maria leaves. The identity provider sends a PATCH with the active flag set to false. The token it uses to call the tool has expired, so the tool answers 401 Unauthorized, and the change never lands. Maria’s account stays active.
Nobody notices, because the identity provider shows her as gone. Many provisioning tools retry and send an alert. Someone still has to read the alert, and someone has to act on it.
A successful deactivation is not the whole job either. Tokens and sessions that were already issued can live on for a while, as our Entra test of a revoked secret showed for app tokens. Ask each app what happens to open sessions.
What to check#
- Who owns the token that the sync uses, and the date it expires. Put that date in a calendar.
- Whether leavers are deactivated, and whether you test that with a real test record.
- Whether group membership maps to app roles, so access follows the group.
- Whether failed calls reach a person, not only a log file.
The more apps a company uses, the more it needs one identity record that the apps follow.
Where to go next#
- Access, refresh and ID tokens: the token the sync job uses is one of these.
- Secrets or federation: how a CI job proves who it is: how a job proves its identity without a stored password.
- OpenID Connect explained: the sign-in part that SCIM leaves out.
Sources#
This post as Markdown · RSS · JSON feed
New posts by email
One email a week with new posts and labs. Unsubscribe anytime.
Your address is stored with Kit, which sends the emails. Details