Security Assertion Markup Language (SAML)
Security Assertion Markup Language (SAML) is a protocol of XML-based request and response messages for exchanging security information, expressed as assertions about subjects, between online partners. It is used to pass authentication and authorization data from identity providers to service providers.
Updated
Overview
SAML standardizes how credentials are represented, in an XML format called assertions, which lets separate applications interoperate. One of its most common uses is browser-based single sign-on, where SAML passes an authenticated user into applications so that they can defer authentication to a central identity solution.
NIST SP 800-63C lists the SAML assertion format, alongside the OpenID Connect ID token, as an example of the assertions used in federation, and requires the relying party to validate each assertion from the identity provider. In the SAML Web SSO profile, the assertion is presented in the front channel, through the user's browser, which exposes it to parties other than the identity provider and the relying party. In the artifact binding, it is presented in the back channel. A SAML assertion can be encrypted with XML Encryption.
CISA and NSA guidance warns that SAML needs specific implementation and hardening measures to be a secure SSO option, because it is prone to exploits when not implemented correctly. OWASP describes XML signature wrapping attacks against SAML implementations and recommends schema validation of every SAML document before any security use, along with secure validation of the digital signature.
Forged SAML tokens let an adversary authenticate across services that use SAML 2.0 for SSO. MITRE ATT&CK tracks this as technique T1606.002. An adversary who holds a valid token-signing certificate can forge tokens with any permissions claims and lifetimes, and the forged tokens may bypass multi-factor authentication. The identity provider's token-signing certificate and its private keys are therefore high-value assets to protect.
Similar Terms
2 termsOAuth
SAML exchanges authentication and authorization data between identity providers and service providers, mostly for browser-based SSO. OAuth 2.0 is designed only for authorization, granting one application access to the data and features of another. OpenID Connect adds login on top of OAuth 2.0 and was created to address some of the flaws in SAML.
SSO
SSO is the capability of using one sign-in across many applications. SAML is one of the protocols SSO services use, alongside OpenID Connect. CISA and NSA guidance describes the OpenID Connect authorization code flow as a better choice than SAML for security, because codes are exchanged for tokens on back channels.
Frequently Asked Questions
What does SAML stand for?→
SAML stands for Security Assertion Markup Language.
What is a SAML assertion?→
A SAML assertion is a statement in XML format that carries security information about a subject, such as the result of authentication or authorization, from an identity provider to the service provider that relies on it. The relying party must validate the assertion before trusting it.
Is SAML still used?→
Yes. OpenID Connect was created to address some of the flaws in SAML, but CISA and NSA guidance states that SAML is still a relevant option for SSO and that developers still need to support it in modern environments.
Related
Sources
- NIST CSRC Glossary: Security Assertion Markup Language
- CISA and NSA: Identity and Access Management, Recommended Best Practices for Administrators
- NIST SP 800-63C-4: Digital Identity Guidelines, Federation and Assertions
- OWASP Cheat Sheet Series: SAML Security
- MITRE ATT&CK: Forge Web Credentials, SAML Tokens (T1606.002)
Definitions follow the government and standards body sources listed above. This site is not affiliated with the agencies or organizations cited.