Inferensys

Glossary

Security Assertion Markup Language (SAML)

SAML is an open XML-based standard for exchanging authentication and authorization data between an identity provider (IdP) and a service provider (SP) to enable web-based single sign-on (SSO).
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
FEDERATED IDENTITY STANDARD

What is Security Assertion Markup Language (SAML)?

Security Assertion Markup Language (SAML) is an open, XML-based standard for exchanging authentication and authorization data between an identity provider (IdP) and a service provider (SP), enabling web-based single sign-on (SSO).

Security Assertion Markup Language (SAML) is an OASIS-standardized framework that enables identity federation and single sign-on (SSO) across separate security domains. It uses XML-based assertions—packages of security information—to communicate that a user has been authenticated by an Identity Provider (IdP). A Service Provider (SP), such as a cloud application, trusts these assertions to grant access without requiring its own login prompt, centralizing authentication logic and credential management.

The core SAML protocol defines a request-response flow, typically over HTTP, where the SP initiates a login request via a SAML AuthnRequest. The IdP responds with a SAML Response containing a signed SAML assertion with authentication, attribute, and authorization decision statements. This decoupled architecture is foundational for enterprise SSO, enabling users to access multiple applications with one set of corporate credentials. It is a key component in permission and scope management, as the IdP's assertions define user identity and attributes that the SP uses for local authorization decisions.

DECODING THE SECURITY TOKEN

Core Components of a SAML Assertion

A SAML assertion is an XML-based security token containing authentication, authorization, and attribute statements. It is the core data package exchanged between an Identity Provider (IdP) and a Service Provider (SP) to enable federated single sign-on (SSO).

01

Issuer and Subject

The Issuer element uniquely identifies the Identity Provider (IdP) that created and digitally signed the assertion, typically a URI. The Subject element identifies the principal (user or service) the assertion is about.

  • Subject Confirmation: Specifies how the subject was authenticated (e.g., bearer token, holder-of-key) and may include conditions like a time window for validity.
  • NameID: A common format within the Subject, containing the user's identifier (e.g., email, persistent ID) in a specified format (urn:oasis:names:tc:SAML:2.0:nameid-format:email).
02

Conditions

The Conditions element defines the validity constraints for the entire assertion. If any condition is not met, the Service Provider (SP) must reject the assertion.

Key conditions include:

  • NotBefore & NotOnOrAfter: Define the exact time window during which the assertion is valid.
  • Audience Restriction: Limits the assertion's consumption to specific, intended Service Providers (SPs) by listing their URIs. This prevents token replay attacks.
  • OneTimeUse: An optional directive stating the assertion must be used immediately and cannot be used again.
03

Authentication Statement

The Authentication Statement (<saml:AuthnStatement>) provides proof that the subject was authenticated by the IdP at a specific time and using a specific method.

  • AuthnInstant: The UTC timestamp of the authentication event.
  • SessionIndex: An optional identifier for the user's session at the IdP, useful for single logout (SLO) scenarios.
  • AuthnContext: Specifies the authentication context, detailing the method used (e.g., urn:oasis:names:tc:SAML:2.0:ac:classes:Password, urn:oasis:names:tc:SAML:2.0:ac:classes:X509, or urn:oasis:names:tc:SAML:2.0:ac:classes:Kerberos). This allows SPs to enforce policy-based access based on authentication strength.
04

Attribute Statement

The Attribute Statement (<saml:AttributeStatement>) carries specific claims about the subject in the form of name-value pairs. This is the primary mechanism for user provisioning and passing authorization data.

  • Attributes are defined by a Name (a URI) and contain one or more string values.
  • Common examples include email, firstName, lastName, department, group, or role.
  • The SP uses these attributes to personalize the user experience, make access control decisions (e.g., via Role-Based Access Control), or populate local user profiles.
05

Authorization Decision Statement

The Authorization Decision Statement (<saml:AuthzDecisionStatement>) is a legacy component where the IdP makes a direct access control decision for a specific resource. It answers whether the subject is permitted to perform a given action (e.g., Read, Write, Execute) on a specified resource (identified by a URI).

  • Important Note: This statement type is rarely used in modern SAML 2.0 SSO implementations. Authorization is typically delegated to the SP, which uses the attributes from the Attribute Statement to make its own, context-aware decisions. Its presence indicates a more centralized, older authorization model.
06

Digital Signature

A digital signature, applied using XML Signature (XMLSig), is a critical security component. It is typically applied over the entire assertion to ensure its integrity, authenticity, and non-repudiation.

  • Integrity: Guarantees the assertion has not been tampered with in transit.
  • Authenticity: Verifies the assertion originated from the trusted IdP.
  • The signature is validated by the SP using the IdP's public certificate. The assertion is rejected if the signature is invalid or missing (unless an alternative transport-level security like TLS is mutually agreed upon).
PERMISSION AND SCOPE MANAGEMENT

Frequently Asked Questions

Security Assertion Markup Language (SAML) is a foundational protocol for federated identity and single sign-on (SSO). These questions address its core mechanisms, integration patterns, and role in modern permission management for AI and software systems.

Security Assertion Markup Language (SAML) is an open, XML-based standard for exchanging authentication and authorization data between a trusted Identity Provider (IdP) and a Service Provider (SP) to enable web-based single sign-on (SSO). It works through a request-response protocol where a user attempting to access a service (the SP) is redirected to their IdP (like Okta or Azure AD) for authentication. Upon successful login, the IdP generates a cryptographically signed SAML assertion containing claims about the user (e.g., name, email, group memberships) and sends this back to the SP. The SP validates the assertion's signature and issuer, then uses the contained claims to create a local session and make authorization decisions, granting access without requiring a separate password.

Key components of the flow:

  • SAML Assertion: The XML security token containing user attributes.
  • Identity Provider (IdP): Authenticates the user and issues assertions.
  • Service Provider (SP): Relies on the IdP's assertion to grant access.
  • Metadata: XML files exchanged between IdP and SP to configure endpoints and cryptographic keys.
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.