# Keycloak Configuration

This session shows how to register a client on the Keycloak Server. When registering the client, we are getting the following four values that are needed for later configuration in Datawiza Cloud Management Console (DCMC):

  • Keycloak Server
    The Keycloak Server is the Keycloak server address. Notice that we use the IP Address instead of localhost for Keycloak Server while we start DAB with docker. For the author, it is
  • Realm Name
  • Client ID
  • Client Secret

# Prerequisite

We assume that you already have a Keycloak Server running on http://localhost:8080.

# Add New realm

  1. Create a new realm. Keycloak Create Realm

  2. Enter the realm name, which is the Realm Name we need, and click Create. Keycloak Create Realm

# Create and Configure your Keycloak Client

  1. Create a Client.
    Select Clients tab and click Create:
    Keycloak Config
    Enter the client name, which is the Client ID we need, and click Save.
    Keycloak Config

  2. Configure the client.
    Select confidential in Access Type: Keycloak Config
    Open Authorization Enabled and Service Accounts Enabled should be opened automatically: Keycloak Config
    Enter the Valid Redirect URIs, which should be the address of DAB, e.g., http://localhost:9772/*, then click Save: Keycloak Config
    Now, the Credentials tab should be shown. Select it and make a copy of Secret as Client Secret: Keycloak Config

# Create Groups and Users

  1. Create groups.
    Choose Groups and click New: Create Keycloak Group
    Enter the group name and click Save: Create Keycloak Group

  2. Create Users.
    Choose Users and click Add user:
    Create Keycloak User
    Enter the basic information and click Save:
    Create Keycloak User
    Select Credentials tab and enter the password, close the Temporary for test purpose. Click Set Password:
    Create Keycloak User

  3. Add Client Roles to get user profile.(Optional).
    Select Role Mappings and choose realm-management in Client Roles:
    Create Keycloak User
    Add view-users: Create Keycloak User
    Create Keycloak User

  4. Assign user to group.
    Select Groups tab, choose the group we created and click Join: Create Keycloak User

# Summary

We have shown how to register a client on Keycloak. Please make sure to save the following four values for later setting in Datawiza Cloud Management Console.

  • Keycloak Server
  • Realm Name
  • Client Id
  • Client Secret

# Reference

Keycloak Getting Started Guide