fix(keycloak): include HTTPS port in redirect URIs and remove Dockerfile build secrets
Summary
-
Redirect URI port missing: Keycloak client
genie-appredirect URIs used$(env:NGINX_PUBLIC_DOMAIN)without the HTTPS port, causinginvalid redirect_urierrors when accessing via a non-standard port (e.g.https://localhost:8443/callback) -
keycloak-config startup race:
config-and-sleep.shexited immediately on first failure (set -e), preventing downstream services from starting because the healthcheck never passed -
Dockerfile build secret warning:
ARANGO_PASSWORDwas passed as build ARG and baked into thedocument-repositoryimage via ENV, triggering Docker build warnings about secrets in images
Changes
-
docker-compose.yaml: Pass
KC_PUBLIC_ORIGINtokeycloak-configservice -
configs/keycloak/genie-realm.yaml: Replace
http/https + NGINX_PUBLIC_DOMAINwithKC_PUBLIC_ORIGINfor all redirect URIs and web origins - configs/keycloak/config-and-sleep.sh: Add inline retry loop (10 attempts, 10s delay) instead of exiting on first keycloak-config-cli failure
-
components/document-repository/Dockerfile: Remove
ARG ARANGO_PASSWORD/ENV ARANGO_PASSWORD— the password is already injected at runtime viadocker-compose.yamlenvironment:directive, making the build-time ARG redundant
Test plan
-
Set NGINX_HTTPS_PORT=8443in.env, rebuildkeycloak-configimage, verify Keycloak acceptshttps://localhost:8443/callbackas redirect URI -
Default NGINX_HTTPS_PORT(443, omitted from URL) — verify no regression -
Cold start ( docker compose down -v && docker compose up -d) — verifykeycloak-configsucceeds on retry withoutErrorstatus, all dependent services start -
Verify account console and account web origins still work -
Build document-repositoryimage — verify no Docker build warnings about secrets
Edited by Jérôme Revillard