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
| Term | Description |
|---|---|
| Identity Provider (IdP) | Service responsible for authenticating users and issuing identity assertions. |
| Service Provider (SP) | Application that consumes identity assertions. |
| Entity ID | Identifier representing an IdP or SP. |
| Assertion | XML document containing identity and authentication information. |
| Assertion Consumer Service (ACS) | Application endpoint that receives SAML responses. |
| NameID | Identifier representing the authenticated subject. |
| Metadata | XML 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.
| Configuration | Description |
|---|---|
| Application name | Display name of the integrated application. |
| SP Entity ID | Unique identifier for the service provider. |
| ACS URL | Endpoint that receives authentication responses. |
| SP metadata | Service provider metadata XML or metadata URL, where available. |
| Logout URL | Service provider logout endpoint, where applicable. |
| NameID requirements | Required subject identifier format. |
| Attribute requirements | Identity attributes required by the application. |
| Signing requirements | Required request, response, and assertion signature behavior. |
| Encryption requirements | Assertion encryption requirements, where applicable. |
| Binding requirements | Supported 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.
| Configuration | Example Value |
|---|---|
| SP Entity ID | https://app.example.com/saml/metadata |
| ACS URL | https://app.example.com/saml/acs |
| SP Logout URL | https://app.example.com/saml/logout |
| IdP Entity ID | https://auth.zanthem.cloud/realms/example-company |
| IdP SSO URL | https://auth.zanthem.cloud/realms/example-company/protocol/saml |
| IdP Metadata URL | https://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:
- The user requests a protected application resource.
- The service provider creates a SAML authentication request.
- The user is redirected or posted to the identity provider.
- The user completes authentication.
- The identity provider generates a SAML response.
- The response is delivered to the approved ACS endpoint.
- The service provider validates the response and assertion.
- 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:
| Binding | Description |
|---|---|
| HTTP Redirect | Transports supported SAML messages through browser redirects. |
| HTTP POST | Transports 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:
| Attribute | Description |
|---|---|
email | User email address. |
given_name | User first or given name. |
family_name | User last or family name. |
username | User account name. |
organization | Organization 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
| Issue | Possible Cause |
|---|---|
| Invalid audience | Incorrect service provider Entity ID. |
| Invalid destination | Incorrect ACS endpoint configuration. |
| Signature verification failure | Incorrect or outdated trusted signing certificate. |
| Assertion expired | Expired authentication response or system clock differences. |
| Missing attributes | Required attribute mappings are not configured. |
| Authentication response rejected | Request correlation or response validation failure. |
| Logout failure | Incompatible 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.