B2BB2B LLM
Επιχειρηματική διορατικότητα

Πώς να χρησιμοποιήσετε το SCIM για στοιχεία ελέγχου Joiner, Mover και Leaver σε έναν χώρο εργασίας LLM API

Μια πρακτική αρχιτεκτονική για τη χρήση του SCIM για τη διαχείριση των συνδρομών και των ρόλων στο χώρο εργασίας LLM, ενώ ανακαλούνται ξεχωριστά οι περίοδοι σύνδεσης, τα προσωπικά κλειδιά API, οι εγκρίσεις και η πρόσβαση σε ορφανό φόρτο εργασίας.

SCIM can create, update, and deactivate users in an LLM API workspace, but it does not define what should happen to local sessions, personal API keys, pending approvals, or service accounts sponsored by those users. Treating a SCIM deactivation as complete offboarding leaves a gap between identity state and effective access.

The safer pattern is to use SCIM as an input to an identity-lifecycle controller. The controller applies different policies to human identities, personal credentials, and workload identities. When a person leaves, it should block the person immediately, disable credentials that represent that person, and review production identities without automatically breaking workloads.

Define the boundary: what SCIM controls and what it does not

Standards fact: SCIM 2.0 defines User and Group resources and HTTP operations for creating, retrieving, replacing, modifying, and deleting them. A SCIM PATCH request can contain multiple ordered operations, which must be applied atomically. The standard does not prescribe the business consequences of setting a user’s active property to false.

That distinction matters in an AI API workspace. Deactivating the User resource can remove dashboard access, but the platform may still have other authorization artifacts:

  • Local browser and management-API sessions
  • Personal API keys issued to the user
  • Privileged changes awaiting the user’s approval
  • Team and project memberships derived from groups
  • Service accounts or workload keys for which the user is the sponsor
  • Budgets, model entitlements, or administrative roles assigned outside SCIM

Implementation recommendation: Make the SCIM adapter responsible for normalized identity events, not for performing every downstream cleanup operation itself. Send those events to an identity-lifecycle controller that can update authorization state synchronously and coordinate slower credential and ownership workflows.

Model people, credentials, and workloads separately

A reliable design starts with an explicit principal model. Do not represent a user, every key they created, and every service account they administer as one object with one lifecycle.

ObjectRepresentsDefault leaver action
Human principalAn employee or contractorDeactivate immediately
Personal API keyThe human acting programmaticallyDisable when the human is deactivated
Service accountA non-human workloadReview ownership and exposure
Workload keyA credential issued to a service accountRotate if exposed; preserve if ownership and security remain valid
Sponsor relationshipThe accountable human for a workloadTransfer or escalate

This separation also improves LLM API key management. A credential can be revoked according to what it represents instead of according to who happened to click “create key.”

At minimum, store stable IDs for the principal, credential, service account, sponsor, team, and organization. Preserve relationships such as key.subject_principal_id, service_account.owner_team_id, and service_account.sponsor_principal_id.

Correlate identities without depending on email addresses

Standards fact: SCIM’s externalId is assigned by the provisioning client and scoped to that provisioning domain. It is suitable for correlating an identity-provider record with a workspace principal. Email addresses, display names, and usernames can change or be reused.

Use a compound correlation key:

correlation_key = provisioning_domain_id + ":" + externalId

The provisioning-domain component is important when an organization has multiple identity providers, test and production directories, or a staged migration between directories. The same externalId must not collide across those domains.

Process create, update, and deactivation requests idempotently. Replaying a successful request should converge on the same workspace state rather than create a duplicate principal or repeat an irreversible cleanup action.

Maintain a provisioning-event ledger containing:

  • Organization and provisioning-domain IDs
  • Authenticated SCIM client ID
  • SCIM resource ID and externalId
  • Requested operation and normalized changes
  • Resulting workspace state
  • Timestamp, outcome, and correlation ID

Do not store bearer tokens, API key values, or other plaintext secrets in this ledger.

Implement joiner controls as a staged grant

For a new user, SCIM should establish identity and baseline membership. It should not automatically grant every capability associated with every organizational group.

  1. Upsert the principal. Match on provisioning domain plus externalId, then store current profile attributes separately from the durable identity key.
  2. Set the authorization state. An active user may authenticate, subject to SSO and workspace policy. An inactive user must not gain access even if a stale group update arrives.
  3. Resolve group mappings. Map approved IdP groups to a small set of workspace roles and teams.
  4. Evaluate sensitive grants separately. Model access, spending authority, production-key administration, and organization administration may require additional policy or approval.
  5. Record the effective result. Log both the source group and the role or membership it produced.

For example, an IdP group named ai-platform-engineers might grant membership in the Platform team and the Developer role. A separate policy could require approval before that role can administer production credentials or use restricted models. This keeps directory structure from becoming the entire authorization model.

Handle movers by recalculating effective access

A mover event may arrive as a user attribute update, a Group PATCH, or several changes delivered at different times. Recalculate effective access from current authoritative inputs instead of assuming events arrive in a convenient order.

A practical mover workflow is:

  1. Apply the SCIM operation atomically to the normalized identity state.
  2. Recompute mapped team memberships and baseline roles.
  3. Compare previous and proposed effective permissions.
  4. Remove obsolete privileges before granting conflicting new ones.
  5. Preserve separately approved entitlements only when their policy remains satisfied.
  6. Emit an audit event describing additions, removals, and their source.

A team change should also update future usage attribution, but it should not rewrite history. Retain the original team or cost-center identifiers on past requests so LLM API cost attribution remains explainable after reorganization.

Make leaver deactivation an immediate authorization transition

The critical control is the transition from active to inactive. Do not wait for background cleanup before denying new activity.

{
  "principal_id": "usr_7f2c",
  "authorization_state": "inactive",
  "reason": "scim_deactivation",
  "correlation_id": "prov_01J...",
  "effective_at": "2026-12-03T14:22:05Z"
}

The request transaction should set the principal’s authorization state and advance an authorization version or revocation timestamp. Dashboard requests, management-API calls, and other interactive operations must check that state. Cached authorization decisions must expire or be invalidated promptly.

After the deny state is committed, run the following workflow:

  1. Invalidate all local sessions for the human principal.
  2. Remove interactive team memberships and privileged roles.
  3. Cancel pending approvals that require the user’s authority.
  4. Disable personal API keys whose subject is the human.
  5. Identify recent use of those keys and flag suspicious post-termination activity.
  6. Enumerate sponsored service accounts and start an ownership review.
  7. Record each result in the audit trail.

Security fact: Identity-provider and relying-party sessions are managed independently. Ending the IdP session does not inherently terminate a workspace’s local session. OpenID Connect Back-Channel Logout can complement deactivation when supported, but it remains a separate integration from SCIM.

Do not blindly revoke production service accounts

A departing employee may sponsor a service account used by a production application. Automatically disabling that account could convert an identity-control event into an outage.

For each sponsored workload, determine whether it has an accountable team, an active production dependency, and credentials the departing employee could access. Then:

  • Transfer sponsorship to an approved active person without changing the workload’s stable identity.
  • Rotate credentials if the departing person could retrieve or copy them.
  • Keep the workload active when ownership and credential security are verified.
  • Quarantine it when no accountable owner or legitimate workload can be established.

Organizations that still run shared workloads under personal keys should expect some offboarding risk. The corrective action is to migrate those workloads to service accounts, not to preserve a former employee’s personal credential indefinitely.

Add an emergency path and reconciliation loop

Operational fact: Microsoft documents an approximately 40-minute synchronization interval for custom SCIM applications after the initial provisioning cycle, while also supporting on-demand provisioning for selected users. Normal synchronization latency may therefore be too long for a high-risk termination.

Implementation recommendation: Provide an authenticated emergency action that immediately marks a principal inactive, invalidates local sessions, and disables personal keys. The later SCIM event should reconcile to the same state idempotently.

Run periodic reconciliation even when event delivery is available. Compare IdP scope with workspace state and alert on:

  • Active workspace users absent from IdP scope
  • Inactive users with usable personal keys
  • Mapped groups that differ from effective roles
  • Service accounts without active sponsors
  • Provisioning failures or events older than the expected interval
  • Emergency deactivations not yet confirmed by the authoritative directory

Forward-looking option: RFC 9967 defines an optional SCIM profile for asynchronous Security Event Tokens covering events such as create, patch, delete, activate, and deactivate. It can reduce detection latency where supported, but it should not replace reconciliation. Event feeds can still be delayed, duplicated, misordered, or misconfigured.

Test outcomes, not only SCIM responses

A successful SCIM response does not prove that access was removed. Build integration tests that assert effective authorization across the workspace.

  • Joiner: The correct user and baseline teams appear without unintended privileged grants.
  • Mover: Old roles disappear, new roles appear, and historical usage attribution remains unchanged.
  • Leaver: Dashboard access, management APIs, local sessions, and personal keys stop working.
  • Rehire: The original durable identity is restored without reviving previously disabled personal keys by default.
  • Duplicate delivery: Repeated events produce no duplicate users or repeated destructive actions.
  • Out-of-order delivery: An older group update cannot reactivate or re-privilege an inactive user.
  • IdP outage: Existing deny decisions remain enforceable, and emergency deactivation still works.
  • Orphaned workload: The service account enters review or quarantine according to policy.

Implementation checklist

  • Use provisioning domain plus externalId as the durable correlation key.
  • Separate human principals, personal keys, service accounts, workload keys, and sponsors.
  • Keep group-to-role mappings small and reviewable.
  • Make inactive status override group membership and cached grants.
  • Invalidate local sessions independently of SSO logout.
  • Disable personal credentials when their human subject is deactivated.
  • Transfer or quarantine workload identities through an ownership workflow.
  • Default to reversible soft deactivation; perform hard deletion through a retention-controlled process.
  • Preserve non-secret pseudonymous identifiers needed for audit and historical cost attribution.
  • Protect SCIM with transport security, limited-lifetime bearer credentials, and client-specific access policy.
  • Provide an emergency deactivation path and periodic reconciliation.
  • Test effective access, not merely the state of the SCIM User record.

The practical objective is not simply to synchronize a directory. It is to make identity changes produce predictable authorization outcomes. Deactivate people immediately, disable credentials that represent them, and handle production workloads through accountable ownership and credential-review policies.

Related reading

FAQ

Συχνές ερωτήσεις

Η ρύθμιση ενεργό σε false στο SCIM ανακαλεί τα κλειδιά API ενός χρήστη;
Όχι αυτόματα. Το SCIM επικοινωνεί την κατάσταση του χρήστη, αλλά ο χώρος εργασίας πρέπει να καθορίσει και να επιβάλει τις συνέπειες. Μια καλή προεπιλογή είναι η άμεση απόρριψη νέων ανθρώπινων ενεργειών, η ακύρωση τοπικών περιόδων σύνδεσης και η απενεργοποίηση των προσωπικών κλειδιών API που σχετίζονται με αυτόν τον ανθρώπινο κύριο.
Πρέπει να απενεργοποιηθούν όλοι οι λογαριασμοί υπηρεσιών που συνδέονται με έναν αποχωρούντα υπάλληλο;
Όχι. Ο λογαριασμός υπηρεσίας αντιπροσωπεύει φόρτο εργασίας, όχι τον χορηγό υπάλληλο. Μεταφέρετε χορηγία, επαληθεύστε την υπόλογη ομάδα και εναλλάξτε τα διαπιστευτήρια εάν ο υπάλληλος μπορούσε να έχει πρόσβαση σε αυτά. Θέστε τον λογαριασμό σε καραντίνα μόνο όταν δεν μπορεί να καθοριστεί η ιδιοκτησία ή η νόμιμη χρήση.
Γιατί πρέπει να χρησιμοποιείται το externalId αντί για μια διεύθυνση email;
Ο πελάτης παροχής εκχωρεί εξωτερικό αναγνωριστικό και είναι σταθερό σε αυτόν τον τομέα παροχής. Οι διευθύνσεις email και τα ονόματα χρήστη μπορούν να αλλάξουν ή να επαναχρησιμοποιηθούν. Συνδυάστε το externalId με ένα αναγνωριστικό τομέα παροχής για να αποφύγετε τις συγκρούσεις μεταξύ των καταλόγων.
Είναι ο συγχρονισμός SCIM αρκετά γρήγορος για επείγοντα τερματισμό;
Όχι πάντα. Οι υπηρεσίες παροχής μπορεί να λειτουργούν σε περιοδικούς κύκλους, δημιουργώντας ένα παράθυρο ανάκλησης. Προσθέστε μια επαληθευμένη διαδρομή απενεργοποίησης έκτακτης ανάγκης που αποκλείει αμέσως το κύριο, τις περιόδους λειτουργίας και τα προσωπικά κλειδιά και, στη συνέχεια, αφήστε το SCIM να συμβιβάσει την έγκυρη κατάσταση αργότερα.
Πρέπει να διαγραφεί αμέσως ένας απενεργοποιημένος χρήστης;
Συνήθως όχι. Η μαλακή απενεργοποίηση υποστηρίζει τη διόρθωση, την έρευνα και την εκ νέου πρόσληψη, διατηρώντας παράλληλα τα αρχεία ελέγχου και απόδοσης κόστους. Η σκληρή διαγραφή θα πρέπει να είναι μια μεταγενέστερη ροή εργασιών ελεγχόμενη από διατήρηση που ελαχιστοποιεί τα προσωπικά δεδομένα χωρίς να καταστρέφει τα απαιτούμενα στοιχεία.