Skip to content

protectedResourceAllowPrivateIP not propagated through MCPServer/MCPRemoteProxy runner path #4787

Closed

Description

@ChrisJBurns

Problem

The protectedResourceAllowPrivateIP CRD field exists on both MCPServer and MCPRemoteProxy but is silently dropped when building the runner configuration. The field is only effective for VirtualMCPServer (fixed in #4784).

Root Cause

runner.WithOIDCConfig() (pkg/runner/config_builder.go:438-451) only accepts a jwksAllowPrivateIP parameter. There is no protectedResourceAllowPrivateIP parameter, so the resolved value is never forwarded to the container's TokenValidatorConfig.

Affected call sites

  1. cmd/thv-operator/controllers/mcpserver_runconfig.go — calls runner.WithOIDCConfig(..., resolvedOIDCConfig.JWKSAllowPrivateIP, ...), never passes ProtectedResourceAllowPrivateIP
  2. cmd/thv-operator/controllers/mcpremoteproxy_runconfig.go — same omission
  3. cmd/thv-operator/pkg/controllerutil/oidc.go:38-51 (AddOIDCConfigOptions) — same omission

Design Consideration

Before fixing, consider whether protectedResourceAllowPrivateIP is semantically meaningful for MCPServer/MCPRemoteProxy:

  • MCPServer uses the runner/proxy model. The runner's TokenValidatorConfig.AllowPrivateIP controls JWKS/discovery fetches. MCPServer does not expose a protected resource metadata endpoint (RFC 9728) — that's a VirtualMCPServer concept.
  • If the field IS meaningful for MCPServer (e.g., for future protected resource metadata support), add a protectedResourceAllowPrivateIP parameter to runner.WithOIDCConfig() and update all call sites.
  • If the field is NOT meaningful for MCPServer, consider removing it from the InlineOIDCConfig type (MCPServer-specific) or adding a status condition warning that the field is ignored.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authenticationbugoperator

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions