Skip to main content

SAML 2.0 Integration

Security Assertion Markup Language (SAML) is an XML-based standard used for federated identity and enterprise single sign-on.

Zanthem Identity Services may provide SAML 2.0 integration for applications requiring SAML-based authentication.

SAML integration must be established with your assigned account manager before implementation.

SAML Terminology​

TermDescription
Identity Provider (IdP)Service responsible for authenticating users and issuing identity assertions.
Service Provider (SP)Application that consumes identity assertions.
Entity IDIdentifier representing an IdP or SP.
AssertionXML document containing identity and authentication information.
Assertion Consumer Service (ACS)Application endpoint that receives SAML responses.
NameIDIdentifier representing the authenticated subject.
MetadataXML configuration describing SAML endpoints and certificates.
Single Logout (SLO)Protocol used to coordinate authentication session termination.

Integration Architecture​

When Zanthem Identity Services operates as the identity provider, your application operates as the service provider.

User
|
v
Client Application (SP)
|
| SAML authentication request
v
Zanthem Identity Services (IdP)
|
| User authentication
|
| SAML response
v
Assertion Consumer Service
|
| Assertion validation
v
Authenticated Application Session

Your application is responsible for validating the received SAML response and establishing its local session.

Required Application Information​

Provide your account manager with the following information when requesting a SAML integration.

ConfigurationDescription
Application nameDisplay name of the integrated application.
SP Entity IDUnique identifier for the service provider.
ACS URLEndpoint that receives authentication responses.
SP metadataService provider metadata XML or metadata URL, where available.
Logout URLService provider logout endpoint, where applicable.
NameID requirementsRequired subject identifier format.
Attribute requirementsIdentity attributes required by the application.
Signing requirementsRequired request, response, and assertion signature behavior.
Encryption requirementsAssertion encryption requirements, where applicable.
Binding requirementsSupported SAML transport bindings.

Additional configuration may be required depending on the application.

Identity Provider Configuration​

Once the application has been provisioned, your account manager will provide the applicable identity provider configuration.

This may include:

  • Identity provider Entity ID
  • Identity provider metadata
  • Single sign-on service URL
  • Single logout service URL
  • Public signing certificates
  • Supported bindings
  • Required signature configuration
  • Configured attribute mappings

Use the actual values provided by your account manager.

Identity Provider Metadata​

The assigned realm's SAML identity provider metadata is generally available at:

https://auth.zanthem.cloud/realms/{realm}/protocol/saml/descriptor

Example​

https://auth.zanthem.cloud/realms/example-company/protocol/saml/descriptor

Metadata provides information required to configure compatible SAML service providers.

Where supported, import the approved identity provider metadata into your application's SAML configuration.

Verify metadata authenticity through the approved onboarding process.

SAML Service Endpoint​

The standard realm SAML protocol endpoint is:

https://auth.zanthem.cloud/realms/{realm}/protocol/saml

Applications should obtain the supported service endpoints and bindings from the supplied identity provider metadata.

Do not assume that every binding or logout operation is enabled for every application.

Example Configuration​

The following configuration is illustrative.

ConfigurationExample Value
SP Entity IDhttps://app.example.com/saml/metadata
ACS URLhttps://app.example.com/saml/acs
SP Logout URLhttps://app.example.com/saml/logout
IdP Entity IDhttps://auth.zanthem.cloud/realms/example-company
IdP SSO URLhttps://auth.zanthem.cloud/realms/example-company/protocol/saml
IdP Metadata URLhttps://auth.zanthem.cloud/realms/example-company/protocol/saml/descriptor

Actual Entity IDs, endpoint URLs, certificates, and binding requirements must be obtained from your assigned configuration and metadata.

Service Provider Initiated Authentication​

Service Provider initiated authentication begins within the client application.

The standard process consists of:

  1. The user requests a protected application resource.
  2. The service provider creates a SAML authentication request.
  3. The user is redirected or posted to the identity provider.
  4. The user completes authentication.
  5. The identity provider generates a SAML response.
  6. The response is delivered to the approved ACS endpoint.
  7. The service provider validates the response and assertion.
  8. The application establishes a local authenticated session.

Service Provider initiated authentication is recommended for application integrations where supported.

Identity Provider Initiated Authentication​

Some applications may support authentication initiated directly from the identity provider.

Identity Provider initiated authentication must be explicitly evaluated and configured for the application.

Because an unsolicited response may not be associated with a previously generated authentication request, additional security considerations apply.

Applications must not disable normal response validation to accommodate an unsupported authentication flow.

SAML Bindings​

SAML bindings determine how authentication messages are transported between the service provider and identity provider.

Common bindings include:

BindingDescription
HTTP RedirectTransports supported SAML messages through browser redirects.
HTTP POSTTransports supported SAML messages through HTML form submissions.

Use the bindings specified in the assigned configuration and identity provider metadata.

Assertion Consumer Service​

The Assertion Consumer Service is the application endpoint responsible for receiving SAML authentication responses.

For example:

https://app.example.com/saml/acs

The ACS endpoint must be approved and registered before use.

Production ACS endpoints must use HTTPS.

Applications must reject responses that are not intended for their configured service provider.

NameID Configuration​

The NameID identifies the authenticated subject within a SAML assertion.

Supported NameID formats may include:

  • Persistent identifiers
  • Transient identifiers
  • Email address identifiers
  • Other approved subject identifier formats

For applications requiring persistent user identity mapping, a stable persistent identifier or another approved immutable identity attribute is recommended.

Transient identifiers are not suitable for permanent user account mapping.

Email addresses may change and should not ordinarily be used as permanent identity identifiers.

Attribute Mapping​

SAML assertions may contain additional identity attributes associated with the authenticated user.

Examples include:

AttributeDescription
emailUser email address.
given_nameUser first or given name.
family_nameUser last or family name.
usernameUser account name.
organizationOrganization information, where configured.

Attribute names and formats depend on the assigned SAML configuration.

Applications must communicate their required attributes during onboarding.

The example attributes are not guaranteed to be present in every SAML assertion.

Assertion Validation​

Applications must use a maintained SAML library to validate authentication responses and assertions.

Validation requirements include, where applicable:

  • Trusted identity provider issuer
  • Required XML signatures
  • Trusted signing certificates
  • Expected service provider audience
  • Expected destination and recipient
  • Assertion validity period
  • Authentication request correlation
  • Subject confirmation
  • Response status
  • Replay protection
  • Expected assertion structure

Applications must enforce the signature requirements established during onboarding.

Only validated, signed identity information should be used to establish an authenticated session.

:::warning XML signature security

SAML responses must not be processed using custom XML parsing logic alone.

Use a maintained SAML implementation that protects against signature wrapping, assertion replay, unsafe XML processing, and other protocol-specific attacks.

Never disable signature validation to resolve integration problems.

:::

Signing Certificates​

Zanthem will provide the public signing certificates or trusted metadata required to validate SAML messages.

Public certificates are not confidential credentials.

Signing certificates may be updated or rotated as required by the authentication service.

Applications should support coordinated certificate updates without disabling signature verification.

Contact your account manager to establish certificate rotation requirements.

Assertion Encryption​

Some integrations may require encrypted SAML assertions.

Where supported, the service provider supplies its approved public encryption certificate.

The corresponding private key must remain within the service provider's trusted environment.

Encryption does not replace signature verification or other assertion validation requirements.

Single Logout​

SAML Single Logout may be configured where supported by the integrated application.

Applications must properly invalidate their own local sessions when processing an approved logout request or response.

Complete logout across multiple applications depends on the capabilities and configuration of participating applications.

Do not assume that terminating one application session automatically terminates every associated session.

Common SAML Integration Issues​

IssuePossible Cause
Invalid audienceIncorrect service provider Entity ID.
Invalid destinationIncorrect ACS endpoint configuration.
Signature verification failureIncorrect or outdated trusted signing certificate.
Assertion expiredExpired authentication response or system clock differences.
Missing attributesRequired attribute mappings are not configured.
Authentication response rejectedRequest correlation or response validation failure.
Logout failureIncompatible or incomplete logout configuration.

Contact your account manager if the issue requires changes to the assigned authentication service.

Integration Validation​

Before production use, confirm that:

  • The correct identity provider metadata is configured.
  • The service provider Entity ID is correct.
  • The approved ACS endpoint is configured.
  • Required signatures are validated.
  • Assertion audiences and recipients are validated.
  • Authentication requests and responses are correlated.
  • Replay protection is implemented.
  • Required attributes are available.
  • Application authorization is enforced.
  • Session expiration is handled correctly.
  • Logout behavior has been tested.
  • Certificate rotation procedures are established.