Repository navigation
feat(provisioning): add opt-in SCIM 2.0 user and group provisioning - #73
Conversation
SCIM_ENABLED (off by default) serves /scim/v2 discovery, Users and Groups with SCIM errors, ETag versions and If-Match checks, count-bounded pagination and a small documented filter subset. A provisioning bearer token is matched by digest against tenant-scoped secret references, and fixes the organisation. Provisioned accounts are never administrators and receive no usable key over SCIM. Deactivation or deletion revokes the account's key and sessions through the security revision and keeps the account, external identity and usage. Groups map to teams through the tenant authority. Storage is in D1 (migration 0036).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
multillm-proxy | 606bba8 | Oct 09 2026, 08:01 AM |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds opt-in SCIM 2.0 provisioning of non-administrator accounts and organisation teams. With
SCIM_ENABLEDunset oroff(the default), every/scim/v2/*route returns 404 and account creation is unchanged.SCIM_ENABLED. Empty means off; a malformed value is off with one warning.SCIM_TRUST_CONFIG_JSONmaps each organisation to atoken_ref. That names the environment variable or Worker secret holding the provisioning bearer token, never the token itself.CONFIG_REVISION_SYNC_ENABLED; without them it returns 503.ServiceProviderConfig,Schemas,ResourceTypes,UsersandGroupswith list, get, create, PUT, PATCH and DELETE, served asapplication/scim+jsonwith SCIM error bodies.startIndex/count, withcountat most 100.userName,externalIdanddisplayNamewitheq; others return 400invalidFilter.meta.versionis an ETag, and a staleIf-Matchreturns 412.externalIdreturns the existing resource; a conflictinguserNamereturns 409uniqueness.active=falseor DELETE revokes the account and replaces its key hash, ending keys and sessions through the security revision. The account, external identity and usage are kept, and reactivating does not restore the old key.Details are in
docs/scim-provisioning.md.Wiring
services/user_provisioning.pygetsprovision_scim_user, a least-privilege creator that needs no interactive administrator session.create_useris unchanged./scim/v2/*unchanged, which a test confirms.register_scim_routeswith the D1 store, account service and tenant authority;scimendpoint and its dispatcher entry;ETag/Locationin the CORS expose lists.Shared registrations
tests/test_scim_provisioning_worker.mjsintest:worker.worker/scim-d1.mjsin the edge module inventory, and both SCIM blueprint routes in the Flask route inventory.SCIM_ENABLEDandSCIM_TRUST_CONFIG_JSONin the Container env keys.scim_resources,scim_group_members,scim_token_digestsandscim_auditinREQUIRED_D1_TABLES.Stacked on #72
Migration numbers must be contiguous in each PR, so this branch merges
feat/saml-federation(#72, migration 0035), which stacks on #71 and #70. Merge those first. The credits ledger stacks on this one.Tests
tests/test_scim_provisioning.pyandtests/test_scim_provisioning_worker.mjscover:externalId;npm run test:worker: 1,830 passed.npm run test:integration: 7 passed.cf:migrations:checkreports 36 contiguous, additive migrations.test:deploy, free routes, client headers and thewrangler deploy --dry-runbundle all pass.tests/test_frontend_build.mjsfails locally because@tailwindcss/cliis not installed. It fails the same way on main.Apply the migration before enabling the flag:
npx wrangler d1 migrations apply multillm-intelligence --remote.CI notes
python/nodejobs: the dependency-audit steps fail on every branch, including main. fix(deps): clear the CI dependency audit advisories #42 fixes that.AdmissionCoordinatorDurable Object migration, whichwrangler versions uploadcannot apply. This is expected untilwrangler deployruns on main.This is part of Wave 7. The README line comes with the Wave 7 integration PR.