Install Ubisecure SSO
You can find instructions on how to install Ubisecure SSO in Installation - SSO.
Install Java Runtime Environment
Obtain BankID related certificates
As discussed in Swedish BankID Mobile - SSO before acting as a BankID Relying Party one has to obtain the CA root certificate for communicating with the BankID service provider and the client authentication certificate.
SSO BankID Authentication Adapter
The Swedish BankID authentication adapter is a standalone application which is deployed alongside Ubisecure SSO. It can be deployed to the same or different server. Currently, it is suggested that the application is deployed into the same server with Ubisecure SSO. Download the JAR file and on Linux for example, place it under
or alternatively, on Windows
The application is a Spring Boot application and is bundled with a web server. Therefore it runs out of the box without additional components. The application has two forms of configuration parameters
- Common server related configuration properties
- Application specific configuration properties
The application can be configured as described in Spring Boot, Externalized configuration. I.e. you can either use properties files or YAML files, YAML being the preferred option.
Common configuration properties
When deploying the application, in addition to Spring Boot common configuration properties, the following properties can be used to configure the application
|string||no||8082||Shorthand to |
Securing HTTP connections
Although the application is currently deployed to the same node as Ubisecure SSO, it is suggested to secure the application using HTTPS in order to avoid leaking of sensitive information. This is especially suggested step that allows moving adapters to different servers than Ubisecure SSO. You can refer to Spring Boot Server SSL configuration instructions for more details.
Application configuration properties
The following configuration properties can be set using the configuration prefix:
Remember to create trust and key stores
Before running the application, make sure you have generated the relevant trust and key stores storing the relevant keys and configured the relevant properties to point to these files.
ubisecure.sso.oidc.trust-store.pathfor OIDC client certificates
ubisecure.sso.bankid.sweden.key-store.pathfor BankID service provider related certificates
|integer||no||5||The polling interval returned to the client, i.e. Ubisecure SSO|
|integer||no||600||The number of seconds when requests expire|
|string||no||The base URL to the BankID service provider API. This URL is defined in the BankID Relying Party Guidelines|
|string array||no||1.2.722.214.171.124||The BankID certificate policy requirements. Defaults to Mobile BankID app only. See BankID Relying Party Guidelines for more details|
|string||yes||The issuer of the ID token granted by the service|
|string||yes||The alias of the ID token signing key-pair in the key store|
|string||yes||The password of the ID token signing key-pair|
|string||no||sso-bankid||The issuer of |
|string||no||(random uuid)||The id of the key used to sign |
|string||yes||The path to the key store where BankID key entries reside|
|string||yes||The password of the key store|
|string||no||PKCS12||The type of the key store|
|string||yes||The alias of the BankID client authentication key in the store|
|string||yes||The password of the BankID client authentication private key|
|string||yes||The alias of the BankID server certificate|
Note that these parameters can be also supplied via the command line. See Spring Boot, Externalized configuration for more details.
In order to secure the application from unauthorized clients, client authentication is based on OpenID Connect Core chapter 9, Client authentication. Both, the
/token endpoints are secured. Currently, only
private_key_jwt method is supported.
OpenID Connect clients are configured using application properties with the following prefix
The following configuration properties for clients can be used:
|string||yes||The path to the key store where client public key certificate entries reside|
|string||no||PKCS12||The type of the client key store|
|string||yes||The password of the key store|
|object array||yes||An array of client objects. Each client having its own entry|
The aliases of client specific public key certificates stored in the key store denoted by
key-aliases for Ubisecure SSO
As of Ubisecure SSO 8.4.1 the
clients[n].key-aliases entry has to match to the
kid published by SSO in its JWKS metadata response. See OAuth 2.0 and OpenID Connect Metadata for more details.
Example configuration using external directory
As documented in Spring Boot External Configuration guide, one easy way to configure the application is to store a file in a directory named
config which is located in the same directory with the application executable. So, as an example one could have a following structure:
application.yml could contain something like:
The application can be deployed and executed as a standalone executable as defined in Installing Spring Boot applications.
The application package includes the default Spring Boot launch script which means that on Unix based systems, you can run the application as an executable
On Windows, please refer to the Spring Boot installation instructions linked above.
The application exposes the following endpoints
|yes||OpenID Connect CIBA backchannel authentication endpoint|
|yes||OpenID Connect token endpoint with additional CIBA parameters|
|no||OpenID Provider configuration metadata endpoint|
|no||Exposes JWKs provided by the service|
|no||Swagger 2.0 schema of the API|
|no||Swagger UI to explore the API|
|no||For health checks. This only checks that the application is up and running. No external requests are made. Health check of the BankID provider is not included|
|no||For application version information|
Refer to this chapter for detailed information how to troubleshoot the application.
Enabling debug logs
In case of more detailed debugging is needed, it is possible to enable debug level logs using the following configuration
pattern is optional and is just to tidy the output a bit.
Configuring Ubisecure SSO to use Swedish BankID
See Ubisecure Backchannel Authentication Adapter for more details on how to configure Swedish BankID as an external authentication method to Ubisecure SSO.
Obtaining OpenID Connect Provider metadata for SSO Backchannel Authentication Adapter method configuration
The BankID service application exposes OpenID Connect Provider metadata in two forms
- Well-known OpenID Connect Provider configuration
- JWKS used to sign granted ID tokens
Assuming that the application is deployed to localhost for Ubisecure SSO to access, the endpoints can be accessed as follows:
|OpenID Connect Provider metadata|
|ID Token signing keys and issuer metadata|
An example OpenID Connect Provider metadata response:
An example JWKS response: