Bookmarks

SAML — SAML protocol

Security Assertion Markup Language

An OASIS standard for exchanging authentication data between an identity provider and an application: XML messages through the browser.

Also: SAML 2.0

checked 9 Nov

All terms

SAML is a family of OASIS specifications that organisations use to connect a corporate sign-in system to external services: an employee authenticates once against the company directory, and mail, CRM and cloud consoles accept them without a separate password.

What it consists of

Two parties take part in the exchange. The identity provider (IdP) verifies the user and signs assertions; the service provider (SP) is an application that trusts the IdP and opens a session on the IdP’s word. The data is carried in XML, and the standard describes each layer:

  • Assertion — a signed XML document from the IdP: that the user has signed in (authentication), which attributes they have, and whether an operation may be allowed (authorization).
  • Binding — how the message is physically carried: HTTP Redirect (a URL parameter), HTTP POST (a hidden form field), HTTP Artifact (only a reference to the assertion), SOAP.
  • Metadata — each party’s XML with endpoints, certificates and supported bindings; the parties use it to establish trust in each other.
  • Profile — a ready-made scenario; the main one is Web Browser SSO, single sign-on through the browser.

What sign-in looks like

The user opens an application (the SP), and the SP redirects them to the IdP with an authentication request, AuthnRequest; sign-in can also start from the IdP. The IdP verifies the user — password, MFA — and returns the browser to the SP with a signed response, usually through an auto-submitting POST form. The SP checks the signature with the certificate from the metadata and the assertion conditions — the validity window (NotBefore, NotOnOrAfter) and the recipient (Audience) — and only then opens a session. While the IdP session lasts, signing in to the next service takes a single redirect.

Where it is used

The current version is SAML 2.0, approved by OASIS in March 2005; identity providers and enterprise applications support it. New mobile and single-page applications more often choose OAuth 2.0 and OpenID Connect, while SAML remains the working standard wherever federation with a corporate directory is already in place.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • OAuth 2.0

    OAuth 2.0 grants delegated access to resources in the form of tokens and on its own does not reveal who the user is; SAML conveys precisely the fact of sign-in and the attributes.

  • OIDCOpenID Connect

    OpenID Connect solves the same task as SAML but on top of OAuth 2.0 and over JSON with JWT — it is more convenient for mobile and SPA applications.

In depth in the references

where the topic is covered in detail