Security Controls & Protection

SSO, SAML, OAuth 2.0 and OpenID Connect

four acronyms people mix up, finally sorted out

2 min readupdated by Syed Khaleel Ahmed

These terms appear together constantly, but they do different jobs. A short way to remember: SSO is the goal, SAML and OIDC are ways of proving who someone is, and OAuth 2.0 is about granting limited access.

Single sign-on (SSO)

You sign in once with a central identity provider (IdP), and then reach many applications (the service providers, or relying parties) without signing in again. Benefits: fewer passwords, one place to enforce MFA, one place to switch off a leaver. Risk: the IdP becomes a high-value target, so protect it heavily.

SAML 2.0

An older, XML-based standard widely used for enterprise and workforce SSO. The IdP sends the application a digitally signed assertion saying who the user is and some attributes. It is common for business apps accessed through a browser.

OAuth 2.0

OAuth is a framework for delegated authorization: it lets an application get limited access to a resource on a user's behalf without ever seeing their password.[1] Example: you let a calendar app read your contacts. The app receives an access token with specific scopes (permissions) and a limited lifetime. OAuth by itself says nothing about who the user is.

OpenID Connect (OIDC)

OIDC is a thin identity layer on top of OAuth 2.0. It adds an ID token (usually a JSON Web Token) that tells the application who signed in.[2] It is the usual choice for modern web and mobile sign-in ("Sign in with ...").

At a glance

Main purpose Format
SAML Sign-in (authentication) for enterprise apps XML assertions
OAuth 2.0 Delegated access (authorization) Access tokens
OIDC Sign-in, built on OAuth 2.0 ID tokens (JWT)

Security points

  • Use the authorization code flow with PKCE for browser and mobile apps. The older implicit flow is discouraged.
  • Validate tokens properly: signature, issuer, audience, expiry.
  • Keep access tokens short-lived and protect refresh tokens.
  • Restrict redirect URIs to exact, registered values.
  • Request the minimum scopes.
  • Treat tokens like passwords: never log them or put them in URLs.

Sources

  1. IETF RFC 6749: The OAuth 2.0 Authorization Framework
  2. OpenID Connect Core 1.0

Test yourself

My notes

Private — saved only on this device, never sent anywhere.