Federated Services
Table of Contents
An architecture that allows users to authenticate once with a trusted identity provider and access multiple services across organisational or domain boundaries without re-authenticating. The identity provider (IdP) asserts who the user is; the service provider (SP) trusts that assertion rather than managing its own user database.
Related: Identity Provider IAM MFA OAuth 2.0 JSON Web Tokens Kerberos
Key Concepts
| Term | Meaning |
|---|---|
| Identity Provider (IdP) | Authenticates users and issues tokens/assertions |
| Service Provider (SP) | Relies on the IdP's assertion to grant access |
| Single Sign-On (SSO) | One login grants access to multiple connected services |
| Federation | Trust relationship between IdP and SP across org boundaries |
| Claim | An attribute about the user included in the token (name, role, email) |
Protocols
SAML 2.0 — Security Assertion Markup Language
XML-based federation protocol. Dominant in enterprise SSO for web applications. The IdP issues a digitally signed XML assertion; the browser relays it to the SP.
Flow (SP-initiated): 1. User visits SP (e.g. Salesforce) 2. SP redirects to IdP with a SAML AuthnRequest 3. User authenticates at the IdP 4. IdP issues SAML Response (signed XML assertion) 5. Browser POSTs the assertion to the SP's Assertion Consumer Service 6. SP validates signature → grants access Common IdPs for SAML: Okta, Azure AD/Entra ID, ADFS, Ping Identity
OAuth 2.0
Authorisation framework — not authentication. Allows a third party to access resources on behalf of a user without exposing credentials. See OAuth 2.0 for full detail.
Core grant types: — Authorization Code: web apps — most secure — PKCE: mobile/SPA — Authorization Code without client secret — Client Credentials: machine-to-machine, no user involved — Implicit: deprecated — avoid
OpenID Connect (OIDC)
Authentication layer built on top of OAuth 2.0. Adds an ID Token (JWT) containing user identity claims. Solves the gap OAuth 2.0 leaves — OAuth tells you what a user can do, OIDC tells you who the user is.
Flow: 1. Client sends authorization request with scope=openid 2. User authenticates at the IdP 3. IdP returns Authorization Code 4. Client exchanges code for: Access Token + ID Token (JWT) 5. Client reads ID Token for user identity (sub, email, name) 6. Client uses Access Token to call APIs
Kerberos
Network authentication protocol used in Active Directory environments. Ticket-based — the KDC (Key Distribution Centre) issues tickets rather than sharing passwords across the network. See Kerberos for full detail.
Flow: 1. Client authenticates to KDC → receives Ticket Granting Ticket (TGT) 2. Client presents TGT → receives Service Ticket for specific resource 3. Client presents Service Ticket to resource → access granted Passwords never travel the network — only encrypted tickets
Common Enterprise Patterns
Microsoft environment (Entra ID / Azure AD)
Modern Microsoft identity uses OIDC and OAuth 2.0 via Entra ID. Legacy on-premises uses Kerberos/NTLM via Active Directory and ADFS for SAML federation.
On-premises only: Active Directory → Kerberos/NTLM Hybrid: AD + Entra ID → AD Connect syncs identities Cloud only: Entra ID → OIDC/OAuth 2.0/SAML External federation: Entra ID ↔ third-party IdP via SAML/OIDC
SCIM — Cross-Domain Identity Management
Protocol for automating user provisioning between systems. When a user is created in the IdP, SCIM pushes that identity to all connected SPs — keeps accounts in sync without manual management.
Security Relevance
Trust transitive issues
If an SP trusts an IdP and the IdP is compromised, all connected SPs are compromised. Federation amplifies the blast radius of an identity compromise.
SAML vulnerabilities
Common SAML attack patterns: — XML signature wrapping: move the signed element to bypass validation without invalidating the signature — Replay attacks: reuse a captured SAML assertion within its validity window — Unsigned assertions: SP fails to verify the signature on the assertion — XML injection in assertion attributes
OAuth / OIDC misconfigurations
Common issues: — Redirect URI not strictly validated → open redirect → token theft — State parameter absent → CSRF against the auth flow — Implicit flow in use → tokens exposed in URL/browser history — Client secret leaked in frontend code (SPAs, mobile) — Overly broad scope grants
See Insecure Authentication Mechanism for exam classification.
Tips
- SAML is XML-based and dominant in legacy enterprise; OIDC/OAuth is JSON/JWT-based and dominant in modern cloud and mobile
- OpenID Connect is built on OAuth 2.0 — OIDC = identity (who you are), OAuth 2.0 = authorisation (what you can do)
- Kerberos is the authentication backbone of Active Directory — understanding it is prerequisite to understanding AD attacks
- In a pentest, SAML signature verification flaws and OAuth redirect URI mismatches are the highest-impact findings