Skip to main content

Keycloak

About 2 min

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 the Datawiza Access Proxy (DAP) with docker. For the author, it is http://172.16.181.1:8080.
  • Realm Name
  • Client ID
  • Client Secret

Prerequisite

We assume that you already have a Keycloak Serveropen in new window running on http://localhost:8080.

Add New realm

  1. Create a new realm. Keycloak SSO | Keycloak Create Realm

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

Create and Configure your Keycloak Client

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

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

Create Groups and Users

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

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

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

  4. Assign user to group. Select Groups tab, choose the group we created and click Join: Keycloak SSO | 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 Guideopen in new window