Overview
When creating a service account in Domino, you may encounter the following error while generating a token:domino-service-accounts client.
Symptoms
- Service account creation succeeds, but token generation fails.
- Error response shows
unauthorized_clientorInvalid client credentials. - Nucleus frontend logs display
OidcUnauthorizedExceptionrelated to thedomino-service-accountsclient.
- Issue may appear after making changes to Keycloak configuration (e.g., adding or modifying JWT keys).
Root Cause
Thedomino-service-accounts client credentials in Keycloak and the Kubernetes secret may become out of sync. Since Keycloak client secrets cannot be directly edited, and Kubernetes secrets are auto-generated, reconciliation is required to realign both values.
How to Verify Credentials
- Fetch values from the cluster:
- The
clientIdshould bedomino-service-accounts. - Note down the
clientSecret.
- Log in to Keycloak.
- Go to: Domino Realm > Clients > domino-service-accounts > Credentials.
- Reveal the Client Secret and compare it with the one from Kubernetes.
Reconciliation Procedure
Since neither Keycloak nor Kubernetes allows direct editing of these secrets, the recommended approach is to re-import thedomino-service-accounts client into Keycloak:
1. Export the client configuration:
- In Keycloak UI, go to: Domino Realm > Clients > domino-service-accounts > Action > Export.
- Save the JSON file.
- Locate the
"secret"property in the JSON. - Replace its value with the
clientSecretobtained from Kubernetes.
- In Keycloak UI, navigate to Domino Realm > Clients > domino-service-accounts > Action > Delete.
- Go to Domino Realm > Clients > Clients List > Import Client.
- Upload the modified JSON file.
- Click Save
- Navigate back to Credentials for the
domino-service-accountsclient. - Confirm that the secret matches the value in Kubernetes.
- Retry generating the service account token.
Important Notes
- Avoid toggling the Client Authentication setting in Keycloak unnecessarily. Doing so may regenerate the secret and cause mismatches.
- If new JWT keys are required (e.g., for S3 connectivity), ensure existing Domino-related client configurations are not modified.
- After reconciliation, service account token generation should work again without impacting other Keycloak configurations.