Identity Provider vs Service Provider

Published
Length
3 min read

Luis Felipe Dias

All posts

In the identity provider vs service provider model, the identity provider checks who a user is. The service provider is the actual app or tool that the user wants to open. Teams use both roles together to run single sign-on across their company tools. You pick an identity provider to store user accounts, and you set up service providers to trust those login checks. How the identity provider vs service provider flow works An identity provider, or IdP, holds your central directory of users, pa

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

In the identity provider vs service provider model, the identity provider checks who a user is. The service provider is the actual app or tool that the user wants to open.

Teams use both roles together to run single sign-on across their company tools. You pick an identity provider to store user accounts, and you set up service providers to trust those login checks.

How the identity provider vs service provider flow works

An identity provider, or IdP, holds your central directory of users, passwords, and groups. It runs the login screen and checks multi-factor tokens when someone tries to sign in. Once the user passes these checks, the IdP creates a signed digital note.

A service provider, or SP, is any software tool, cloud dashboard, or internal app your team uses. The SP does not store passwords or check multi-factor codes on its own. Instead, it reads the signed note from the IdP to let the user in.

Standards like SAML and OIDC help these two systems talk to each other over the web. A user can start a login at the SP, which sends them to the IdP to sign in. Or a user can click an app icon inside the IdP dashboard to jump straight into the SP.

Core roles in an engineering stack

Your IdP acts as the single source of truth for employment status and group membership. When a new engineer joins the team, admins create one account in the IdP. When someone leaves the company, disabling that single IdP account stops new logins everywhere.

Service providers care about what a user can do inside that specific app. After the IdP confirms the user identity, the SP maps their group attributes to local app roles. For example, the SP might read a group tag and grant admin rights for a project.

Identity Provider Integration: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

This split keeps password rules and security checks in one central place. App builders do not need to write custom login code for every new internal tool. They just link the new tool as an SP and trust the company IdP.

Tradeoffs and limits of login handshakes

The handshake between an IdP and an SP only happens at the front door. Once the SP accepts the login token, the IdP steps out of the picture. The IdP cannot see what the engineer actually does inside the session after signing in.

Also, many backend systems like databases, servers, and command-line tools do not act as full web service providers. Teams often share static keys or long-lived passwords to reach these backend systems. A standard IdP login check cannot stop a bad database query or hide sensitive data in results.

To close this gap, teams pair their IdP setup with deeper session controls at the action level. While the IdP proves who the user is, runtime controls check every command or query they run. Data masking can also rewrite matched fields like emails, phone numbers, card numbers, or national IDs in results.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Can one system be both an identity provider and a service provider?

Yes, many modern cloud platforms can act as both at the same time. A platform might check logins for your apps while using another IdP for its own admin console.

Which system controls what a user can do after logging in?

The service provider controls the actions a user can take inside the app. The IdP can send group names during login, but the SP enforces the local app rules.

What happens to active sessions if an identity provider goes down?

Users who are already logged into a service provider usually keep their active sessions until they expire. New users cannot log in until the identity provider comes back online.

The query runs. The emails stay hidden.