Setting up a one-time password policy as MFA in Keycloak

As a Server Administrator, you can set up a one-time password (OTP) authentication policy in Keycloak as part of the multi-factor authentication (MFA) to validate the authenticity of the users when they sign in or log into HCL OneTest Server.

Before you begin

You must have completed the following tasks:

About this task

Keycloak provides an OTP policy that can be enabled and configured in Keycloak for the installed instance of HCL OneTest Server. You can refer to the Keycloak documentation about the OTP policies.

Procedure

  1. Log in to HCL OneTest Server, if you are not already logged in.
  2. Open Keycloak by entering /auth in the Address bar after the URL of your server instance, and then press the Enter key.

    For example, if the URL of the server instance is https://<myserver.mycompany.com>, add /auth after the URL as in https://<myserver.mycompany.com>/auth

    The Keycloak dashboard is displayed.Image of the Keycloak dashboard.
  3. Click Administration Console.
  4. Log into the Keycloak administration console by using the default username as keycloak and the password generated for you by Keycloak, if prompted.

    The Keycloak console is displayed.

  5. Change the realm to testserver, if it is not already in this realm.
    The testserver realm dashboard is displayed.Image of the testserver realm dashboard.
  6. Click Authentication in the navigation pane.

    The Authentication page is displayed.

  7. Click the Policies tab, and then click the OTP Policy tab.
    The OTP Policy configuration settings are displayed.Image of the OTP policy settings.
  8. Read the description provided for each of the fields by clicking Image of the help icon. and decide the values that you want to set for each of the fields, which are different from the default values listed.

    You can save the changed configuration or use the default configuration without making any changes.

Results

You configured the settings or retained the default settings for an OTP policy in Keycloak.

What to do next

You must enable the OTP policy in Keycloak as the default option for authentication. See Enabling the one-time password policy as the default MFA action in Keycloak.