Skip to content

kolla: use upstream OIDC forwarded headers var - #313

Merged
berendt merged 1 commit into
mainfrom
keystone-oidc-forwarded-headers
Sep 23, 2026
Merged

berendt merged 1 commit into
mainfrom
keystone-oidc-forwarded-headers

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

all/099-kolla.yml set keystone_oidc_forward_header: "X-Forwarded-Proto", but no kolla-ansible release reads that variable. It was read only by the custom wsgi-keystone.conf overlays in the testbed and the cookiecutter with_keycloak option, both removed in February 2025, so the default has had no effect since.

This replaces it with the variable kolla-ansible actually uses, keystone_federation_oidc_forwarded_headers (role default "", available from 2025.1 on), with the same value. It is rendered as OIDCXForwardedHeaders in wsgi-keystone.conf.j2 (2025.1) and httpd-keystone.conf.j2 (2025.2 and later), and only when keystone_enable_federation_openid is true.

  • Safe to trust: kolla's HAProxy frontends delete any client-supplied X-Forwarded-Proto and set it themselves on TLS connections.
  • No effect without OIDC federation: the directive is not rendered.
  • 2024.1 / 2024.2: the role does not know the variable, so it is ignored, as the old one was.

Once this merges, the OIDC federation guide can drop its explicit setting of this variable:

Closes #312

🤖 Generated with Claude Code

all/099-kolla.yml set keystone_oidc_forward_header to
"X-Forwarded-Proto", but kolla-ansible has never read that variable.
It was read only by the custom wsgi-keystone.conf overlays in the
testbed and the cookiecutter with_keycloak option, both removed in
February 2025. Since then the default has had no effect.

kolla-ansible's equivalent is keystone_federation_oidc_forwarded_headers
(role default ""), available from 2025.1 on. It is rendered as
OIDCXForwardedHeaders into the Keystone vhost (wsgi-keystone.conf.j2 on
2025.1, httpd-keystone.conf.j2 from 2025.2 on), and only when
keystone_enable_federation_openid is true.

Set the upstream variable instead, with the same value. mod_auth_openidc
can trust the header: kolla's HAProxy frontends delete any
client-supplied X-Forwarded-Proto and set it themselves on TLS
connections. Deployments without OIDC federation render nothing, so they
are unaffected. On 2024.1 and 2024.2 the variable is unknown to the role
and ignored, as the old one was.

Closes: #312
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@ideaship
ideaship marked this pull request as ready for review September 23, 2026 14:09
@ideaship
ideaship requested a review from berendt September 23, 2026 14:09
@berendt
berendt merged commit b54b8ab into main Sep 23, 2026
3 checks passed
@berendt
berendt deleted the keystone-oidc-forwarded-headers branch September 23, 2026 14:10
@github-project-automation github-project-automation Bot moved this from New to Done in Human Board Sep 23, 2026
@ideaship ideaship self-assigned this Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Remove or replace unused keystone_oidc_forward_header default

3 participants