Info |
---|
This article is valid for Smart ID 20.11 and later. |
...
This is solved by setting up a SAML 2.0 federation in Digital Access with Identity Manager as a Service Provider and an Identity Provider, such as Smart ID Digital Access component.
Prerequisites
Expand |
---|
|
Installations Identity Manager must be set up: The identity provider must be set up. If Digital Access component is used, see here:
Certificates Panel |
---|
Insert excerpt |
---|
| Create or extract certificates for SSL and SAML |
---|
| Create or extract certificates for SSL and SAML |
---|
nopanel | true |
---|
|
|
If you need instructions to create demo certificates or extract certificates to the required formats, see Create or extract certificates for SSL and SAML. |
...
Expand |
---|
title | Additional configurations for Smart ID Self-Service |
---|
|
Configure SAML in Smart ID Self-Service Smart ID Self-Service has additional configuration options directly in the program. - Multiple Self-Service instances with the same tenant, but different authentication methods, are allowed. If, for example, there are two Self-Service instances and both of them use the same tenant, one instance can use SAML whereas the other one doesn't.
- Also, you can configure a button "Sign In with Single Sign-On" on the login page instead of automatically redirecting to the Identity Provider.
SAML and automatically redirecting are enabled by default, you can change this behavior in config.json. To disable SAML for a Self-Service instance, add "enabled": false to its config.json. By default it is enabled. - To turn of automatic redirecting to the Identity Provider, add
"enforced": false to its config.json. By default it is enforced. This means that this instance of Self-Service will show a button "Sign In with Single Sign-On" on the login page. If SAML is disabled for this instance of Self-Service this property has no effect. With this option you can use Pre-Login Processes while having SAML enabled.
Code Block |
---|
language | js |
---|
title | Example: config.json |
---|
| /prime-ussp/assets/config/config.json
...
{
...
"saml": {
"enabled": true
"enforced": true
}
} |
Set up communication between Smart ID Self-Service and Identity Manager - Open the file \prime_ussp\WEB-INF\classes\application.yaml.
- Adapt the baseUrl so that it points to where the Identity Manager main client is deployed. If you use HTTPS instead of HTTP you must ensure that the SSL server certificate of Identity Manager is trusted by the java environment that runs the Smart ID Self-Service (tomcat).
- Make sure that cookie forwarding is activated, that is, that there are empty values for the property
sensitiveHeaders for the SAML routes in the configuration file.This is the default configuration.
Code Block |
---|
title | Example: application.yaml |
---|
| prime:
…
baseUrl: http://localhost:8080/idm
…
zuul:
…
routes:
…
saml:
path: /saml/**
sensitiveHeaders:
url: ${prime.baseUrl}/saml/ |
|
...
Expand |
---|
title | Install Identity Provider server certificate |
---|
|
To have a secure communication between the identity provider and Identity Manager, server certificates must be provided by each server. Example - Add server certificate in Digital Access component: - Log in to Digital Access Admin.
- Go to Manage System > Certificates.
- In Server Certificates, click Add Server Certificate…
Enter a Display Name and browse for the files, to define Certificate and Key:
Panel |
---|
title | Example: Add server certificate |
---|
| Display Name: hag.local Certificate: hag.local.pem Key: key.pem |
- Click Next > to finish the wizard.
|
Set up identity provider, for example Digital Access component
Expand |
---|
title | Import Identity Provider SAML certificate |
---|
|
Private keys are used to digitally sign SAML messages and encrypt their content. Both parties need their own key-pair that could be created in self-signed mode (for testing purpose) or received from a public key infrastructure (for productive systems). Example - Enable Digital Access to use the SAML certificate for signing:
- Log in to Digital Access Admin.
- Go to Manage System > Certificates.
- In Server Certificates, click Add Server Certificate…
Enter a Display Name and browse for the files, to define Certificate and Key: Panel |
---|
title | Example: Add SAML certificate |
---|
| Display Name: SAML IdP Signing Certificate: hag.saml.pem Key: hag.saml.key.pem |
Note |
---|
The Digital Access SAML certificate must be trusted by the Java installation that runs Identity Manager to have a secure communication between them. To allow SSL communication between Identity Manager and Smart ID Self-Service, the SSL certificate needs to be trusted as well by the Java installation. The SSL certificate can be exported from the Java Key Store with the following command: Code Block |
---|
title | Example: java keytool command |
---|
| keytool -export -keystore idm.jks -alias selfsigned -file idm.cer |
|
- Click Next > to finish the wizard.
|
...
Expand |
---|
title | Create SAML Federation |
---|
|
The identity provider must be configured to define the SAML federation with the service provider, using the metadata created in Identity Manager. Example - Add service provider in Digital Access: - Go to Manage Resource Access > SAML Federation.
- Click Add SAML Federation....
- Enter a Display Name, for example
IDENTITYMANAGER . - Check Acting as Identity Provider.
- Uncheck Import metadata automatically.
- Go to the Export tab.
- Give a unique Entity ID: for example
https://hag.local/idp . - Select the Signing Certificate, for example
SAML IdP Signing . - Go to the Role Identity Provider tab and click Add service provider...
- Verify that SAML 2.0 is checked.
- Upload SAML 2.0 metadata, click Choose file and select the file that was created before (for example IdM_saml_metadata.xml). Click Next.
- Confirm the message about the signer certificate by clicking Yes.
- Click Finish Wizard.
- Click on the created service provider, to open it.
The Display Name and Entity ID is now updated according to the metadata file.
Note |
---|
Entity ID must be unique within the federation, for example https://<idmhost>/sp. Service Provider URL is where the IdP will redirect the user after successful authentication, so this must be an exact match with the SP domain, in this case https://<idmhost>/saml/SSO Example: https://<idmhost>/saml/SSO <idmhost> must be the same as the url that was called initially. To be sure that the SAML request and response belong together, the communication must go to the same url and protocol (http or https), and both IdP and SP must be synchronized in terms of time. To set up NTP in Digital Access, see Deploy Digital Access component. |
Disable Require signed authentication request Go to the Assertion Settings tab. In Subject > Select source of subject: select E-mail. This is the unique identifier Identity Manager uses in standard cases, and will be used when Digital Access sends a SAML ticket to Identity Manager. Go to the tab Manage Access Rules. Select any suitable access rule or leave it as Any Authentication. Click Finish Wizard and then Add. Repeat the same steps to add Smart ID Self-Service as an additional service provider.
|
...
Expand |
---|
title | Download SAML metadata |
---|
|
After the service provider was configured successfully in the identity provider, the SAML metadata must be downloaded and uploaded in Identity Manager. Example - Download the metadata from Digital Access: - Go to Manage Resource Access > SAML Federation.
- Click on the created service provider, to open it.
- Go to the tab Export.
- Click Download metadata.
Upload the metadata file to the SAML Authentication Profile in Identity Manager and select the Type as METADATA. No File Properties needs to be configured for the identity provider meta-data.
Note |
---|
Make sure that the Identity Manager server and the Digital Access server have the same time configured. |
|
Upload identity provider metadata to Identity Manager
Expand |
---|
title | Upload identity provider metadata to SAML authentication profile in Identity Manager |
---|
|
After the metadata files have been created they must be uploaded to the authentication profile in Identity Manager Admin. This section describes how to upload the identity provider metadata files. - Open the SAML SSO authentication profile that was created earlier.
- Go to the SAML Configuration tab.
- Under Identity Provider Configuration, do the following:
- In Configuration File, click the upload symbol to browse for and select the metadata file that has been provided from the identity provider, for example downloaded from Digital Access.
- In Attribute Type, select either option for where the authentication information shall be communicated:
- NameID refers to the subject of a SAML response. Use an appropriate value that matches the desired field in the CoreObject.
- Attribute Statement refers to attributes associated with the subject of a SAML response.
- If Attribute Statement was selected, then also enter one or more names in Attribute Name.
Note |
---|
Make sure that the Identity Manager server and the Identity Provider server (for example Digital Access) have the same time configured. |
|
...
Additional information