To enable multi realm support in Grafana, ensure the following:
The client ID and client secret key being created in the newly created realm should be same as the one stored in the key vault.
Please contact DE team for the details. Suppose the key vault has the following values:
Client ID: grafana_client
Client Secret Key: abcd12345treww
Create the client using the above client ID in the new realm. (i.e. here it would be grafana_client) Client secret key cannot be updated via the keycloak UI. Ensure it is generated using the credentials tab in the keycloak UI.
Update the Client secret key in keycloak DB with the keyvault value using the following SQL:
Select the keycloak DB
USE keycloak;
Select the ID (primary key) for that particular client in that particular realm. Suppose the client id is grafana client and the new realm is grafanatest, then the query would be as given below:
SELECT ID FROM `client` where CLIENT_ID='grafana_client' and REALM_ID ='grafanatest'; |
Assume the value of ID = 83cd0afa-9eb44a567c52
Update the entry with the keyvault value providing the primary key retrieved in the previous step. Assume that the ID retrieved is
UPDATE `client` SET `SECRET` = ‘abcd12345treww’, WHERE `client_ID` = '83cd0afa-9eb44a567c52'
Check whether the value change has been reflected in the keycloak UI for this particular client. If not, please clear the keycloak cache.