User Experience
R24 AMR | Min(s) read

Enabling SSO between Keycloak and Transact Explorer

Transact Explorer is integrated with Keycloak for Single Sign-On (SSO), which also supports user externalisation. You can configure a user in the external system instead of configuring them in Transact, enabling Transact Explorer to support both Transact and Non-Transact user configurations. For a Transact user, you need to set the Pre-authenticated attribute in the USER application in Transact.

If the user needs to externalise, enable the user externalisation attribute in Transact during deployment.

Interested in knowing more about the externalisation attributes, read our Externalising Configurable Properties guide.

This guide provides detailed steps to configure Keycloak, TB-server, and Transact Explorer to enable the SSO feature.

Configuring Keycloak Server

To configure the Keycloak server, ensure that you have access to the Keycloak admin console.

Adding a Realm

To add a Realm,

  1. Log in to Keycloak admin console using the default credentials.
  2. Enter the necessary details and create a realm named ‘transact’ (or create it with any name but make sure it is used in all other places in the below sections appropriately).

  3. After creating the realm, go to the Keys tab and note down the Public Key text for the RS256 algorithm.
  4. You have now successfully added a Realm.

Adding Client

To add a client to the created realm,

  1. On the left-navigation pane, select Transact > Clients.
  2. On the Clients pane, click Create. The Add Client page appears.
  3. Enter the following details and click Save:
    • Client ID as TransactExplorer.
    • Client Protocol as openid-connect.

  4. You have successfully created the Transact Explorer client.

  5. On the TransactExplorer page, navigate to the Settings tab, enter the details (shown in the screenshot), and click Save.
  6. Navigate to the Mappers tab to create a new mapper with ‘t24son’ as a user attribute.
  7. You have successfully created the Transact Explorer client and added the user attribute.

Adding Users

To add users in Keycloak,

  1. On the left-navigation pane, select Users. The User pane appears.
  2. Click Add user to create new users.

  3. In the Author page, enter the username and first name, and Click Save.
  4. Edit the user and go to the Attributes tab to add the t24son attribute. T24son name should be same as the sign-on name of the USER applications in Transact.
  5. After saving the changes, the Credentials tab appears.

  6. Navigate to the Credentials tab and set the password for the user. Keep the Temporary toggle ON to enable the user to reset the password on first login.

  7. Navigate to the Role Mappings tab and add all the Available Roles into Assigned Roles.
  8. You have now successfully created a user, added the attribute, and assigned necessary roles to the user.

Customising Login Page

You can customize the theme of the login page. The themes directory is located in /keycloak-6.0.1/themes/. You can make a copy of the existing theme and edit it based on the branding changes.

The branding logo is available in the /keycloak-6.0.1/themes/TemenosKeycloak/login/resources/img/ location.

Configuring API war (tb-server.war)

Transact Browser uses IRIS framework internally to connect with Transact. Configuration of JWT is almost same as IRIS framework.

Configuring UI war (transact-explorer-wa.war)

Configuring the transact-explorer-wa.war file involves the below-mentioned changes in the web.xml and spring-oidc-authenticator.xml files.

Configuring Users in Transact

Transact must know that authentication is performed outside Transact, that is in IDP or Web service layer, so that Transact does not perform the usual credential validation for the user. You need to set the PREAUTHENTICATED attribute for the user in Transact. The T24son user attribute set to Keycloak users should match with the Sign-On name in Transact.

Transact Sign-On name is obtained from the claim in JWT token and the claim is configurable under the User Principal Configuration section.

Verifying Keycloak Integration

To verify the Keycloak integration,

  1. Launch http://localhost:9089/transact-explorer-wa. The Keycloak realm login page appears.
  2. Enter the credentials of the user created in the Keycloak server.
  3. After successful login, Transact Explorer home page for the AUTHOR user whose sign-on name is the Keycloak login user appears. Refer to the Configuring Users in Transact section for more information.

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 27, 2024 2:04:40 PM IST