Skip to content

fix(KAAP-2257): separate public redirect host from internal API host - #77

Closed
mridulgain wants to merge 3 commits into
masterfrom
private/master/mg/kaap-2257-federation-public-host
Closed

fix(KAAP-2257): separate public redirect host from internal API host#77
mridulgain wants to merge 3 commits into
masterfrom
private/master/mg/kaap-2257-federation-public-host

Conversation

@mridulgain

@mridulgain mridulgain commented Sep 1, 2026

Copy link
Copy Markdown

Summary

  • LoginURL() was building the Shibboleth SSO redirect from FederationConfig.Host which is fine for SAAS. But for onprem/ce the internal Keystone Service URL is used which breaks the SSO redirection on browser (KAAP-2257).
  • Adds optional ExternalHost (externalKeystoneHost), used only for the redirect, falling back to Host for backward compatibility. Server-to-server Keystone API calls still use Host.

Test plan

  • go test ./connector/keystone/...
  • e2e - failed

Testing: after upgrading the config & dex image

  1. Use externally resolvable host name in browser:
Screen.Recording.2026-09-03.at.12.15.54.PM.mov
  1. Usage of internal svc: during kubectl oidc login, logs from getKeystoneTokenFromFederation(), which builds its request from c.cfg.Host):
level=DEBUG msg="dex callback received" method=GET
level=DEBUG msg="getting keystone token from federation cookies"
level=DEBUG msg="requesting keystone token from federation auth endpoint"
..
time=2026-09-03T18:01:13.318Z level=ERROR msg="failed to authenticate" err="no X-Subject-Token found in federation auth response" request_id=89ba17e4-2046-4a74-964c-404291744263

But the keystone refuses to honor token request over unsecured http connection

LoginURL() previously reused FederationConfig.Host, the internal
Keystone Service URL, to build the browser-facing Shibboleth SSO
redirect. On-prem deployments where the internal Service DNS differs
from the publicly-resolvable DU FQDN produced broken redirects
(KAAP-2257).

Add optional PublicHost (publicKeystoneHost), used only in LoginURL()
with fallback to Host. All server-to-server Keystone API calls
continue to use Host unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mridulgain mridulgain changed the title fix(keystone): separate public redirect host from internal API host fix(KAAP-2257): separate public redirect host from internal API host Sep 1, 2026
@mridulgain mridulgain self-assigned this Sep 1, 2026
@mridulgain
mridulgain requested a review from a team September 1, 2026 08:38
Align field naming with the value used in the pf9-openstack-helm dex
chart template.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vaibhavd21

vaibhavd21 commented Sep 2, 2026

Copy link
Copy Markdown

For existing customers ? -

  1. If they add externalKeystoneHost in dex config and update the dex image it starts working
  2. Or they upgrade to the release where we fixed this

@mridulgain

Copy link
Copy Markdown
Author

For existing customers ? -

  1. If they add externalKeystoneHost in dex config and update the dex image it starts working
  2. Or they upgrade to the release where we fixed this

Yes, if you o 1, it starts working. That's how I tested locally. However, the config is embedded in a secret which is generated & deployed by helm. So, recommended way is to upgrade the release.

@mridulgain
mridulgain marked this pull request as draft September 4, 2026 07:57
@mridulgain

Copy link
Copy Markdown
Author

The internal ep has two issues:

  1. shibboleth config prevents session cookies sent over insecure (http) connections
  2. internal keystone do have a https svc on port 15000, but another ca.cert mount would be needed & the external host is needed anyway for browser redirection.

@mridulgain mridulgain closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants