Urgent.News

What's breaking now, across thousands of outlets.

Tech

SCIM Provisioning & Deprovisioning That Actually Removes Access

Here is a scenario I now test on every enterprise SSO integration. An employee leaves a customer company. Their IT team disables the account in the identity provider. The next morning, the ex-employee's laptop is still logged in to your SaaS app, because the session cookie is valid for 30 days and nobody told your app anything. Their personal API token, created months ago for a script, still…

When a user leaves a company, their identity provider (IdP) sends a deprovisioning request to your application. This request includes the user's unique identifier, such as a username or email address. Your application must respond to this request by blocking login, revoking any live sessions, disabling API tokens and pending invites, and logging the change—all within a single, transaction-safe step.

To accomplish this, your application must first authenticate the IdP per tenant. Each customer tenant is assigned a unique long random bearer token for SCIM, stored hashed and rotatable. A middleware function checks the bearer token in the request and ensures it corresponds to the correct tenant's users. If the token is invalid or not associated with a tenant, the application returns a 401 Unauthorized response.

Next, the application handles the PATCH /Users/{id} endpoint with active: false. This endpoint is sent by the IdP when deprovisioning a user. The application must normalize the different ways IdPs express deactivation, such as replace active with false or active: false. Once normalized, the application uses a transaction to update the user's status, kill all live sessions (database or Redis), and disable any API tokens and pending invites. Finally, the application logs the change to maintain a record of the deprovisioning event.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Tell us your story, and we might read it on the CodeNewbie Podcast 🎙️

Hi! I’m Lauren 👩🏼💻, the new host of the CodeNewbie Podcast , and I’d love to hear your story. This season, I’m asking for your help.

  • Lauren announces hosting CodeNewbie Podcast season
  • Encourages sharing coding stories, triumphs, challenges
  • Interested in AI-related experiences and lessons learned

Untangling Dependency Cycles in a Modular Laravel Monolith

Once the strangler fig from Part 1 is working, the new Laravel app grows fast. Each migrated route brings a feature with it: dealers, orders, invoices, stock.

  • Laravel modular app grows rapidly with new features in separate modules
  • Dependency cycles emerge as modules import functions from each other
  • deptrac tool identifies dependency violations in codebase

Keeping secrets out of agent prompts: how Vault and DLP fit together

Originally published on sandscale.dev . An agent that deploys code, queries a database or calls an API needs credentials.

  • Credentials can leak in agent runs through prompts, files, or tool-call arguments.
  • Leaked credentials appear in provider logs, user transcripts, and model context.
  • Vault and DLP solutions help secure secrets and prevent accidental exposure.

More from Friday 20 November →