Scim for Service Accounts

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up scim for service accounts by linking your identity tool to target apps. The identity tool then creates, updates, and deletes machine profiles over standard web requests. Most teams treat these machine profiles like human users inside a central directory. When teams assign broad roles during this sync, one leaked key risks every linked app. How scim for service accounts works in practice The SCIM protocol moves identity records between a central directory and downstream cloud apps.

Service-to-Service Authentication: the complete guide

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

Free white paper. No spam. Unsubscribe anytime.

You set up scim for service accounts by linking your identity tool to target apps. The identity tool then creates, updates, and deletes machine profiles over standard web requests. Most teams treat these machine profiles like human users inside a central directory. When teams assign broad roles during this sync, one leaked key risks every linked app.

How scim for service accounts works in practice

The SCIM protocol moves identity records between a central directory and downstream cloud apps. It uses standard REST calls and JSON payloads to keep account lists in sync. Admins first create a dedicated group for non-human identities inside the central identity tool. They then build a custom profile or user record for each automated script or job.

Next, the team links the identity tool to the target app using an API token. The identity tool sends a create request when you add a bot to the group. The downstream app reads that payload and builds a matching local machine account. You can also map group names to specific role permissions inside the target app.

When a project ends, you remove the machine profile from the central directory group. The identity tool sends a delete or disable call to the target app right away. This central flow removes the need to open five different admin consoles during offboarding.

What directory sync solves and what it misses

Directory sync solves account sprawl across your cloud tools and internal databases. Security teams get one place to see which bots exist and which apps they touch. When an engineer leaves, you can spot and shut down the bots they built. It also stops orphaned accounts from sitting active in old apps for years.

Still, the base SCIM schema was built for human workers, not automated scripts. It expects fields like first name, last name, and work email for every record. Teams often fake these fields with dummy emails just to make the sync pass. More importantly, SCIM only handles account creation and static role assignment before work begins.

Service-to-Service Authentication: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

SCIM does not rotate the secret keys or tokens that the bot uses to log in. Once the account exists, the bot still needs a stored secret to run tasks. Directory sync also has zero visibility into what the machine account does after login. It cannot block a bad database query or rewrite sensitive emails and card numbers in results.

How to keep machine accounts safe after sync

Start by separating human users and machine accounts into distinct directory groups. Give each bot its own unique identity record instead of sharing one bot across teams. Map each machine group to the smallest possible role in the target app. Never put a service account into a default admin group just to save setup time.

Pair your directory sync with a clear schedule for key rotation and audit reviews. Check your directory logs every month to find machine accounts with no recent login activity. Remove inactive bots from their groups so the sync tool disables them in target apps. For high-risk databases, add runtime checks that inspect every command the bot sends.

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

Does the SCIM standard have a native schema for service accounts?

No, the core standard only defines user and group objects for human staff. Most teams use the standard user schema with custom attributes to mark machine accounts.

Does SCIM sync rotate API keys or passwords for bots?

No, SCIM only creates the account record and assigns its base group or role. You must manage and rotate API keys or client secrets through a separate workflow.

What happens when I remove a service account from a SCIM group?

The identity tool sends a request to deprovision or disable the account right away. Active sessions might keeps the session active until the target app expires the current login token.

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.