Protocol Used for SSO

Published
Length
3 min read

Luis Felipe Dias

All posts

The main protocol used for sso in modern software is either SAML or OIDC. These standards pass signed digital tokens from an identity provider to a target app. Teams usually link their directory to databases and cloud tools using broad group roles. When those group roles have wide permissions, any logged-in user can run risky commands. How the protocol used for sso works in practice Single sign-on separates the login check from the target app or database. A central identity provider holds the

Model Context Protocol (MCP) Security + Cross-Domain SSO: the complete guide

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

Free white paper. No spam. Unsubscribe anytime.

The main protocol used for sso in modern software is either SAML or OIDC. These standards pass signed digital tokens from an identity provider to a target app. Teams usually link their directory to databases and cloud tools using broad group roles. When those group roles have wide permissions, any logged-in user can run risky commands.

How the protocol used for sso works in practice

Single sign-on separates the login check from the target app or database. A central identity provider holds the user directory, passwords, and multi-factor rules. The target service trusts the identity provider to check who the user is.

SAML is an older standard that sends login data using signed XML messages. A user tries to open an app, and the app redirects to the identity provider. After the user logs in, the provider sends a signed XML assertion back. The app reads the XML, checks the digital signature, and starts a user session. Many enterprise web apps and cloud consoles rely on this XML flow.

OpenID Connect, or OIDC, builds on top of OAuth 2.0 and uses JSON tokens. It works well for web apps, mobile apps, and command-line tools. When a user logs in, the identity provider issues a signed JSON Web Token. This token contains the user identity, email, and group claims in a compact format. The target system checks the cryptographic key and maps the claims to a local role.

Older internal networks also use Kerberos to handle single sign-on across local servers. Kerberos uses a central ticket server and shared secret keys instead of browser redirects. A client gets an encrypted ticket and presents it to internal servers to log in.

Choosing the right standard for your systems

Teams pick an SSO standard based on what the target tool supports. Most cloud consoles and older enterprise apps work best with SAML. Modern APIs, command-line tools, and custom apps work better with OIDC. OIDC tokens are smaller and easier to pass in standard HTTP headers. Both standards let you enforce multi-factor checks in one central place.

Model Context Protocol (MCP) Security + Cross-Domain SSO: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To set this up, you register the target app with your identity provider. You exchange public keys and metadata URLs between the two systems. Then you map directory groups to specific roles inside the target database or server. When an engineer leaves the company, you disable their central account once. That single change stops them from logging into any linked tool.

What SSO solves and the gap it leaves open

An SSO setup solves the problem of scattered passwords and manual account cleanup. It proves who the user is at the moment they log in. It also places multi-factor prompts and device checks in one central directory.

Still, the login protocol only governs the front door of the session. Once the user gets a valid session, the SSO system steps out of the way. The target database or server then relies on the local role mapped to that group. Teams often map whole engineering groups to broad read-write or admin roles. This means a developer who logs in through OIDC can still drop a table. They can also query full tables containing raw emails, phone numbers, and card numbers. Login protocols do not inspect individual SQL queries or shell commands in flight. They cannot pause a dangerous command for peer approval or mask sensitive fields in results.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

What is the difference between SAML and OIDC?

SAML uses XML messages and works mostly for browser-based enterprise web logins. OIDC uses lightweight JSON tokens and works across web apps, APIs, and CLI tools.

Is OAuth 2.0 an SSO login protocol?

No, OAuth 2.0 is an authorization framework that grants apps permission to use APIs. OIDC adds an identity layer on top of OAuth 2.0 to verify the user.

Does single sign-on control what queries a user can run?

No, SSO only checks identity at login and passes group claims to the target tool. The target tool or an inline control layer must enforce query and command rules.

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.