The realm.json
file included in this project initializes Keycloak with a sample configuration for the cvmanager
realm. This includes creating a test user with the below credentials:
- Email:
test@gmail.com
- Password:
tester
A sample keycloak theme is provided in the sample_theme.jar
file. This is a sample theme generated using Keycloakify, to use a custom theme put a generated .jar file in this directory and then update the KEYCLOAK_LOGIN_THEME_NAME
with the name of the new .jar file.
Due to the addition of the Keycloak custom user provider, a Java keystore containing an SSL certificate is now required to build the Keycloak image.
For development, you can use the create_local_cert.sh script to generate a self-signed certificate:
./create_local_cert.sh
This script generates two files, ./ssl_cert/cert.pem and ./ssl_cert/key.pem. These are picked up by the Dockerfile on build.
For production deployments, a custom certificate should be generated and loaded into the image as a volume before being built. This process is as follows:
- Create a certificate to be used by Keycloak. This should ideally be signed by a CA. The Dockerfile requires the following files to exist: ./ssl_cert/cert.pem and ./ssl_cert/key.pem
- Create a random password to be used for the java keystore. Set this in the docker image as en env variable "KEYSTORE_PASSWORD"
- Load the certificate.crt and private.key files into the docker build as a volume, mounted under the /cert directory
- Build the docker image!