What Is the SAML 2.0 Authentication Protocol Used For?

SAML
SAML 2.0 (Security Assertion Markup Language) is an open standard based on XML (eXtensible Markup Language) that enables Single Sign-On (SSO) across multiple domains. It delegates authentication to a central identity provider, which sends each application a signed “assertion” proving the user’s identity, without requiring the user to re-enter or share their password with each application.

For an IT department, SAML 2.0 addresses a practical question: how can an employee be given access to dozens of applications with a single authentication process, while centralising authentication policies through an identity provider?

What is SAML 2.0?

This centralisation of authentication is precisely what SAML standardises. Version 2.0 of the standard was approved by OASIS (Organization for the Advancement of Structured Information Standards) in March 2005 at its highest level of ratification. It brought together three earlier initiatives: SAML 1.1, the Liberty Alliance ID-FF 1.2 profile and contributions from the Shibboleth project. It was also adopted as an international recommendation by the International Telecommunication Union (ITU-T X.1141).

Technically, the SAML protocol is based on assertions: XML security tokens that describe a user, the “principal”, and their authentication. These assertions are exchanged between two roles:

  • The Identity Provider (IdP), which authenticates the user.
  • The Service Provider (SP), which is the application the user wants to access.

More than twenty years after its ratification, SAML 2.0 is not a legacy protocol. It remains widely deployed in businesses, the public sector and academia, where it continues to provide a foundation for identity federation.

What is the SAML 2.0 protocol used for?

The main purpose of the SAML protocol is to implement cross-domain Single Sign-On. This is a significant concern for IT departments: according to a Gartner Peer Community survey conducted in 2022, improving access management was the main reason given by organisations for adopting SSO, cited by 66% of respondents. This was followed by addressing poor password practices at 56% and reducing IT support tickets at 55%.

In practice, SAML covers several use cases:

Enterprise Single Sign-On

An employee authenticates once with the identity provider and can then access all their applications (email, business tools and Software-as-a-Service (SaaS) applications) without entering their password again.

Identity federation between organisations

SAML 2.0 allows separate entities, such as partners, subsidiaries and institutions, to trust the same identity provider without duplicating user accounts.

Centralised authentication policies

The identity provider can apply common rules to federated applications, including multi-factor authentication (MFA), and log sign-ins. However, signing out of the identity provider does not necessarily close sessions that are already open in each application. This depends on whether the applications support Single Logout.

Public-sector and research federations

Major academic identity federations have historically relied on SAML, which explains the standard’s long-standing presence in these sectors.

How does SAML authentication work?

SAML authentication involves three parties: the user, the Identity Provider (IdP) and the Service Provider (SP). In the most common scenario, known as “SP-initiated” authentication, the exchange works as follows:

  1. 01

    01

    The user attempts to access an application (the SP).

  2. 02

    02

    Because there is no active session, the SP generates a SAML authentication request and redirects the browser to the IdP.

  3. 03

    03

    The IdP authenticates the user using a password, multi-factor authentication or an existing session.

  4. 04

    04

    The IdP generates a signed SAML assertion describing the user and sends it back to the SP through the browser.

  5. 05

    05

    The SP verifies the signature, validates the assertion and opens a session. Access is granted.

Trust between the IdP and the SP cannot be established automatically. It must be configured beforehand through an exchange of metadata, including certificates, endpoints and identifiers. This allows each party to verify the authenticity of the other party’s messages. The assertion’s cryptographic signature guarantees that it came from the expected identity provider and has not been altered.

Components of the SAML 2.0 standard

The SAML 2.0 standard consists of several complementary components:

  • Assertions: the statements themselves, which can contain three types of information: authentication information, attributes such as a role, department or email address, and, less commonly, an authorisation decision.
  • Protocols: the request and response messages used to carry assertions.
  • Bindings: the methods used to transport these messages over the web, for example through an HTTP redirect or an HTTP POST request.
  • Profiles: predefined combinations of components for a particular use case. The best-known example is the Web Browser SSO Profile.
  • Metadata: the technical description exchanged between the IdP and SP to establish trust.

Although SAML can carry authorisation decisions, its main uses remain Single Sign-On and attribute exchange. Fine-grained authorisation is generally handled by other mechanisms.

SAML 2.0, OAuth 2.0 and OpenID Connect: what are the differences?

These three standards are often confused, even though they do not address the same question:

  • SAML 2.0 deals with authentication and Single Sign-On. It is based on XML and is widely established in enterprise environments, cross-organisational federations and the public sector.
  • OAuth 2.0 deals with authorisation. It delegates access to a resource (for example, “Can this application read my calendar?”) and does not handle authentication on its own.
  • OpenID Connect (OIDC) adds an authentication layer to OAuth 2.0, allowing an application to establish a user’s identity, particularly through an ID token in JWT format. It is suitable for web and mobile applications, while API access relies on OAuth 2.0 access tokens.

In practice, SAML 2.0 and OpenID Connect coexist. SAML remains the standard for existing enterprise applications, while OpenID Connect is generally used for new developments. The choice between SAML, OAuth 2.0 and OpenID Connect depends on the type of application, its authentication requirements and how access to APIs must be delegated.

Implementing SAML 2.0 with Keycloak

The most common way to deploy SAML 2.0 without reimplementing the protocol is to use an Identity and Access Management (IAM) solution. Keycloak, a leading open-source solution in this field, can act as a SAML 2.0 identity provider. It also supports OpenID Connect, allowing legacy SAML applications and newer OIDC developments to share the same authentication service.

Clever Cloud offers Keycloak as a Service: a fully managed Keycloak service hosted in France and operated with the expertise of Please Open It, a partner specialising in Keycloak. This approach removes the burden of operating the identity server, including updates, availability and backups, from internal teams, while allowing them to retain control over SAML and OIDC settings.

“SAML 2.0 remains essential in enterprise environments because of its long history (2005) but also because of its network simplicity: everything passes through the user’s browser, with no direct connection required between the application and the identity server. In contrast, the modern OpenID Connect standard requires direct server-to-server communication to remain secure. OIDC’s ‘100% browser-based’ mode, the Implicit Flow, has now been abandoned because it is considered too vulnerable.”

Mathieu Passenaud
Co-founder at Please Open It

FAQ

Is SAML 2.0 still used in 2026?

Yes. Ratified in 2005, SAML 2.0 remains widely deployed in businesses, the public sector and academia for Single Sign-On and identity federation. It coexists with OpenID Connect, which is often preferred for new web and mobile projects.

What is the difference between SAML and SSO?

SSO, or Single Sign-On, is a principle: users authenticate once to access multiple applications. SAML is one of the protocols that can implement this principle across domains. OpenID Connect is another.

Does SAML handle authentication or authorisation?

It can handle both, but it is mainly used for Single Sign-On and attribute exchange. The protocol can carry authorisation decisions, although this capability is rarely used in practice.

Should I choose SAML 2.0 or OpenID Connect?

The choice primarily depends on the protocol supported by the application. SAML 2.0 is suitable for services designed to use SAML federation, while OpenID Connect is generally appropriate for authenticating users in web and mobile applications. OAuth 2.0 access tokens are used to control access to APIs. Both approaches can coexist behind the same identity provider, such as Keycloak.

Does Keycloak support SAML 2.0?

Yes. Keycloak can act as a SAML 2.0 identity provider and also supports OpenID Connect, allowing both protocols to be used together.

Blog

À lire également

What Is the SAML 2.0 Authentication Protocol Used For?

SAML 2.0 (Security Assertion Markup Language) is an open standard based on XML (eXtensible Markup Language) that enables Single Sign-On (SSO) across multiple domains. It delegates authentication to a central identity provider, which sends each application a signed “assertion” proving the user’s identity, without requiring the user to re-enter or share their password with each application.
Engineering Features

UP Programme: meet the 4 startups joining Clever Cloud’s sixth cohort

Kernel, Nijal AI, Qiplim and Arkan are joining the sixth cohort of Clever Cloud’s UP Programme.
Company

French Managed Kubernetes: What Are the Alternatives to Hyperscalers in 2026?

French managed Kubernetes services provide organisations with European alternatives to AWS EKS, Google GKE and Azure AKS. OVHcloud, Scaleway and Clever Cloud now offer such services on infrastructure located in France or elsewhere in Europe. However, choosing a French managed Kubernetes service involves more than server location: the infrastructure model, the division of operational responsibilities and integration with other cloud services are equally important.
This article compares the three offerings and outlines the key criteria for making a decision.
Engineering Features