SAML and federation
Trust across organizations
Federation lets a relying application accept identity evidence from a separately administered provider under an explicit trust agreement. In SAML 2.0 browser single sign-on, the identity provider (IdP) issues XML assertions and the service provider (SP) consumes them. The SP owns its own authorization policy. Federation reduces duplicate sign-ins but makes provider trust, account mapping and lifecycle coordination important.
Trust configuration
Imagine a school IdP and a separate library SP. Exchange approved metadata through an authenticated administrative process, identify entity IDs, the assertion consumer service (ACS) endpoint and trusted signing certificates. Document certificate rollover and verify metadata updates before accepting them. Trust is directional: the library accepting the school’s assertions does not imply the school accepts every library identity.
Assertion acceptance
For the SP-initiated browser profile, use a maintained SAML implementation to verify the required signatures against configured trust and consume the verified assertion. Check issuer, audience, destination and recipient as applicable, response correlation, time conditions and replay protection. A valid signature alone does not establish that an assertion belongs to this transaction or application. XML parsing and signature handling belong in vetted libraries, not handwritten string checks.
Worked lifecycle example
At the fictional library, an approved assertion identifies student-17 with a campus-reader attribute. Map this attribute to a local reader role; do not map arbitrary external group names to administrator. If the student graduates, the library must coordinate deprovisioning and terminate or limit existing sessions under its policy. A signed old attribute does not prove a current entitlement. Use a stable issuer-qualified identifier rather than assuming email is permanent.
Practice: trust decision
Consider three mock records: correct school issuer and library audience; correct issuer but payroll audience; correct audience with expired conditions. Assuming every other required check passes, only the first is eligible for acceptance. Then separately evaluate whether the account is active and has reader access. Draw a certificate rollover timeline and name the people responsible for approval and recovery. No real SAML assertion or endpoint is needed.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
SAML and federation — knowledge check
Apply federation and token validation principles to fictional scenarios.
Who issues SAML identity evidence?
What is ACS?
A validly signed assertion has a different audience. What should the SP do?
How should metadata rollover be handled?
What remains after successful federation?