Changing internal passwords
EDA uses internal passwords to communicate between its internal services. These passwords are either hard-coded or are set before system installation.
After the system has been installed, administrators with cluster role privileges can update internal passwords for the following services using the applicable UI or scripts:
- Git passwords, Go Git server (Gogs) passwords
- Keycloak passwords and secrets
- PostgreSQL passwords
-
reset-01-gogs-user-pass.sh: resets the Gogs user password
-
reset-02-k8s-secret.sh: resets the Kubernetes secret
-
reset-03-keycloak-admin-user.sh: resets the Keycloak admin user password
-
reset-04-pgdb-password.sh: resets the PostgreSQL database password
Updating the Git server password
Changing the Git server password using the UI
-
Log in to the Gogs UI.
If you are using the git-server provided cluster, you can reach the UI using the following URLs:
- <eda-url>/core/httpproxy/v1/gogs/`
- `<eda-url>/core/httpproxy/v1/gogs-replica/`
- Click user icon, then from the navigation bar on the right, go to from the nav bar on the right. .
- Change your password.
- Log out and then log back in.
-
Update the secret for
gogs-admin-user
. -
Navigate to
user/settings/password
.
Change the Git server password using the script
You must have cluster role privileges to perform this procedure.
If you are using the Git server from an external
package, change the password on both the eda-git
and
eda-git-replica
servers; ConfigEngine uses the same secret to
authorize with both these servers.
-
Generate a token for the admin user.
-
Change the user password.
The following example resets the user password for eda-git and eda-git-replica.
Where:./reset-01-gogs-user-pass.sh \ -u lemon \ -p oranges \ -g http://eda-git:3000 \ -t 79b6e0ada8dc74bf60751a0e56683d6377792070 ./reset-01-gogs-user-pass.sh \ -u eda-git-user \ -p oranges \ -g http://eda-git-replica:3000 \ -t 70dd66f925678f35eb02d5073ce3b051b1bb640d
-u <username>
is the username of the account-p <password>
is the new password for the user-g <git server url>
is the URL to reach the Gogs server-t <access token>
is the access token from an admin user
-
Update the secret used by ConfigEngine.
kubectl edit -n eda-system secrets git-secret reset-02-k8s-secret.sh -n eda-system -s git-secret -p oranges
-
Restart the ConfigEngine from the toolbox.
edactl platform stop edactl platform start
-
Ensure that the Git servers are in a reachable state.
kubectl -n eda-system get engineconfigs.core.eda.nokia.com engine-config -o yaml | yq .status
Updating the Keycloak password
An administrator with cluster role privileges can update the Keycloak password using one of the following procedures:
Changing the Keycloak password using the UI
SECRET_KC_ADMIN_USERNAME
SECRET_KC_ADMIN_PASSWORD
T
- user: admin
- password: admin
- Go to the admin panel at https://<domain:ip>/core/httpproxy/v1/keycloak.
- Ensure that the Keycloak realm is selected from the upper left.
- Click Users from the left navigation bar
-
Click the
admin
account. -
Click the Credentials tab, then click Reset
password.
Follow the prompts to update the password.
Figure 1. Reset the Keycloak password -
Update the secret in the cluster.
Log in to a system with access to the API server and enter the following command:
kubectl -n eda-system edit keycloak-admin-secret
Changing the Keycloak password using the script
- Log in to the Keycloak server.
-
Set a temporary password.
reset-03-keycloak-admin-user.sh -e https://eda-api -r jules -t oranges -a jules -p verne
- Log in to Keycloak using the new password.
-
Update the Kubernetes secret in k8s.
/reset-02-k8s-secret.sh -n eda-system -s keycloak-admin-secret -p <new-password>
Updating PostgreSQL database
You must update both the Kubernetes secret and the secret on the running database.
Updating the PostgreSQL database password manually
-
Use SSH to log in to a pod.
kubectl exec -it -n eda-system eda-postgres-<podhash> -- bash -l
-
Change the password.
The database username is
postgres
. Use the following commands:sudo -u postgres psql postgres=# \password postgres
-
Encode the password.
echo -n "whataperil" |base64
-
Update the secret.
kubectl edit -n eda-system secrets postgres-db-secret
-
Restart the deployments.
kubectl rollout restart deployment eda-postgres eda-keycloak
Update the PostgreSQL database using the script
-
Update the database password.
./reset-04-pgdb-password.sh -n eda-system -p pineapples
-
Update the Kubernetes secret password.
reset-02-k8s-secret.sh -n eda-system -s postgres-db-secret -p pineapples
-
Restart the deployments.
kubectl rollout restart deployment eda-postgres eda-keycloak