Introduction
Security Assertion Markup Language 2.0 (SAML 2.0) is a version of the SAML standard for exchanging authentication and authorization identities between security domains. SAML 2.0 is an XML-based protocol that uses security tokens containing assertions to pass information about a principal (usually an end-user) between a SAML authority, named an Identity Provider, and a SAML consumer. The assertions are digitally signed and can be verified with the public key and certificate of the SAML authority. The SAML Authorizer allows having the authorization server separate from the signing application and provides eIDAS compliant authentication and authorization to signing and validation workers using multi-factor authentication (MFA).
Use case example
There are several authorization servers available and this implementation has been tested with Cryptomathic Authenticator. The following use case example outlines authenticating with Cryptomathic Authenticator (as the SAML authority) to obtain a signed SAML Response, then used in the request sent from the client to the signing component (the SAML consumer). The client in the following overview could, for example, be an Enterprise application communicating with a document management system.
Authentication and authorization flow
SAML 2.0
- Users and applicationsService consumer
Request a service and authenticate.
- Enterprise applicationClient / signing backend
Coordinates authentication and the service request.
- SAML authorityAuthorization server / identity provider
Authenticates the user and issues a signed SAML Response.
- Signing componentResource server
Validates the response and assertion attributes, then signs or validates.
Trust setup
The worker in the signing component is configured to trust the SAML authority server’s certificate and its public key. Authorization rules matching assertion attributes from the signed SAML Response are also configured.
Select a step to follow its path. Read every step below.
Complete step reference
Distribute the SAML authority certificateTrust setup
SAML authority → Signing component
The worker in the signing component is configured to trust the SAML authority server’s certificate and its public key. Authorization rules matching assertion attributes from the signed SAML Response are also configured.
Request signing or validation
Users and applications → Enterprise application
The user requests signing or validation services from the Enterprise application.
Request authentication
Enterprise application → SAML authority
The Enterprise application requests authentication from the SAML authority, providing details about the user’s authentication domain.
Provide authentication context
SAML authority → Enterprise application
The SAML authority provides the authentication context for the user to the Enterprise application.
Forward authentication context
Enterprise application → Users and applications
The Enterprise application forwards the authentication context to the user. The user uses this context to authenticate to the SAML authority’s service.
Authenticate the user
Users and applications → SAML authority
The user authenticates using credentials with the Authentication server / Identity provider. When MFA is enabled, there may be multiple rounds in the authentication process.
Produce signed SAML Response
SAML authority → Users and applications
Upon successful authentication, the user receives the signed SAML Response from the SAML authority. The response also contains an AudienceRestriction element to specify the target system for use of the SAML Response.
Forward signed SAML Response
Users and applications → Enterprise application
The user forwards the signed SAML Response to the Enterprise application as proof of successful authentication and authorization for the signing or validation request.
Submit signing or validation request
Enterprise application → Signing component
The Enterprise application submits the request with the signed SAML Response to the signing component.
Perform the task and provide a response
Signing component → Enterprise application
The signing component validates the signed SAML Response and its assertion attributes, performs the operation and provides a response to the Enterprise application.
Return the response
Enterprise application → Users and applications
The Enterprise application forwards the signing component’s response to the user.