Repository navigation
Phase 2: SCIM 2.0 user provisioning - #40
Merged
Merged
Conversation
Phase 2: SCIM after SSO. - Migration 024: api_keys may have the scope 'scim' (one scope per key); users.scim_external_id. - A SCIM token (Integrations > User provisioning) can call only /scim/v2; read keys cannot. It is swapped for a one-minute internal token with the role "scim"; SCIM endpoints require it. - /scim/v2: ServiceProviderConfig, ResourceTypes, Schemas; Users list (userName eq / externalId eq filters, paging), get, create (no usable password: SSO or a reset link), replace, PATCH (add/replace, with or without a path, "True"/"False" strings: Entra and Okta forms), delete (deactivates). SCIM error format and application/scim+json. - Emails unique across SCIRM (409 uniqueness); the last active admin cannot be deactivated or demoted (409 mutability); deactivation stops sign-in and session renewal. - SCIM writes are audited under the token (the audit middleware now also covers /scim/v2); SCIM and SSO events in the access category. - docs/scim.md; SSO docs point to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2: SCIM, after SSO (#39).
What's new
Administration → Integrations → User provisioning (SCIM) (admins):
<PUBLIC_API_URL>/scim/v2)Entra, Okta and other identity providers can then create accounts, update names, emails and roles, and deactivate people who leave. Accounts that SCIM creates have no usable password; they sign in with SSO.
How it's built
api_keysscopes may bescim(exactly one scope per key)users.scim_external_idscimscope./scim/v2, and read keys can't call/scim/v2.scim, which the SCIM endpoints require. A person's token is refused./scim/v2(RFC 7643/7644):ServiceProviderConfig,ResourceTypes,SchemasUserslist (filtersuserName eq/externalId eq, paging), get, create, replacepath,"True"/"False"strings (the Entra and Okta forms)application/scim+jsonuniqueness)mutability)viewer/scim/v2, so every SCIM change is recorded under the token (api-key:<name> (<prefix>)). SCIM and SSO events are in the "Access and team" category.docs/scim.md; the SSO guide points to it.Testing
tests/security/test_scim.py(14 tests):userName(case-insensitive) andexternalId, getname.familyNameremoveop refusedtests/db:{scim}is accepted and{read,scim}refused (one scope). Migrations round-trip.tscclean,vite buildOK. Strict docs build OK."value": "False") deactivated them, and their browser session's refresh was refused/api/v1/suppliers, and the create appears in the audit log under the tokenNot supported
Groups, bulk operations, sorting, ETags,
removeoperations, password changes.🤖 Generated with Claude Code