Repository navigation
Keycloak 26.4.0 behind Zuul in Kubernetes – best practice for public frontend URLs + internal token issuer ? #44453
Replies: 6 comments 5 replies
That's not a valid configuration option.
Do you mean re-encrypt? It doesn't appear that http is enabled on the Keycloak server. It doesn't appear that you have configured the relative path as auth, should this url include /auth?
If you access the Keycloak server via a URL that appears to match the front-end, then the request will be treated as coming from the front-end. Can you explain more behind the reasoning for the custom filter? |
I just wanted to clarify as edge usually means https to the proxy, then http to the backend. If you are either doing re-encrypt or passthrough tls, you don't need http enabled.
Ok, so WEB_CONTEXT is set to auth.
That's typically the job of the proxy. Is the proxy not doing that, or are you trying to make internal requests appear as if they are coming via a proxy instead.
If you are doing anything other than https passthrough, yes you should set the proxy headers option: https://www.keycloak.org/server/reverseproxy#_configure_the_reverse_proxy_headers
This sounds different than the filter you are showing, and is not something that is typically done.
Setting KC_HOSTNAME_URL=https://auth.company.com/auth means that the browser won't see any internal service names when accessing via the front-end. |
|
Hi @shawkins , yes, all our internal micro-services only making back-channel requests. So, currently we are going with the setup like below and with this setup Keycloak 26 is up and healthy. The Keycloak token is now having internal Kubernetes service URL.
LOGIN_ACTIONS_AUTH_URI = "/realms//login-actions/authenticate"; Pre-filter overwrites X-Forwarded-Host → internal host on a whitelist of sensitive paths Post-filter does string replacement of the internal host → public host in Location headers and in every JSON/HTML response body |
|
Hi @shawkins, Currently we are facing another issue. When are trying to login in our UI application integrated with Keycloak 26.4.0, we are not able to successfully logged in to the application although in the Keycloak server side it shows user is successfully logged in. While debugging I found this feature Exclude Issuer From Authentication Response
|
If you think you have found an issue, and it is reproducible in a supported configuration, please open an new issue https://github.com/keycloak/keycloak/issues |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
We are migrating from Keycloak 18 Wildfly to Keycloak 26.4.0 (Quarkus) in Kubernetes behind a Zuul edge proxy.
https://auth.company.com/auth/...(no port, no internal hostnames)issclaim and all back-channel endpoints (token, introspection, JWKS, etc.) must remain the internal Kubernetes service URL →https://keycloak-prod.ns.svc.cluster.local:8000/auth/...(many backend services validate the token issuer against the internal URL and we do not want to change hundreds of services)
We have the following setup today:
Zuul route
And a tiny pre-filter that forces the three public headers:
Questions:
Please suggest the solution here. Currently, many backend services validate the token issuer against the internal URL. I followed the documentation here: https://www.keycloak.org/server/hostname#_backend
All reactions