💡Single Sign On

SAML SSO

SAML Single Sign-On (SSO)

SAML (Security Assertion Markup Language) is an XML-based open standard for exchanging authentication and authorization data between parties, particularly between an Identity Provider (IdP) and a Service Provider (SP). It enables Single Sign-On (SSO), allowing users to authenticate once and access multiple applications seamlessly.

Key Components of SAML

  • Identity Provider (IdP): The entity that authenticates users and issues SAML assertions. It manages user identities and credentials (e.g., Active Directory Federation Services, Okta).

  • Service Provider (SP): The application or service that relies on the IdP for authentication. It consumes SAML assertions to grant access (e.g., Salesforce, Google Workspace).

  • Subject: The user or entity being authenticated. The Subject is identified in SAML assertions via attributes like NameID or persistent identifiers.

Security Benefits of SAML

  • Reduced Password Fatigue: Users authenticate once with the IdP, minimizing password reuse and weak credentials.

  • Centralized Authentication: Enforces consistent security policies (e.g., MFA, password complexity) at the IdP level.

  • No Password Exposure to SPs: Credentials are never shared with service providers, reducing phishing risks.

  • Cryptographic Security: SAML messages are digitally signed and optionally encrypted to prevent tampering and eavesdropping.

  • Auditability: Centralized logging at the IdP simplifies monitoring and compliance.

Authentication and Authorization with SAML

  • Authentication: The IdP verifies the user’s identity and issues a SAML assertion containing authentication statements (e.g., timestamp, method used).

  • Authorization: The SP uses attributes in the SAML assertion (e.g., group membership, roles) to make access control decisions.

SAML Metadata and Information Exchange

SAML metadata is an XML document that describes the configuration of IdPs and SPs, enabling automatic trust establishment. It includes:

  • Entity ID (unique identifier for IdP/SP)

  • SSO endpoints (URLs for authentication requests)

  • Public keys for signature verification

  • Supported bindings (e.g., HTTP Redirect, POST)

During federation, IdPs and SPs exchange metadata to configure trust. This eliminates manual configuration and ensures interoperability.

SAML SSO Flows

Service Provider-Initiated SSO

  1. User attempts to access the SP.

  2. SP generates a SAML AuthnRequest and redirects the user to the IdP.

  3. IdP authenticates the user (if not already logged in).

  4. IdP generates a SAML Response containing assertions and redirects the user back to the SP.

  5. SP validates the response, extracts attributes, and grants access.

Identity Provider-Initiated SSO

  1. User logs into the IdP directly (e.g., via a portal).

  2. User selects a service from the IdP’s application dashboard.

  3. IdP generates an unsolicited SAML Response and redirects the user to the SP.

  4. SP validates the response and grants access without an AuthnRequest.

Conclusion

SAML SSO streamlines access to multiple applications while enhancing security through centralized authentication and cryptographic integrity. Understanding its components, flows, and metadata exchange is crucial for implementing robust federated identity systems.

Comments

to like and join the conversation.