Vol. I · No. 46The protocol sectionSat, 10 Oct 2026
Layer 7 · Authentication · single sign-on, by signed XML

SAML

Security Assertion Markup Language

SAML is enterprise single sign-on, done in XML. An application redirects the browser to the company’s identity provider, which authenticates the user and posts back a digitally signed assertion — the browser carries the proof, and no password ever reaches the application.

SAML lets one identity provider vouch for a user to many applications — the assertion is signed XML, carried by the browser.

Answers
Authentication
and attributes
Format
Signed XML
not JSON
Binding
HTTP POST
via the browser
Version
2.0
since 2005

How it works

The browser carries a signed assertion between two parties
The application
service provider — “who are you?”
The browser
redirected, carrying the request
The user has no session, so the SP sends them to the IdP to prove themselves…
Identity provider
Authenticates the user — password, MFA, whatever the company requires
Assertion
Builds a signed XML statement: this subject, these attributes, valid until…
HTTP POST
The browser posts it back to the SP’s Assertion Consumer Service URL
Signature verified
against the IdP’s known certificate
Session created
the user is logged in

The two servers may never talk to each other: the browser is the courier. Trust rests entirely on the IdP’s signing certificate being known to the SP in advance — exchanged once, in metadata.

The main points

What SAML does, step by step

1
Hit the application

With no session, the SP builds an AuthnRequest and redirects the browser to the identity provider.

2
Authenticate centrally

The IdP checks the user however the organisation requires — and reuses its own session if there is one.

3
Sign an assertion

It builds an XML assertion naming the subject and attributes, signs it, and posts it back through the browser.

4
Verify and admit

The SP checks the signature, audience, conditions and timestamps, then creates a local session.

The vocabulary
IdP — identity provider — vouches
SP — service provider — the app
Assertion — the signed statement
Metadata — certificates and endpoints, exchanged
SP-initiated — start at the app
IdP-initiated — start at the portal

In cybersecurity

SAML’s security is entirely a matter of validating the XML signature correctly — and XML signature validation has been a rich source of critical bugs for twenty years.

Signature wrapping

XSW attacks move the signed element so a parser validates one part and reads another.

Canonicalisation bugs

Comment injection has repeatedly let attackers change the asserted username past a valid signature.

Check the audience

An assertion minted for another SP must be rejected, however genuine its signature.

Enforce conditions

NotBefore, NotOnOrAfter and single-use IDs are what stop an old assertion being replayed.

Certificate expiry

IdP signing certificates expire and take every integration down at once — track and rotate them.

IdP-initiated is riskier

An unsolicited assertion has no request to correlate with; prefer SP-initiated flows.

Rides in the stack

TLSHTTPSAML

Carried by browser redirects and form posts — the identity provider and the application need no direct connection.

Works with

OIDCOAuth 2.0

SAML or OIDC?

SAMLOIDC
FormatSigned XMLSigned JWT
Built forWeb appsApps and APIs
MobileAwkwardNative
Still usedWidely, in enterpriseEverywhere new