Add a password hash provider to handle BCrypt passwords inside Keycloak.
./gradlew assemble -Pdependency.keycloak.version=${KEYCLOAK_VERSION}
docker build \
--build-arg keycloak_version=${KEYCLOAK_VERSION} \
-t gleroy/keycloak-bcrypt \
.
docker-compose up -d
curl -L https://github.com/leroyguillaume/keycloak-bcrypt/releases/download/${KEYCLOAK_BCRYPT_VERSION}/keycloak-bcrypt-${KEYCLOAK_BCRYPT_VERSION}.jar > ${KEYCLOAK_HOME}/providers/keycloak-bcrypt-${KEYCLOAK_BCRYPT_VERSION}.jar
You need to restart Keycloak.
curl -L https://github.com/leroyguillaume/keycloak-bcrypt/releases/download/${KEYCLOAK_BCRYPT_VERSION}/keycloak-bcrypt-${KEYCLOAK_BCRYPT_VERSION}.jar > ${KEYCLOAK_HOME}/standalone/deployments/keycloak-bcrypt-${KEYCLOAK_BCRYPT_VERSION}.jar
You need to restart Keycloak.
docker run \
-e KEYCLOAK_ADMIN=${KEYCLOAK_ADMIN} \
-e KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD} \
-e KC_HOSTNAME=${KC_HOSTNAME} \
gleroy/keycloak-bcrypt \
start
The image is based on Keycloak official one.
Go to Authentication
/ Policies
/ Password policy
and add hashing algorithm policy with value bcrypt
.
To test if installation works, create new user and set its credentials.