On Prem Keycloak
Keycloak is an open-source Identity and Access Management solution for modern applications and services
If you need to load the images from a zip file
Unzip the Hub Enterprise Files zip
Change Directory to /hub-enterprise
Load the image with:
docker load < openlegacy-keycloak-16.1.0.tar.gz
Run Keycloak:
docker-compose -f keycloak.yaml up -d
Run the container with an external network (recommended):
Make sure you have an external network defined, you can define it using:
docker network create hub-enterprise
For Openlegacy Keycloak 22.x.x:
version: '3.7'
services:
keycloak:
image: openlegacy/openlegacy-keycloak:22.0.3
ports:
- 8081:8080
- 8443:8443
container_name: keycloak
volumes:
- ./keycloak/realms:/opt/keycloak/data/import
command:
- "start"
- "--import-realm"
environment:
- KC_HTTP_ENABLED=true
- KC_HTTPS_KEY_STORE_FILE=/opt/keycloak/keystore/openlegacy.jks
- KC_HTTPS_KEY_STORE_PASSWORD=openlegacy
- KC_HTTP_RELATIVE_PATH=/auth
- KC_HOSTNAME_STRICT=false
- KEYCLOAK_ADMIN=root
- KEYCLOAK_ADMIN_PASSWORD=openlegacy
- KC_DB=postgres
- KC_DB_USERNAME=$POSTGRES_USER
- KC_DB_PASSWORD=$POSTGRES_PASSWORD
- KC_DB_SCHEMA=keycloak
- KC_DB_URL=jdbc:postgresql://$OL_DB_HOST/$OL_DB_NAME
- KC_DB_URL_PORT=$OL_DB_PORT
networks:
- hub-enterprise
networks:
hub-enterprise:
external: true
For Older images:
Unzip the attached keycloak.zip and mount the realms directory as in line 10 of the docker compose
Make sure the Environmental variables correspond to your database information
Run the container with a host network:
Setup Keycloak - the following steps are based on the provided docker-compose
Go to Keycloak main page at address
https://<HUB_URL>:8443
Go to the Clients tab and choose Hub-spa
Go to Settings and inside
Valid Redirect URIs
change the following URL:http://localhost:8080/*
to behttp://<HUB_URL>:8080/*
, for example,http://3.235.245.156:8080/*
Your Keycloak is configured
Optional Step (Create Additional User) - Go to the Users tab(1) and create a new user(2) for the Hub-Enterprise API
Enter Username(1) (and optional information) and save the user(2)
Go to the Credentials tab(1) and set up a user password(2,3,4,5)
Go to the Attributes tab and add the following key/values
Key
:ol-fullname
Value
:{YOUR USERNAME}
- in this case, this willhub-enterprise
Key
:ol-tenantId
Value
:4a6bfc5d-3bae-45a3-99b9-d1e255875adb
Go to
Users
→Edit
root userGo to the
Attributes
tab and add the following key/valuesKey
:ol-fullname
Value
:root
Key
:ol-tenantId
Value
:4a6bfc5d-3bae-45a3-99b9-d1e255875adb
The Keycloak json