Update the default password for the admin Keycloak account using the Keycloak user interface (UI). After updating the password in Keycloak, encrypt it on the system and verify that the change was made successfully.
The SYSTEM_DOMAIN_NAME
value found in some of the URLs on this page is expected to be the system’s fully qualified domain name (FQDN).
The FQDN can be found by running the following command on any Kubernetes NCN.
ncn-mw# kubectl get secret site-init -n loftsman -o jsonpath='{.data.customizations\.yaml}' | base64 -d | yq r - spec.network.dns.external
Example output:
system..hpc.amslabs.hpecorp.net
Be sure to modify the example URLs on this page by replacing SYSTEM_DOMAIN_NAME
with the actual value found using the above command.
Log in to Keycloak with the default admin credentials.
Point a browser at https://auth.SYSTEM_DOMAIN_NAME/keycloak/admin
, replacing SYSTEM_DOMAIN_NAME with the actual NCN’s DNS name.
The following is an example URL for a system: https://auth.system1.us.cray.com/keycloak/admin
Use the following admin login credentials:
admin
ncn-mw# kubectl get secret -n services keycloak-master-admin-auth \
--template={{.data.password}} | base64 --decode
Click the Admin
drop-down menu in the upper-right corner of the page.
Select Manage Account
.
Click the Password
tab on the left side of the page.
Enter the existing password, new password and confirmation, and then click Save
.
Follow the Redeploying a Chart procedure with the following specifications:
Name of chart to be redeployed: cray-keycloak
Base name of manifest: platform
When reaching the step to update customizations, perform the following steps:
Only follow these steps as part of the previously linked chart redeploy procedure.
ncn-w001# git clone https://github.com/Cray-HPE/csm.git
```bash
```
Change the password in the customizations.yaml
file.
In the customizations.yaml
file, set the values for the keycloak_master_admin_auth
keys in the
spec.kubernetes.sealed_secrets
field. The value in the data element where the name is password
needs to be changed to the
new Keycloak master admin password. The section below will replace the existing sealed secret data in the customizations.yaml
file.
Encrypt the values after changing the customizations.yaml
file.
ncn-w001# ./utils/secrets-seed-customizations.sh customizations.yaml
If the above command complains that it cannot find certs/sealed_secrets.crt
then you can run the following commands to create it:
mkdir -pV certs && ./utils/bin/linux/kubeseal --controller-name sealed-secrets --fetch-cert > certs/sealed_secrets.crt
When reaching the step to validate that the redeploy was successful, perform the following step:
Only follow this step as part of the previously linked chart redeploy procedure.
Verify that the Secret has been updated.
Give the SealedSecret controller a few seconds to update the Secret, then run the following command to see the current value of the Secret:
kubectl get secret -n services keycloak-master-admin-auth --template={{.data.password}} | base64 --decode
Make sure to perform the entire linked procedure, including the step to save the updated customizations.