Blockchain & Cryptocurrency Glossary

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • search-icon Clear Definitions
  • search-icon Practical
  • search-icon Technical
  • search-icon Related Terms

SAML (Security Assertion Markup Language)

3 min read
Pronunciation
[sam-uhl]
Analogy
Think of SAML like a universal VIP pass system for a large festival with multiple stages and restricted areas (different web services). You first go to the main festival entrance (the Identity Provider - IdP) and prove who you are. Once verified, you receive a special, digitally signed VIP wristband (the SAML assertion). Now, when you go to any stage or VIP lounge (Service Providers - SPs) within the festival, you just show your wristband. They trust the wristband because it's from the official main entrance, and they let you in without needing to check your ID again at every single point.
Definition
SAML (Security Assertion Markup Language) is an open standard, XML-based framework primarily used for exchanging authentication and authorization data between different parties, specifically between an Identity Provider (IdP) and a Service Provider (SP). Its main application is to enable Web Browser Single Sign-On (SSO), allowing users to log in once to an IdP and then access multiple separate SP web applications without needing to re-enter their credentials for each one.
Key Points Intro
SAML is a widely adopted OASIS standard for federated identity and Single Sign-On (SSO), predominantly used in enterprise environments for traditional web applications, but with emerging considerations for authenticating users to Web2 frontends of DApps or for identity federation in enterprise blockchain solutions.
Key Points

Enables Federated Identity: Allows users to use a single set of credentials, managed by a trusted Identity Provider, to access services from multiple, otherwise independent, Service Providers.

Facilitates Single Sign-On (SSO): Users authenticate once with their IdP and can then access multiple affiliated SP web applications seamlessly without repetitive logins.

XML-based Standard: Uses XML for defining 'assertions' – statements made by an IdP about a user's identity, attributes (e.g., email, roles), and authentication status.

Key Roles: Defines Identity Providers (IdPs), which authenticate users and issue SAML assertions, and Service Providers (SPs), which consume these assertions to grant access to protected resources.

Example
An employee at a large corporation logs into their company's internal employee portal (which acts as the SAML Identity Provider) using their corporate username and password. Once authenticated, they can then click links to access various third-party cloud services used by the company, such as Salesforce, Workday, or Microsoft 365 (which are configured as SAML Service Providers). They are granted access to these external services automatically without needing to log in separately to each one, because these services trust the SAML assertion provided by the corporate IdP via the employee's browser.
Technical Deep Dive
A typical SAML 2.0 Web Browser SSO flow (SP-initiated) involves several steps: 1. **User Access Request**: The user attempts to access a resource on a Service Provider (SP). 2. **SP Generates Authentication Request**: The SP crafts a SAML Authentication Request (``) and redirects the user's browser to the Identity Provider (IdP), sending this request. 3. **User Authentication at IdP**: The user authenticates with the IdP (e.g., enters username/password, MFA). 4. **IdP Issues SAML Assertion**: Upon successful authentication, the IdP generates a SAML Assertion (``), which is an XML document containing information about the user's identity, attributes, and the authentication event. This assertion is digitally signed by the IdP using its private key. 5. **Assertion Delivery to SP**: The IdP sends this assertion back to the user's browser, typically via an HTTP POST binding (within an HTML form that auto-submits) or an HTTP Redirect binding (if the assertion is small enough). 6. **SP Validates Assertion & Grants Access**: The user's browser delivers the assertion to the SP. The SP validates the assertion by checking its digital signature (using the IdP's public key), issuer, audience restrictions, conditions (like validity period), and other security elements. If valid, the SP establishes a session for the user and grants access. In a blockchain context, SAML assertions could be used to link existing enterprise identities to blockchain accounts for permissioned blockchains or to authenticate users to the Web2 interfaces of DApps, potentially mapping SAML attributes to on-chain roles or permissions via an intermediary service.
Security Warning
The security of a SAML-based SSO system relies heavily on the proper implementation and configuration by both the IdP and all SPs. Critical security considerations include: robust protection of the IdP's signing keys, secure transmission of assertions (via HTTPS), thorough validation of assertion signatures and conditions by SPs, prevention of XML processing vulnerabilities (like XXE - XML External Entity injection), and safeguards against assertion replay attacks or session hijacking. A compromised IdP can lead to widespread unauthorized access across all federated SPs.
Caveat
SAML is primarily a Web2-centric technology designed for browser-based interactions and centralized identity providers. Its direct integration with the trust models of decentralized, pseudonymous public blockchains can be challenging and may introduce centralization or compromise privacy if not architected carefully. While it can be useful for authenticating users to off-chain components of a DApp or for managing identities in enterprise/consortium blockchains, SAML itself does not manage or replace the cryptographic private keys required for signing on-chain transactions on a blockchain.

SAML (Security Assertion Markup Language) - Related Articles

No related articles for this term.