Understand how SAML enables Single Sign-On (SSO) for enterprises by allowing users to authenticate through a centralized identity provider (IdP).
SAML (Security Assertion Markup Language) is an XML-based open standard used for Single Sign-On (SSO) across multiple domains. It allows users to log in once using a central Identity Provider (IdP) and gain access to multiple applications (Service Providers or SPs) without re-entering credentials.
| Feature | SAML | OpenID Connect (OIDC) |
|---|---|---|
| Protocol Type | XML | JSON + REST (OAuth 2.0) |
| Popular Use Case | Enterprise SSO | Web/mobile app login |
| Transport Mechanism | Browser redirects (POST/Redirect) | JSON over HTTPS |
| Token Type | SAML Assertion (XML) | ID Token (JWT) |
| Complexity | Higher | Lower |
| Modern Usage | Decreasing | Increasing |
✅ Use SAML for enterprise SSO, OIDC for modern apps and APIs.
A SAML Assertion is an XML document issued by the IdP containing identity and authorization data. It’s digitally signed and optionally encrypted.
<Subject> – The user being authenticated<AttributeStatement> – User info (e.g., email, role)<Conditions> – Expiration time, audience restrictions<AuthnStatement> – Details about the login (e.g., timestamp)Example (simplified):
<saml:Assertion>
<saml:Subject>
<saml:NameID>jane@esadax.com</saml:NameID>
</saml:Subject>
<saml:AttributeStatement>
<saml:Attribute Name="email">
<saml:AttributeValue>jane@esadax.com</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="role">
<saml:AttributeValue>admin</saml:AttributeValue>
</saml:Attribute>
</saml:AttributeStatement>
</saml:Assertion>
Register your app with the Identity Provider (IdP).
Configure Metadata Exchange:
Configure Assertion Consumer Service (ACS):
Handle the SAML Response:
NotBefore, NotOnOrAfter)Invalid Signature?
SAML Response Not Parsed?
Incorrect Audience?
User Not Found?