KEYCLOAK_FRONTEND_URL and KEYCLOAK_HOSTNAME
by EXTERNAL Thiele Frank (TNG, INST-CSS/BSV-OS2)
Hi,
I am struggling with the introduction of the new KEYCLOAK_FRONTEND_URL env variable.
As I was unable to find documentation about it within 5 minutes and we want to support a KC 7 and 8 in parallel, I simply tried to set both variables at the same time.
This fails due to the following piece of code (server/tools/docker-entrypoint.sh):
...
############
# Hostname #
############
if [[ -n ${KEYCLOAK_FRONTEND_URL:-} ]]; then
SYS_PROPS+="-Dkeycloak.frontendUrl=$KEYCLOAK_FRONTEND_URL"
fi
if [[ -n ${KEYCLOAK_HOSTNAME:-} ]]; then
SYS_PROPS+="-Dkeycloak.hostname.provider=fixed -Dkeycloak.hostname.fixed.hostname=$KEYCLOAK_HOSTNAME"
...
There is a space missing in the KEYCLOAK_HOSTNAME handling (SYS_PROPS+=" -Dkeycloak.hostname.provider=f")
Due to that, the result is the following in KC logs:
2019-12-10 11:12:46,664 INFO [org.keycloak.url.DefaultHostnameProviderFactory] (ServerService Thread Pool -- 70) Frontend: myCustomHostname-Dkeycloak.hostname.provider=fixed, Admin: <frontend>, Backend: <request>
So is setting both variables at the same time a way to go (assuming I set KEYCLOAK_FRONTEND_URL to "myCustomHostname " (space at the end)? Is this supported? Is there any documentation available, maybe also about the difference to KEYCLOAK_HOSTNAME?
Mit freundlichen Grüßen / Best regards
Frank Thiele
Open Source Services 2 - Product Group Customer Success Services (INST-CSS/BSV-OS2)
Bosch Software Innovations GmbH | Ullsteinstr. 128 | 12109 Berlin | GERMANY | www.bosch-si.com<http://www.bosch-si.com>
Tel. +49 30 726112-0 | Fax +49 30 726112-100 | external.Frank.Thiele(a)bosch-si.com<mailto:external.Frank.Thiele@bosch-si.com>
Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Michael Hahn, Dr. Aleksandar Mitrovic