1 Authentication vs Federation
Authentication proves identity. Federation lets one organisation or security domain rely on authentication performed somewhere else entirely:
Company A employee
↓
Company A Identity Provider
↓
SAML/OIDC federation
↓
Company B application
Company B doesn't necessarily maintain a separate password for the user — it trusts Company A's identity provider instead. Federation is extremely common in SaaS, B2B portals, partner access, contractor access, and cloud environments.
SAML (Security Assertion Markup Language) has been the workhorse of enterprise federation and Single Sign-On for two decades, and remains extremely common in large organisations, even as OpenID Connect (Lesson 3) takes over for newer web and mobile applications.
2 SAML Authentication Flow
A simplified service-provider-initiated SAML flow:
1–3: the SP redirects the user to the IdP to authenticate. 4: the IdP returns a signed SAML assertion. 5: the SP validates it and creates a session.
User → Service Provider → Redirect to IdP
→ Identity Provider authenticates user
→ SAML Response (signed SAML Assertion) → Service Provider
→ Service Provider validates assertion → Session created
3 SAML Assertions & Metadata
SAML assertions
An assertion can carry information such as user identity, email, name, groups, roles, authentication time, and authentication method. SAML typically uses XML, and its security depends heavily on correct handling of digital signatures, certificates, audience restrictions, recipient validation, assertion lifetime, and XML processing — a lot of surface area for something to go subtly wrong.
SAML metadata
SAML integrations exchange metadata containing entity IDs, SSO endpoints, certificates, and binding information. Large companies frequently maintain hundreds or thousands of federation relationships — which makes certificate expiration a real operational concern. A certificate change that isn't coordinated between the IdP and SP can break SSO for an entire application, sometimes for every employee at once.
4 SAML vs OpenID Connect
Both provide federated authentication. A simplified enterprise comparison:
| SAML | OpenID Connect |
|---|---|
| XML based | JSON/HTTP oriented |
| Older enterprise federation technology | Modern web/mobile identity technology |
| Common in enterprise SaaS | Common in modern applications and APIs |
| Uses assertions | Uses ID tokens |
| Strong legacy enterprise presence | Strong modern development presence |
Neither technology is simply "good" or "bad" — the important question is whether it's implemented securely and appropriately for the application in front of you.
Lab Lab – Inspect a SAML Flow
Using a lab identity provider and service provider (several vendors offer free developer/trial tiers that support SAML), walk through a login and locate: Service Provider, Identity Provider, SAML Request, SAML Response, SAML Assertion, user attributes, and certificate.
🔮 Find these in the assertion
Issuer, Audience, NameID, authentication time, and the signing certificate.
Reveal the point of the exercise
The goal isn't to memorise XML syntax — it's to understand the trust relationship: the SP is trusting a signed statement from the IdP that says "this user authenticated, here's who they are." Everything else in the exercise (issuer, audience, NameID, signature) exists to make that trust verifiable rather than blind.
Lesson Outcome
You should now be able to explain the SP/IdP relationship, walk through a SAML login flow, describe what a SAML assertion and SAML metadata contain, and compare SAML against OpenID Connect. Lesson 5 moves from federated web SSO to the authentication protocols running inside the corporate network itself: Kerberos, NTLM, and LDAP.