Skip to content

Keycloak

  1. Open the page at http://localhost:8880/ (or another address specified in the environment variables).
  2. Enter the login and password from the environment settings.

Keycloak Login

  1. Select “Manage realms” and click on “Create realm”.
  2. In the opened window, enter the “Realm name”, for example, “sysadminanywhere”.
  3. Click “Create”.

keycloak Create Realm

  1. Select “User federation” and then “Add LDAP provider”.

keycloak User Federation

  1. Configure the “Connection and authentication settings” section. Fill in the “Connection URL” and click “Test connection”. If a message about successful connection appears, continue the configuration. Click “Test authentication” to verify authentication.

keycloak Ldap Connection

  1. Configure the “LDAP searching and updating” section.

keycloak Ldap Searching And Updating

  1. Next, configure “Synchronization settings”. If not needed, disable “Import users”.

keycloak Synchronization Settings

  1. Click “Save”.

  2. Configure a client. Select “Clients” and click “Create client”. Enter the “Client ID”, for example, “sysadminanywhere”. Click “Next”. Then “Save”.

keycloak Create Client

  1. Go to “Clients” and select “sysadminanywhere” (or what was specified earlier). Fill in the “Access settings”.

keycloak Access Settings

  1. Next, go to the “Capability config” section and click “Save”.

keycloak Capability Config

  1. Next, click the “Credentials” tab in the client’s properties and copy the “Client Secret” into the KEYCLOAK_CLIENT_SECRET environment variable.

keycloak Credentials

  1. Go to “Client scopes” and click “Create client scope”. Fill in the “Name” field and click “Save”.

keycloak Create Client Scope

  1. Select our “Client scope”, click the “Mappers” tab, and then click “Configure a new mapper”.

keycloak Mappers

  1. Select “User Property”.

keycloak New Mapper

  1. Add federationLink…

keycloak federationLink

  1. Repeat for groups, selecting “Group Membership”.

keycloak groups

  1. Add to the hosts file:
127.0.0.1 keycloak
  1. Everything is ready for domain authorization.