docs: split-horizon backchannel discovery for private-VPC OIDC#24
Open
oren-openteams wants to merge 1 commit into
Open
docs: split-horizon backchannel discovery for private-VPC OIDC#24oren-openteams wants to merge 1 commit into
oren-openteams wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new Split-horizon backchannel discovery (private-VPC deployments) section to
docs/auth-flow.md, plus a brief callout in the README pointing at it. Covers the gap between the front-channel OAuth flow (already well-documented) and what pack authors need to know when their backend calls Keycloak endpoints directly on a private-VPC cluster.Motivation
The existing
auth-flow.mdcovers the browser-to-Envoy-to-Keycloak front-channel flow in depth (11-step diagram, cookie format, JWT decoding, etc.) but doesn't address what happens when a pack's backend service needs to hit Keycloak itself — for token validation, refresh, JWKS fetch, or userinfo introspection.On a private-VPC cluster, this is where things get subtle:
issuerURL(external hostname) is what tokens are stamped with, so consumers must validateissagainst itissuerURLfor validation,discoveryURLpointed at Keycloak's in-cluster Service for the actual OIDC handshakeEvery downstream pack author using this template will hit this problem the moment they deploy on a real cluster. Documenting the pattern here (rather than each pack re-discovering it) saves the community time.
What the new section covers
issclaim + in-cluster reachability)KC_HOSTNAME_BACKCHANNEL_DYNAMIC=truesetting on the Keycloak side (makes Keycloak return backchannel URLs based on how it was reached)keycloak.hostname,keycloak.serviceHost,keycloak.realm,auth.oidc.{issuerURL,discoveryURL}) with helper template fall-throughReference implementation
Nebi-pack #34 lands the exact pattern documented here. Validated downstream on a real private-VPC cluster via ArgoCD: the default helper produces the correct in-cluster URL, nebi initializes cleanly, OIDC discovery succeeds. See the PR#34 comment thread for evidence.
Placement
docs/auth-flow.md: new## Split-horizon backchannel discovery (private-VPC deployments)section, positioned between the existing App-Native OAuth section and NebariApp CRD vs Envoy Gateway SecurityPolicy section. That's the natural taxonomy — App-Native OAuth introduces the "your app talks to Keycloak" concept; this new section covers "and here's how to do it correctly on a private-VPC cluster."README.md: 5-line callout added to the existing## How Authentication Workssection, linking to the new deep-dive.