Creating Keycloak clients and accounts
Overview
Before you can request access and refresh tokens from Keycloak, you must create:
- Clients – one for each application or user group that needs to use the OpenTV Suite APIs. (For example, you might have one client called
postman_client
for use by developers during integration, and another calledcrm_system
for use by a CRM system.) - Keycloak accounts for the applications, systems, or individuals that will be making such requests.
Creating a Keycloak client
To create a Keycloak client:
- Open
https://<base_url>/keycloak/auth/admin/master/console
in a web browser, where<base_url>
is the base URL of the OpenTV Suite deployment. - Log in using the credentials that NAGRA provided to you as part of the deployment.
- In the left menu, under Configure, click Clients.
- At the right side of the toolbar, click Create.
- In Client ID, type an ID for the client.
- In Client Protocol, select openid-connect.
- Click Save. The client settings tab is displayed.
- Click the Settings tab, then:
- Set Standard Flow Enabled to OFF.
- Set Direct Access Grants Enabled to ON.
- Click Save.
- Click the Scope tab, then:
- Set Full Scope Allowed to OFF.
- In Available Roles, select operatorRole and click Add Selected.
Creating a Keycloak account
Depending on whether your deployment is managed by NAGRA or not, you should create operator and/or admin users. (In a NAGRA-managed deployment, admin users do not need to be created for operator use – only NAGRA needs admin users.)
To create a Keycloak operator or admin account:
- Open
https://<base_url>/keycloak/auth/admin/master/console
in a web browser, where<base_url>
is the base URL of the OpenTV Suite deployment. - Log in using the credentials that NAGRA provided to you as part of the deployment.
- In the left menu, under Manage, click Users.
- At the right side of the toolbar, click Add user.
- In Username, type the username for the user.
- Optionally, type the user's email address and first and last names in th appropriate fields.
- Make sure User Enabled is set to ON.
- Click Save. The user details tab is displayed.
- Click the Credentials tab, then:
- Set Temporary to OFF.
- In New Password, type the password for the user.
- In Password confirmation, type the password again.
- Click Reset Password.
- When prompted, confirm by clicking Change password.
- Click the Role Mappings tab, then in Available Roles, select either operatorRole or adminRole as appropriate and click Add Selected.