Configure custom keystores for authentication protocols¶
By default, WSO2 Identity Server uses the private key and certificate from the primary keystore in all authentication flows such as,
- Signing JWT tokens in OAuth authentication flows
- Verifying JWT tokens signed by WSO2 identity server
- Signing SAML assertions in SAML authentication flows
WSO2 Identity Server also allows configuring separate keystores for each authentication protocol.
This document provides step-by-step instructions to configure a custom keystore for a specific authentication protocol. You can define multiple custom keystores and assign each to a different protocol as needed.
Note
Currently only the following authentication protocols are supported,
- OAuth 2.0
- WS-Federation
- WS-Trust (Needs to be added via the WS-Trust connector)
- SAML
Configure custom keystore for OAuth, WS-Trust or WS-Federation¶
- Locate your custom key store file in
<IS_HOME>/repository/resources/security/directory. -
Add the following configuration to
deployment.tomlfile.Configuration parameters,
Configuration Details file_nameKey store file name. passwordKey Store password. typeKey Store Type. aliasAlias value of the private key. key_passwordPrivate key password. -
Map the Custom KeyStore to Authentication Protocols
This configuration maps the custom key stores configured above to different authentication protocols. As of now, the following authentication protocols are supported,
Note
When configuring a custom keystore for WS-Trust, ensure that you reapply the security policy defined in the Security Token Service (STS) configurations. This step is necessary for the custom keystore to function correctly with the applied security policy.
Configuration parameters,
Configuration Details Default Value keystore_file_nameThe file name of the custom keystore. (Should exactly match the file namegiven in the previous configuration)(Required) use_in_all_tenantsDecide whether this configuration will apply to all tenants or the super tenant only. false
Configure custom keystore for SAML¶
- Locate your custom key store file in
<IS_HOME>/repository/resources/security/directory. -
Add the following configuration to
deployment.tomlfile.Configuration parameters,
Configuration Details file_nameKey store file name. passwordKey Store password. typeKey Store Type. aliasAlias value of the private key. key_passwordPrivate key password.