Configuring Security

In Clara, user authentication is managed by Keycloak.

In Keycloak, each application has its own Realm with different users and authorization settings. Clara authorization settings are stored in a Realm named Clara.

For details about Keycloak, see Keycloak documentation.

 

The steps to configure the security of your Clara installation, including the generation of a new secret, and the customization of SSL certificates, are run automatically by the installation script.

The installation script generates two Clara users:

      • userid solutions, password Hclsolutions00, with user role.

      • userid admin, password Hclsolutions00, with administrator role.

To add additional users, roles, or to change the default passwords, see the steps in Creating a new user below.

 

Creating a new user

The installation process generates a Keycloak default realm named Clara and a default client named Clara.

For additional information about Keycloak realms and clients, see Keycloak documentation.

 

Use the Keycloak administration console to define new users, new roles, or change user passwords.

 

For example, to create a new Clara user with administrator role, run the following steps:

  1. Access Keycloak administration console https://<IP:PORT>/keycloak/auth/admin by using the following credentials:

userid=admin

password=Hclsolutions00

You can also reach the Keycloak  administration console from Clara Control Panel, by clicking Manage roles in the Account icon drop-down menu on the Control Panel header.

  1.  If you want, you can change Keycloak default password:

    1. From Keycloak administrator console, in the upper right corner, click Admin:

    2. Select Manage account -> password

  1. Under Clients -> Clara -> roles tab, click the Add role button.

  2. Provide the role name admin and click save.

  3. Under users, click the add user button.

  4. Provide a user name and click save.

  5. Under Credentials, provide a password for the user, turn the temporary field to off,  click the Reset Password button and confirm.

  6. Under Role Mappings, in the Client Roles dropdown, select Clara. Some boxes appear on the right.

  7. Under  Available Roles, select admin and click the Add Selected button. The admin role appears in the Assigned Roles box.

  8. On the left navigation bar, select the Realm Settings page and go to the Themes tab.

  9. In the Login Theme parameter, select the Keycloak theme, then click save.

 

Customizing SSL certificates

To install your own SSL certificates, run the following procedure:

  1. In the  <install_path>/clara/nginx/cert folder replace the .key and .crt default certificate files with your own files (do not change the default names).

  2. Complete the installation procedure, or run the following commands from the <install_path> directory to update a pre-existing installation:

 docker stop clara-nginx

 docker start clara-nginx

 

Configuring Clara to use TLS

By default, Clara external port is configured to use TLS 1.2 and TLS 1.3.

To modify this setting, you can proceed in one of the following ways:

 

Fixing the HTTP Host Header injection vulnerability in Clara

With Clara, to prevent HTTP Host Header attacks, run the following procedure:

  1. In Clara installation path, locate the .env file.
  2. Open the .env file with a text editor (vim or vi).
  3. Add the string  EXTERNAL_HOSTNAME=IP where IP is the IP address of the machine where Clara has been installed. 
  4. Save the changes and close the file.
  5. Issue the command ./clara.sh --up

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Leave feedback