How to change the authentication type on your web application?

In this section, you will find how to change the authentication types on Horusec’s web application.

To change an authentication type you currantly use, see the steps below for each one:

Horusec Native

To use it, follow the steps:

  1. Add the environment variable HORUSEC_AUTH_TYPE = "horusec" in the horusec-auth microservice and you will enable the native authentication;

LDAP

To configure this authentication, follow the steps:

  1. Add the environment variable HORUSEC_AUTH_TYPE=”ldap” in the horusec-auth microservice to define the authentication via LDAP;

  2. Add some environment variables in the microservice horusec-auth to make the connection with the tool, they are:

Environment variable name Standard value Description
HORUSEC_LDAP_BASE dc=example,dc=org LDAP connection base
HORUSEC_LDAP_HOST 127.0.0.1 LDAP connection host
HORUSEC_LDAP_PORT 389 LDAP connection port
HORUSEC_LDAP_USESSL false Checks whether to use SSL
HORUSEC_LDAP_SKIP_TLS true Checks whether to skip TLS

HORUSEC_LDAP_INSECURE_

SKIP_VERIFY

true Checks whether to skip insecurity check
HORUSEC_LDAP_BINDDN cn=admin,dc=example,dc=org Definition for Idap admin entity
HORUSEC_LDAP_BINDPASSWORD admin Definition the LDAP admin entity password
HORUSEC_LDAP_USERFILTER (uid=%s) What is the way of filter for users
HORUSEC_LDAP_GROUPFILTER (memberUid=%s) What is the way of filter for groups
HORUSEC_LDAP_ADMIN_GROUP admin What is the group administrators name

Keycloak

To configure this authentication, follow the steps:

  1. Add the environment variable HORUSEC_AUTH_TYPE=”keycloak” in the horusec-auth microservice that you will use in the authentication via Keycloak;

  2. In the horusec-auth microservice, add the connection variables with the keycloak, which are:

Environment variable name Standard value Description
HORUSEC_KEYCLOAK_BASE_PATH What is the keycloak connection base. Example:http://127.0.0.1:8080
HORUSEC_KEYCLOAK_CLIENT_ID What is the client_id that you use. Example: account.
HORUSEC_KEYCLOAK_CLIENT_SECRET What is secret used to client_id. Example:00000000-0000-0000-0000-000000000000.
HORUSEC_KEYCLOAK_REALM What is the realm used. Example: master.
HORUSEC_KEYCLOAK_OTP false If you are using otp (one-time password).

Then, to connect correctly, the horusec-manager will also need some environment variables:

Environment variable name Standard value Description
REACT_APP_KEYCLOAK_BASE_PATH What is the Keycloak connection base Example: http://127.0.0.1:8080
REACT_APP_KEYCLOAK_CLIENT_ID What is the client_id that you use. Example: account
REACT_APP_KEYCLOAK_REALM What is the realm used. Example: master

Last modified August 24, 2021: Update links in documentation (c4fcc110)