Greetings,
I am currently looking for a solution that is nearly identical to this Google Group question. Is there a way to do this? My use case is being able to dynamically update the “Root URL” for my Keycloak clients without having to make API calls to update clients and have Keycloak pick this up on restart. It seems like there is a Keycloak related property ${authBaseUrl} which could be potentially be abused for this purpose. Also, like the other poster, we are running Keycloak behind a proxy (Traefik) and exposing Keycloak on /auth path. Another option would be to “share” the path namespace with Keycloak with the apps and expose Keycloak over root / - since our applications wouldn’t need the required Keycloak paths like /admin, /realms, etc.
- Feed Keycloak environment variable, e.g. something like
KC_MY_APP_ROOT_URLon startup - Use this within the client definition just like
${authBaseUrl}is used in Keycloak related clients likeaccount, e.g.${myAppBaseUrl} - Use relative URL as usual, etc.
- When Keycloak is restarted with a new value of
KC_MY_APP_ROOT_URLit would pick that up without needing to do API calls to update Keycloak clients.