SAML Architecture and Components
You'll learn how SAML enables federated authentication through its three-part architecture of identity providers, service providers, and assertions.
What is SAML?
SAML (Security Assertion Markup Language) is an XML-based standard for federated authentication — letting users sign into multiple services with one set of credentials managed elsewhere. Think of it like using your work badge (managed by your company) to access both your office building and the gym next door. Your company vouches for your identity to both places.
The Three Core Components
Identity Provider (IdP)
The "authentication authority" that verifies who you are. When you log in to Google or Okta, they act as IdPs. The IdP:
- Authenticates users (checks credentials)
- Issues security assertions about authenticated users
- Example: Your company's single sign-on system
Service Provider (SP)
The application you're trying to access (like Salesforce or Slack). The SP:
- Trusts the IdP to authenticate users
- Accepts assertions from the IdP
- Grants access based on those assertions
SAML Assertion
The XML document the IdP sends to the SP, containing claims about the authenticated user. It includes:
- Authentication statement: "User X logged in at time Y"
- Attribute statement: User details (email, name, role)
- Authorization statement: What the user can access
- Digital signature to prevent tampering
How They Work Together
You request access → SP redirects you to IdP → IdP authenticates you → IdP creates signed assertion → Assertion sent to SP → SP validates signature and grants access. One login, many services.
Key Takeaway: SAML federated authentication relies on three components: the Identity Provider that authenticates users, the Service Provider that trusts those authentications, and digitally-signed assertions that securely communicate user identity and attributes between them.