Scim IdP

Published
Length
3 min read

Luis Felipe Dias

All posts

A scim idp setup syncs user accounts and groups from your central directory to target apps. You link your identity provider to each app using a web URL and a secret token. Teams use this setup to create and delete user accounts when staff join or leave. Still, teams often map broad directory groups straight to high-level admin roles inside databases and servers. This habit gives way too many people full read and write power over live production data. How a scim idp workflow runs under the hood

IdP: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

A scim idp setup syncs user accounts and groups from your central directory to target apps. You link your identity provider to each app using a web URL and a secret token. Teams use this setup to create and delete user accounts when staff join or leave. Still, teams often map broad directory groups straight to high-level admin roles inside databases and servers. This habit gives way too many people full read and write power over live production data.

How a scim idp workflow runs under the hood

SCIM stands for System for Cross-domain Identity Management, which is an open standard for user sync. Your identity provider acts as the single source of truth for every worker and team group. The target app acts as the service provider that receives updates about those users and groups. When you set up the link, the identity provider sends web requests to the target app. These requests follow a strict format to create, read, update, or turn off user profiles.

First, an admin assigns a person or a whole group to an app in the directory. The scim idp then sends a web message to check if that account already exists. If the account is missing, the provider sends a create request with the user email and role. When someone moves to a new team, the provider sends an update to change their group. When a worker leaves the company, the provider sends a request to turn off their account. This automated loop removes the need to manage accounts by hand across dozens of tools.

Why directory sync is not enough for data safety

Directory sync solves the headache of creating and deleting accounts across your software stack. It makes sure former staff cannot log in after you turn off their central profile. It also maps team groups to basic app roles without manual work from your IT staff. This setup works well for standard web apps where roles match daily tasks.

Yet directory sync only decides who gets an account and what static role they hold. It has zero visibility into what an engineer or script actually runs after logging in. Once a user has a database role, that role stays active for every single session. A developer with a broad role can run a bad delete command or read full tables. Static group sync cannot inspect live queries or block risky commands before they hit the database. It also cannot rewrite sensitive fields like emails, phone numbers, card numbers, or national IDs in results.

IdP: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Managing group roles without over-permissioning

Many teams try to fix this gap by creating dozens of tiny groups in their directory. They build separate groups for read-only users, table writers, and schema admins for every single database. Soon, the identity provider holds hundreds of complex groups that nobody wants to maintain. Managers start approving any group request just to unblock their engineers during busy sprints.

A better pattern separates basic account sync from live session control and query checks. Let your directory handle basic user creation and clean up old accounts when people leave. Then, control actual database commands and data visibility at the session level when queries run. This keeps your directory clean while protecting live data from broad roles and human mistakes.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

What is the difference between SAML and a scim idp setup?

SAML handles the actual log in step by checking user identity when someone opens an app. SCIM runs in the background to create, update, and deactivate user accounts and groups ahead of time.

Does disabling a user in the directory stop their active database sessions?

Turning off a user sends a signal to deactivate their profile in the target app. Still, open database sessions or local keys often stay active until the token expires or someone drops the session.

Can SCIM sync fine-grained table permissions into a database?

No, the protocol only shares basic user details and group names with the target system. You still have to map those group names to local roles and permissions inside the database itself.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.