The key ideas
Single sign-on (SSO)
Authenticate once and get access to many applications without signing in again.
Federation
Separate organisations or services agree to trust one another's identities, e.g. "Sign in with Google" or a supplier signing in with their own company account.
Identity provider (IdP)
The system that authenticates you and vouches for you: Microsoft Entra ID, Okta, Google, Active Directory.
Service provider / relying party
The application that trusts the IdP's assertion instead of checking your password itself.
| Protocol | Typical use | Token format |
|---|---|---|
| Kerberos | Windows domains and Active Directory, on the internal network. | Encrypted tickets |
| SAML 2.0 | Enterprise SSO to web apps (Salesforce, ServiceNow, HR systems). | Signed XML assertions |
| OAuth 2.0 | Authorisation: letting one app access another on your behalf ("allow this app to read your calendar"). | Access tokens (often JWTs) |
| OpenID Connect (OIDC) | Authentication built on OAuth 2.0: "Sign in with Google/Microsoft/Apple", modern SSO and mobile apps. | ID token (always a JWT) |
Kerberos
Named after the three-headed dog of Greek myth, Kerberos involves three parties: you, the Key Distribution Centre (KDC, which in Windows is every domain controller) and the service you want. Your password never crosses the network; instead you collect tickets.
SAML 2.0
SAML uses your browser to carry a digitally signed XML assertion from the IdP to the application. The app and IdP never talk directly; they trust each other because of certificates exchanged in advance.
OAuth 2.0 and OpenID Connect
OAuth 2.0 answers "may this app access that resource?". OpenID Connect adds "and who is the user?" by issuing an ID token. Modern apps use the authorisation code flow with PKCE, which proves the app that started the sign-in is the one finishing it.
Inside a token: JSON Web Tokens
A JWT is three Base64url-encoded parts separated by dots: a header, a payload of "claims", and a signature. Anyone can read a JWT. It's signed, not encrypted, so the signature is what stops it being changed.
Header
Payload (edit me)
This demo token is signed with HMAC-SHA256 and the secret cybertrainer-demo. Real identity providers sign with RS256 or ES256 private keys and publish the public keys for apps to verify with. Try changing "role": "user" to "admin".