@@ -427,26 +427,22 @@ at `authed_user.access_token`). Add a `tokenResponseMapping` block to the
427427# ## Incoming auth with the embedded auth server
428428
429429When using the embedded auth server, configure `incomingAuth` to validate the
430- JWTs it issues. The `issuer` must match `authServerConfig.issuer`. Note that
430+ JWTs it issues. Create an `MCPOIDCConfig` resource whose `issuer` matches
431+ ` authServerConfig.issuer` , then reference it with `oidcConfigRef`. Note that
431432`jwksAllowPrivateIP : true` is no longer needed when using the embedded auth
432433server because JWKS retrieval is done in-process.
433434
434435` ` ` yaml title="VirtualMCPServer resource"
435436spec:
436437 incomingAuth:
437438 type: oidc
438- resourceUrl: https://mcp.example.com/mcp
439- oidcConfig:
440- type: inline
441- inline:
442- issuer: https://auth.example.com
443- audience: https://mcp.example.com/mcp
439+ # highlight-start
440+ oidcConfigRef:
441+ name: my-oidc-config
442+ audience: https://mcp.example.com/mcp
443+ # highlight-end
444444` ` `
445445
446- The `resourceUrl` is the externally reachable URL of the MCP endpoint. MCP
447- clients use this for [RFC 9728](https://datatracker.ietf.org/doc/html/rfc9728)
448- protected resource metadata discovery to find the authorization server.
449-
450446# ## Session storage
451447
452448By default, upstream tokens are stored in memory and lost on pod restart. For
@@ -468,7 +464,7 @@ provider credentials following the steps in
468464You need : ` auth-signing-key` , `auth-hmac-key`, `github-client-secret`, and
469465` google-client-secret` .
470466
471- **Step 1:** Create an MCPGroup and deploy the backend MCP server:
467+ **Step 1:** Create an MCPGroup, OIDC config, and deploy the backend MCP server:
472468
473469` ` ` yaml title="backends.yaml"
474470apiVersion: toolhive.stacklok.dev/v1alpha1
@@ -477,6 +473,18 @@ metadata:
477473 name: my-backends
478474 namespace: toolhive-system
479475---
476+ # highlight-start
477+ apiVersion: toolhive.stacklok.dev/v1alpha1
478+ kind: MCPOIDCConfig
479+ metadata:
480+ name: my-oidc-config
481+ namespace: toolhive-system
482+ spec:
483+ type: inline
484+ inline:
485+ issuer: https://auth.example.com
486+ # highlight-end
487+ ---
480488apiVersion: toolhive.stacklok.dev/v1alpha1
481489kind: MCPServer
482490metadata:
@@ -485,7 +493,10 @@ metadata:
485493spec:
486494 image: ghcr.io/github/github-mcp-server
487495 transport: streamable-http
488- groupRef: my-backends
496+ # highlight-start
497+ groupRef:
498+ name: my-backends
499+ # highlight-end
489500` ` `
490501
491502**Step 2:** Create the upstream token injection config:
@@ -567,12 +578,11 @@ spec:
567578 # highlight-end
568579 incomingAuth:
569580 type: oidc
570- resourceUrl: https://mcp.example.com/mcp
571- oidcConfig:
572- type: inline
573- inline:
574- issuer: https://auth.example.com
575- audience: https://mcp.example.com/mcp
581+ # highlight-start
582+ oidcConfigRef:
583+ name: my-oidc-config
584+ audience: https://mcp.example.com/mcp
585+ # highlight-end
576586 outgoingAuth:
577587 source: inline
578588 backends:
0 commit comments