You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add allowPrivateIP to MCPExternalAuthConfig upstream provider configs #4523
The embedded auth server performs private IP checks when connecting to upstream OIDC/OAuth2 providers. Currently there is no per-provider flag to allow private IPs, unlike MCPServer.spec.oidcConfig which has jwksAllowPrivateIP and protectedResourceAllowPrivateIP.
Users running local IDPs (e.g. Kanidm, Keycloak) on private/RFC1918 addresses in lab/homelab environments are blocked with no scoped workaround.
Current behavior
OIDCUpstreamConfig and OAuth2UpstreamConfig in MCPExternalAuthConfig do not expose an allowPrivateIP field. The only workaround is setting INSECURE_DISABLE_URL_VALIDATION=true on the pod, which globally disables all URL validation (private IPs + HTTPS checks).
Expected behavior
Add an allowPrivateIP field to OIDCUpstreamConfig and OAuth2UpstreamConfig so users can opt in to private IP connections on a per-provider basis, without disabling all URL validation globally.
This was closed as resolved by #5618, but #5618 implemented only the authserver-side half (it formally closes #5614): its changed files are pkg/authserver/config.go, pkg/authserver/upstream/{oauth2,oidc}.go, pkg/authserver/runner/embeddedauthserver.go, and the regenerated docs/server/* — nothing under cmd/thv-operator/. The CRD-level ask of this issue was never implemented and still reproduces on v0.42.1 and current main: OIDCUpstreamConfig/OAuth2UpstreamConfig carry no private-IP field, the controllerutil builders never set AllowPrivateIPs, and grep -rn AllowPrivateIPs cmd/thv-operator/ returns nothing at either version.
Observed effect on an operator-deployed gateway federating a self-hosted IdP that resolves to a private address — the AS exits fail-closed at OIDC discovery and the proxy pod crash-loops:
failed to create embedded auth server: ... failed to create upstream provider "idp":
failed to discover OIDC endpoints: Get "https://idp.internal.example/.well-known/openid-configuration":
dial tcp 10.0.0.5:443: the provided URL redirects to a private IP address, which is not allowed
type: oauth2 with explicit endpoints is not a workaround: the same host-scoped HTTP client gates the token exchange, so the failure just moves from startup to the first sign-in. Since #5618, everything below the operator already handles allow_private_ips end to end, so the operator layer is the only missing link.
Could this be reopened? I've opened #6288 wiring the field through the CRD (an allowPrivateIP opt-in on both upstream config types, following the jwksAllowPrivateIP naming precedent — the same shape #5784 discusses for remoteUrl).
Activity
tgrunnagle commentedon Jun 24, 2026
Closed by #5618
alex-feel commentedon Aug 12, 2026
This was closed as resolved by #5618, but #5618 implemented only the authserver-side half (it formally closes #5614): its changed files are
pkg/authserver/config.go,pkg/authserver/upstream/{oauth2,oidc}.go,pkg/authserver/runner/embeddedauthserver.go, and the regenerateddocs/server/*— nothing undercmd/thv-operator/. The CRD-level ask of this issue was never implemented and still reproduces on v0.42.1 and current main:OIDCUpstreamConfig/OAuth2UpstreamConfigcarry no private-IP field, thecontrollerutilbuilders never setAllowPrivateIPs, andgrep -rn AllowPrivateIPs cmd/thv-operator/returns nothing at either version.Observed effect on an operator-deployed gateway federating a self-hosted IdP that resolves to a private address — the AS exits fail-closed at OIDC discovery and the proxy pod crash-loops:
type: oauth2with explicit endpoints is not a workaround: the same host-scoped HTTP client gates the token exchange, so the failure just moves from startup to the first sign-in. Since #5618, everything below the operator already handlesallow_private_ipsend to end, so the operator layer is the only missing link.Could this be reopened? I've opened #6288 wiring the field through the CRD (an
allowPrivateIPopt-in on both upstream config types, following thejwksAllowPrivateIPnaming precedent — the same shape #5784 discusses forremoteUrl).fix: expose upstream provider allowPrivateIP in the operator CRD
fix: expose upstream provider allowPrivateIP in the operator CRD
fix: expose upstream provider allowPrivateIP in the operator CRD
test: cover OIDC upstream allowPrivateIPs in BuildAuthServerRunConfig
test: cover OIDC upstream allowPrivateIPs in BuildAuthServerRunConfig (…