Protocol practice · Guide
Which protocol?
Start from what you're trying to do. Each answer says why, and links to the lab where you run it, one message at a time.
What are you trying to do?
- Let people sign in to your appOpenID ConnectYour app learns who signed in, from an ID token it checks itself. It’s built on OAuth, so the same flow can also get an access token for your API.Practice OpenID Connect
- Give staff single sign-on to company appsSAML, or OpenID ConnectMost enterprise SaaS apps accept SAML; newer ones often prefer OpenID Connect. Use what the app supports, and OpenID Connect when it supports both.Practice SAML
- Let an app act for a userOAuth 2.0The user grants a limited access token, like “read my calendar”, and the app never sees their password. On its own, OAuth doesn’t say who the user is.Practice OAuth
- Create and remove accounts in other appsSCIM 2.0The standard API your identity platform calls when people join, move and leave, so access follows the person. It doesn’t sign anyone in.Practice SCIM
- Sign in on a Windows domainKerberosOne sign-in to the domain, then tickets for file shares and other services. It’s how Active Directory signs people in on the network.Practice Kerberos
- Stop passwords being phishedPasskeys (WebAuthn)A key pair per site: the device signs a fresh challenge after a fingerprint, face or PIN, and the site checks it with a public key. The browser won’t use it on a lookalike site.Practice passkeys
- Run customer sign-in on a platformA hosted identity platform MembersWhere the protocols meet real settings: callbacks, audiences, claims and refresh tokens. The lab uses Auth0.Practice Auth0
- Sign in on a TV or a command lineThe device code flow MembersThe device shows a short code; the person approves on their phone, and the device polls for tokens. Allow it only where it’s needed: it’s a phishing favorite.Practice the device code flow
- Call another API as the userToken exchange MembersTrade the user’s token for one meant for the next service, naming yourself as the actor and asking for less. Forwarding the original token is the classic mistake.Practice token exchange
- Give a pipeline cloud access without a keyWorkload identity federation MembersThe pipeline’s own short-lived token is swapped for cloud credentials that expire. The lab uses GitHub Actions and AWS.Practice workload federation
- End sessions in every app at onceShared Signals (CAEP) MembersThe identity provider pushes a signed event when a session ends, and each app ends its own. No waiting for an eight-hour session to run out.Practice Shared Signals
- Decide whether an API should believe a tokenJWT validation MembersCheck the type, fix the algorithm yourself, verify the signature with the issuer’s published keys, then the issuer, audience and time. Most token bugs are a check that was skipped.Practice JWT validation
- Give admins rights only when they need themJust-in-time access MembersAdmins are eligible, not active: they switch a role on for a few hours, with a fresh sign-in, a reason and an approval. The lab uses Microsoft Entra PIM.Practice just-in-time admin
- Give one app to several kinds of peopleEntitlement management MembersOne access package, with a policy for each way in: automatic by department, a request with approval for everyone else, and a separate one for partners. The lab uses Microsoft Entra.Practice entitlement management
- Give contractors access that endsAccess packages and reviews MembersA package bundles the groups, apps and sites, with who may ask, who approves and when it ends. A recurring review takes back what the end date didn’t. The lab uses Microsoft Entra.Practice access reviews
- Prove who sent an email, or keep it privateS/MIME MembersThe sender’s private key signs; the recipient checks it against a certificate that chains to a CA they trust. To encrypt, you need the recipient’s certificate first. The warm-up lab, MIME, shows how the message is built.Practice S/MIME
- Decide what a sign-in needsConditional Access MembersPolicies that look at who is signing in and how, then require a stronger method or block it. Start them in report-only. The lab uses Microsoft Entra.Practice Conditional Access
Often confused
- OAuth or OpenID Connect?OAuth answers “what may this app do?”. OpenID Connect adds “who signed in?”. Treating an OAuth access token as proof of sign-in is one of the classic mistakes: use the ID token.Practice OAuthPractice OpenID Connect
- SAML or OpenID Connect?Both give single sign-on. SAML posts signed XML through the browser and is everywhere in enterprise SaaS. OpenID Connect uses JSON tokens and also suits mobile apps and APIs. New build: OpenID Connect. Existing app: whatever it supports.Practice SAMLPractice OpenID Connect
- Passkeys or OpenID Connect?They work at different hops. A passkey proves it’s you to the site or identity provider you sign in to. OpenID Connect then tells other apps who signed in. Most companies want both: passkeys at the provider, federation to everything else.Practice Passkeys (WebAuthn)Practice OpenID Connect
- SCIM or sign-in?SAML and OpenID Connect sign people in. SCIM makes sure their account exists, is right, and is switched off when they leave. Most apps need both, because sign-in alone leaves accounts behind.Practice SCIMPractice SAML
They work together
A typical company app uses three of them at once.
Identity provideryour company’s directory
The appSaaS, or your ownThe app’s accountscreated, changed, switched off
Access: an OAuth tokenAn APIcalendar, files, dataSide by side
| Protocol | Answers | Hands over | Travels | Usual home |
|---|---|---|---|---|
| OAuth 2.0 | What may this app do? | An access token | Browser redirects, then server to server | APIs, third-party apps |
| OpenID Connect | Who signed in? | An ID token (a JWT) | Like OAuth | Web and mobile sign-in |
| SAML 2.0 | Who signed in? | A signed XML assertion | Through the browser | Enterprise single sign-on to SaaS |
| SCIM 2.0 | Does the account exist, and is it right? | REST calls in JSON | Server to server | Provisioning |
| Kerberos | Who is this, on the network? | Tickets | Client to the domain controller, then to services | Windows domains, on-premises |
| Passkeys (WebAuthn) | How did they prove it? | A signature, checked with a public key | Browser to the device, then to the site | Passwordless sign-in |
| Device code (RFC 8628) | Who is this, on a device with no browser? | Access and refresh tokens | Device to the server; approval on a phone | TVs, command-line tools |
| Token exchange (RFC 8693) | May this service act for the user? | A new token, with an act claim | Server to server | API chains, gateways, agents |
| Workload identity federation | Which workload is this? | Temporary cloud credentials | Server to server | Pipelines, cross-cloud workloads |
| Shared Signals (SSF, CAEP) | Is this session still good? | Signed security events | Server to server, pushed | Ending sessions across apps |
| JWT validation (RFC 9068) | Should this API believe this token? | Accept, or invalid_token | Inside the API | Every API that takes JWTs |
| Just-in-time admin | Who is an admin right now? | A time-limited role | Through the identity platform | Admin roles, privileged access |
| Conditional Access | What does this sign-in need? | Grant, require more, or block | Through the identity platform | Every sign-in to the tenant |
| Entitlement management | How does each kind of person get it? | An access package assignment | Through the identity platform | Apps several teams need |
| Access packages and reviews | Should they still have it? | An assignment, with an end | Through the identity platform | Contractors, guests, projects |
| MIME (RFC 2045 to 2049) | What’s in this message, and where? | Typed parts, split by boundaries | Inside the email | Every email with more than plain text |
| S/MIME (RFC 8551) | Who sent this email, and who can read it? | A signature, or an encrypted body | Inside the email, end to end | Regulated mail: legal, health, government |
Not here yet: services calling APIs with no user (OAuth client credentials, workload identity federation). They're in Coming later on the practice page.