Skip to content

Pass allowPrivateIP into createOIDCConfig - #1470

Merged
jhrozek merged 1 commit into
mainfrom
private_ip_create_oidc_config
Aug 19, 2025
Merged

jhrozek merged 1 commit into
mainfrom
private_ip_create_oidc_config

Conversation

@jhrozek

@jhrozek jhrozek commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

I've been working on deploying Keycloak into our test cluster and noticed that the --jwks-allow-private-ip flag is not being passed down at all which is something we'd appreciate to run a dev KC instance.

I've been working on deploying Keycloak into our test cluster and
noticed that the --jwks-allow-private-ip flag is not being passed down
at all which is something we'd appreciate to run a dev KC instance.
jhrozek added a commit that referenced this pull request Aug 18, 2025
…tartup

When working on patches for PRs #1470 and #1471 I've been initially
seeing very long timeouts on toolhive startup. The underlying reason
were the transports not allowing me but the fact that the timeout was so
long and happened on toolhive startup was really irritating. I think we
should fetch the JWKs when we needed, not on startup in order to not
block the startup.
@jhrozek
jhrozek merged commit ac326ef into main Aug 19, 2025
@jhrozek
jhrozek deleted the private_ip_create_oidc_config branch August 19, 2025 06:45
suantea added a commit to suantea/toolhive that referenced this pull request Oct 10, 2026
Wire --oidc-insecure-allow-http and --thv-ca-bundle into createOIDCConfig
in thv run so the middleware's token validator receives InsecureAllowHTTP
and CACertPath. Also forward JWKS auth token file. This matches issue
stacklok#6522 (same pattern as stacklok#1470).
aponcedeleonch added a commit that referenced this pull request Oct 23, 2026
Wire CA bundle, auth token file and insecure HTTP into run OIDC middleware config

createOIDCConfig builds the TokenValidatorConfig that WithMiddlewareFromFlags
serializes into the auth middleware config, which is what the proxy uses at
runtime to build the token validator. It only set AllowPrivateIP, so
--thv-ca-bundle, --jwks-auth-token-file and --oidc-insecure-allow-http reached
the deprecated top-level RunConfig.OIDCConfig via WithOIDCConfig but never the
validator, and thv run could not talk to a local HTTP or private-CA issuer.

Pass the three flags through setupOIDCConfiguration into createOIDCConfig,
mirroring what #1470 did for AllowPrivateIP, and add a regression test that
checks the auth middleware parameters carry them.

Fixes #6522

Signed-off-by: 7487 <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: Alejandro Ponce de Leon <[email protected]>
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