Home / Knowledge hub / SAML
Knowledge hub
SAML
An older XML standard for single sign-on between a company and its apps.
What it means
SAML, the Security Assertion Markup Language, is an XML standard for single sign-on. A company's identity provider proves who a person is, and your app, the service provider, accepts that proof. SAML 2.0 is the version in use. Most business customers expect it.
The proof is an assertion: an XML document saying who the person is and when and for whom it was issued, signed by the identity provider. The browser carries it from one side to the other. Your app must check the signature, the issuer, the audience and the time window before it trusts it.
Why it matters
Business customers often ask for SAML before they buy, so it is a sales feature as well as a security one. A mistake in your side of the integration is serious, because the sign-in decision is entirely in the assertion. If you accept a forged or altered one, an attacker gets into any account they choose.
SAML has a long record of parsing and signature problems, because XML signatures are complex. Most come from custom code or an old library, not from the standard itself. Using a maintained library and keeping it patched removes most of the risk.
How it shows up
You meet SAML in the enterprise tier of a product, set up by an administrator who pastes in a metadata file or certificate. Per customer, your app stores the identity provider's signing certificate and the entity IDs. Each tenant must be tied to its own provider.
Mistakes to check: the signature is verified on part of the document but the app reads a different part, signature checks that can be skipped by removing them, no check of the audience or expiry, assertions that can be replayed, and one tenant's assertion accepted for another. See [[saml-signature-wrapping]] for the first of these.
Questions people ask
SAML, answered
Is SAML the same as OAuth?
No. SAML is about proving who someone is for sign-in. OAuth is about delegated access to resources. OpenID Connect adds sign-in on top of OAuth and is the newer alternative.
Why do enterprises still ask for SAML?
Their identity systems and procurement checklists were built around it, and it works. Many ask for it by name even where OpenID Connect would do.
What is an identity provider?
It is the system that holds the user accounts and signs people in, such as a company's directory service. Your app trusts it to say who the person is.
What should we validate in an assertion?
The signature against the stored certificate, the issuer, the audience (your app), the validity times, and that it has not been used before. Reject any assertion that fails one check.
How do we test our SAML setup?
Try altered, unsigned and replayed assertions, and an assertion meant for another tenant. Use the identity provider's test tools, then confirm that your app rejects each case.
Sources
Where this comes from
Related
Terms that sit next to this one
Single sign-on
One company identity for many applications, granted and removed in one place.
SAML signature wrapping
Moving a signed SAML assertion so the app reads attacker-chosen content instead.
OpenID Connect
A sign-in layer on top of OAuth that tells your app who the user is.
Identity provider (IdP)
The service that signs people in and tells your app who they are.
SSO misconfiguration
A single sign-on setup that trusts the wrong issuer or accepts the wrong audience.
Does your app check the assertion?
We test single sign-on paths for forged, replayed and cross-tenant sign-ins, and report what we actually got through, with the request and response. Ask us to run it on one of your applications.
Or start with a $199 pilot on one application: thirty days, success criteria agreed before day one, credited against the annual if you convert.