Skip to content

docs(keycloakx): describe proxy values as KC_PROXY_HEADERS and drop the KC_PROXY example - #939

Merged
dominiquemetz merged 1 commit into
codecentric:masterfrom
fjvbn2003:docs-keycloakx-proxy-headers
Nov 6, 2026
Merged

dominiquemetz merged 1 commit into
codecentric:masterfrom
fjvbn2003:docs-keycloakx-proxy-headers

Conversation

@fjvbn2003

Copy link
Copy Markdown
Contributor

The README's parameter table says proxy.enabled sets KC_PROXY and that proxy.http.enabled enables "HTTP forwarding". The template does something else (statefulset.yaml):

  • proxy.enabled sets KC_PROXY_HEADERS to proxy.mode (forwarded or xforwarded);
  • proxy.http.enabled sets KC_HTTP_ENABLED=true, independent of proxy.enabled.

The "Running Keycloak Behind a Reverse Proxy" section still tells users to put KC_PROXY=passthrough in extraEnv. Keycloak deprecated the proxy option in 24 and removed it in 26 (upgrading guide, "Proxy option removed" under 26.0.0). Following that section on a current image therefore does nothing for forwarded headers.

This was reported in #830, which was closed by the stale bot without a change.

What I checked

Keycloak 26.6.4 (the image of this chart's previous release), kc.sh start-dev, one request to /realms/master/.well-known/openid-configuration carrying both X-Forwarded-Host/Proto and Forwarded headers for kc.example.test, https:

env log issuer
none – http://127.0.0.1:8080/realms/master
KC_PROXY=passthrough (README example) WARNING: Hostname v1 options [proxy] are still in use, please review your configuration http://127.0.0.1:8080/realms/master
KC_PROXY_HEADERS=xforwarded (what proxy.mode: xforwarded renders) – https://kc.example.test/realms/master

On a running 7.2.3 release with proxy.enabled: false and default proxy.http.enabled, the StatefulSet has KC_HTTP_ENABLED=true and no KC_PROXY_HEADERS, which matches the template reading above.

Change

  • Fix the three table rows for proxy.enabled, proxy.mode, proxy.http.enabled.
  • Replace the KC_PROXY example with the proxy values, say that KC_PROXY no longer works on Keycloak 26, add the usual warning that these headers must only be trusted behind a proxy that overwrites them, and link the Keycloak reverse proxy guide.

README only, so I did not bump the chart version (like #859 and #932). Happy to bump it if you want this released.

Refs #830

This change was drafted with AI assistance and reviewed by me.

🤖 Generated with Claude Code

The README said proxy.enabled sets KC_PROXY and proxy.http.enabled
turns on "HTTP forwarding". The template sets KC_PROXY_HEADERS from
proxy.mode and KC_HTTP_ENABLED from proxy.http.enabled.

The reverse proxy section still told users to set KC_PROXY=passthrough
through extraEnv. Keycloak deprecated that option in 24 and removed it
in 26. On 26.6.4 it only logs "Hostname v1 options [proxy] are still in
use" and forwarded headers are not used, so the issuer stays on the
internal address. Show the proxy.mode values instead.

Refs codecentric#830

Signed-off-by: YoungjuKim <[email protected]>
@fjvbn2003
fjvbn2003 requested a review from a team as a code owner October 16, 2026 18:29
@dominiquemetz

Copy link
Copy Markdown
Contributor

Thank you for updating the documentation!

@dominiquemetz
dominiquemetz merged commit 1e93cb8 into codecentric:master Nov 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants