Enable Keycloak Auth
On this page
- Verify Keycloak is running
- Create the NBS users realm
- Import base users and clients
- Configure the NBS gateway
- Set the login theme
Verify Keycloak is running
-
Confirm the Keycloak pod is running:
kubectl get pods -
Set up port forwarding:
kubectl --namespace default port-forward "<pod_name>" 8080 -
Log in to the Keycloak web UI as an admin.
Create the NBS users realm
-
In the top-left menu, select Create realm.

-
Upload or paste
charts/keycloak/extra/02-nbs-users-realm.jsonand click Create.
-
Verify the new realm exists.

Import base users and clients
-
Select the nbs-users realm, then go to Realm settings → Action → Partial Import.

-
Upload or paste
charts/keycloak/extra/03-nbs-users-base-users.json, select the 3 users, and click Import.

-
Upload or paste
charts/keycloak/extra/04-nbs-users-development-clients.json, select the 1 client, and click Import.

Configure the NBS gateway
OIDC must be enabled when deploying
modernization-apiandnbs-gateway. This is configured during Microservices Deployment, not here.
-
In the nbs-users realm, go to Clients → nbs-modernization → Credentials → Client Secret.

-
Copy the client secret and update
charts/nbs-gateway/values.yamlunder theoidcsettings.
Set the login theme
You may use the pre-populated NBS login theme, keep the default, or create your own. The Keycloak Helm chart loads a sample theme in a persistent volume mounted at /opt/keycloak/themes/nbs.
- Select the nbs-users realm.
-
Go to Realm settings → Themes → Login and select your preferred theme.
