Change Password Policy Text
This page describes how to change the password policy text post deployment.
To change this at deployment time see the configuration docs.
To change the password policy text post deployment, you need to adjust the custom theme config map and restart the Keycloak pod.
-
Retrieve the template for the login update password page, and theme properties, from the custom theme config map:
bash
Copykubectl get configmap custom-theme-configmap -o json | jq -r '.data["login-update-password.ftl"]' > login-update-password.ftl
kubectl get configmap custom-theme-configmap -o json | jq -r '.data["theme.properties"]' > theme.properties
-
Make your changes to
login-update-password.ftl
. Place the password policy betweentext
Copy<#elseif section = "form">
and
text
Copy<form id="kc-passwd-update-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
-
Recreate the configmap with your changes:
bash
Copykubectl create configmap custom-theme-configmap \
--save-config --dry-run=client \
--from-file=./login-update-password.ftl --from-file=./theme.properties \
-o yaml | kubectl apply -f -
-
Restart the Keycloak pod for the changes to take effect:
bash
Copykubectl delete pod -l app.kubernetes.io/name=keycloak