From 01eb070eef0818f9fb1712c7155044c2a6e3df89 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2026 21:00:11 +0000 Subject: [PATCH 1/3] Update stacklok/toolhive to v0.67.0 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/upstream-projects.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/upstream-projects.yaml b/.github/upstream-projects.yaml index a318eb814..ca789324a 100644 --- a/.github/upstream-projects.yaml +++ b/.github/upstream-projects.yaml @@ -64,7 +64,7 @@ projects: - id: toolhive repo: stacklok/toolhive - version: v0.66.0 + version: v0.67.0 # toolhive is a monorepo covering the CLI, the Kubernetes # operator, and the vMCP gateway. It also introduces cross- # cutting features that land in concepts/, integrations/, From 542f291e270c65aec2e987e699a437d1d04bfc6c Mon Sep 17 00:00:00 2001 From: "stacklok-octosts[bot]" <327033170+stacklok-octosts[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2026 21:01:23 +0000 Subject: [PATCH 2/3] Refresh reference assets for toolhive v0.67.0 --- docs/toolhive/reference/cli/thv_run.md | 6 +- .../toolhive/reference/helm/operator-crds.mdx | 6 +- docs/toolhive/reference/helm/operator.mdx | 18 ++--- static/api-specs/toolhive-api.yaml | 79 ++++++++++++++++--- .../mcpexternalauthconfigs.schema.json | 53 ++++++++++--- .../mcpremoteproxies.schema.json | 2 +- .../virtualmcpservers.schema.json | 53 ++++++++++--- 7 files changed, 171 insertions(+), 46 deletions(-) diff --git a/docs/toolhive/reference/cli/thv_run.md b/docs/toolhive/reference/cli/thv_run.md index 61bd5319f..727fd1bab 100644 --- a/docs/toolhive/reference/cli/thv_run.md +++ b/docs/toolhive/reference/cli/thv_run.md @@ -42,7 +42,9 @@ ToolHive supports five ways to run an MCP server: Automatically generates a container that runs the specified package using either uvx (Python with uv package manager), npx (Node.js), or go (Golang). For Go, you can also specify local paths starting - with './' or '../' to build and run local Go projects. + with './' or '../' to build and run local Go projects. Without + --transport or a registry entry, uvx:// packages use the stdio + transport, unless --target-port or --stateless is set. 4. From an exported configuration: @@ -200,7 +202,7 @@ thv run [flags] SERVER_OR_IMAGE_OR_PROTOCOL [-- ARGS...] --token-exchange-url string OAuth 2.0 token exchange endpoint URL (enables token exchange when provided) --tools stringArray Filter MCP server tools (comma-separated list of tool names) --tools-override string Path to a JSON file containing overrides for MCP server tools names and descriptions - --transport string Transport mode (sse, streamable-http or stdio) + --transport string Transport mode (sse, streamable-http or stdio); defaults to the registry's transport, else stdio for uvx:// packages (unless --target-port or --stateless is set), else streamable-http --trust-proxy-headers[=true|false] Trust X-Forwarded-* headers from reverse proxies (X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Prefix) (default false) -v, --volume stringArray Mount a volume into the container (format: host-path:container-path[:ro]) --webhook-config stringArray Path to webhook configuration file (can be specified multiple times to merge configs) diff --git a/docs/toolhive/reference/helm/operator-crds.mdx b/docs/toolhive/reference/helm/operator-crds.mdx index 0bf680108..4fd82eece 100644 --- a/docs/toolhive/reference/helm/operator-crds.mdx +++ b/docs/toolhive/reference/helm/operator-crds.mdx @@ -11,9 +11,9 @@ Control CRD installation and preservation with these Helm values. This reference lists values declared in the chart's default `values.yaml`. Templates can also accept optional settings and inherited `global` values. -Chart: `toolhive-operator-crds`. Chart version: `0.66.0`. Source: -[`values.yaml`](https://github.com/stacklok/toolhive/blob/v0.66.0/deploy/charts/operator-crds/values.yaml) -at `v0.66.0`. +Chart: `toolhive-operator-crds`. Chart version: `0.67.0`. Source: +[`values.yaml`](https://github.com/stacklok/toolhive/blob/v0.67.0/deploy/charts/operator-crds/values.yaml) +at `v0.67.0`. ## Values diff --git a/docs/toolhive/reference/helm/operator.mdx b/docs/toolhive/reference/helm/operator.mdx index b53daa705..cb0020171 100644 --- a/docs/toolhive/reference/helm/operator.mdx +++ b/docs/toolhive/reference/helm/operator.mdx @@ -10,9 +10,9 @@ Configure the ToolHive operator with these Helm values. This reference lists values declared in the chart's default `values.yaml`. Templates can also accept optional settings and inherited `global` values. -Chart: `toolhive-operator`. Chart version: `0.66.0`. Source: -[`values.yaml`](https://github.com/stacklok/toolhive/blob/v0.66.0/deploy/charts/operator/values.yaml) -at `v0.66.0`. +Chart: `toolhive-operator`. Chart version: `0.67.0`. Source: +[`values.yaml`](https://github.com/stacklok/toolhive/blob/v0.67.0/deploy/charts/operator/values.yaml) +at `v0.67.0`. ## Values @@ -73,7 +73,7 @@ features: gc: gogc: 75 gomemlimit: 110MiB -image: ghcr.io/stacklok/toolhive/operator:v0.66.0 +image: ghcr.io/stacklok/toolhive/operator:v0.67.0 imageDiscovery: enabled: false resources: {} @@ -158,8 +158,8 @@ serviceAccount: labels: {} name: toolhive-operator tolerations: [] -toolhiveRunnerImage: ghcr.io/stacklok/toolhive/proxyrunner:v0.66.0 -vmcpImage: ghcr.io/stacklok/toolhive/vmcp:v0.66.0 +toolhiveRunnerImage: ghcr.io/stacklok/toolhive/proxyrunner:v0.67.0 +vmcpImage: ghcr.io/stacklok/toolhive/vmcp:v0.67.0 volumeMounts: [] volumes: [] ``` @@ -318,7 +318,7 @@ Key containing the PEM-encoded CA certificate in the Secret. **Type:** `string` -**Default:** `"ghcr.io/stacklok/toolhive/operator:v0.66.0"` +**Default:** `"ghcr.io/stacklok/toolhive/operator:v0.67.0"` Container image for the operator. @@ -334,7 +334,7 @@ Image pull policy for the operator container and image-discovery containers. **Type:** `string` -**Default:** `"ghcr.io/stacklok/toolhive/proxyrunner:v0.66.0"` +**Default:** `"ghcr.io/stacklok/toolhive/proxyrunner:v0.67.0"` Container image for ToolHive proxy runners created by the operator. @@ -342,7 +342,7 @@ Container image for ToolHive proxy runners created by the operator. **Type:** `string` -**Default:** `"ghcr.io/stacklok/toolhive/vmcp:v0.66.0"` +**Default:** `"ghcr.io/stacklok/toolhive/vmcp:v0.67.0"` Container image for Virtual MCP Server (vMCP) deployments created by the operator. diff --git a/static/api-specs/toolhive-api.yaml b/static/api-specs/toolhive-api.yaml index d6c484270..de4e4393f 100644 --- a/static/api-specs/toolhive-api.yaml +++ b/static/api-specs/toolhive-api.yaml @@ -160,6 +160,23 @@ components: ClientSecretFile / ClientSecretEnvVar, and ClientID must be left empty. Mutually exclusive with ClientID. properties: + client_name: + description: |- + ClientName is the optional RFC 7591 "client_name" registration metadata + sent when ToolHive registers with the upstream. When empty, ToolHive + registers as "ToolHive MCP Client". It is display-only metadata: the + upstream shows it on its authorization screen, and it is never used as + a key. It is capped at 256 characters, matching the client_name bound + the authserver enforces on inbound registrations. Names with leading + or trailing whitespace, or containing control or format characters, + are rejected. + + Changing it does not rename an already-registered client: the cached + registration is keyed without the client name, so the new value applies + only the next time ToolHive registers a fresh client — for example + after rotating via RotationKey, or when the upstream rejects the cached + registration. + type: string discovery_url: description: |- DiscoveryURL is the exact RFC 8414 / OIDC Discovery document URL to @@ -1062,10 +1079,9 @@ components: properties: audiences: description: |- - Audiences are RFC 8693 token audiences this association may request. - This is an independent request dimension from Resources: it is not - bounded by allowed_audiences (which is an RFC 8707 resource-URI list) - and may contain non-URI logical audience identifiers. + Audiences is deprecated and ignored; use Resources. It stays in the + schema because v0.65.0 required it, and a warning is logged at startup + when it is set. items: type: string type: array @@ -1096,11 +1112,12 @@ components: resources: description: |- Resources are RFC 8707 resource indicators this association may - request. Must be a subset of the server's allowed_audiences allowlist - (RunConfig.AllowedAudiences) — the same RFC 8707 resource-URI list - DelegateClientRunConfig.Audiences is validated against. Distinct from - Audiences: a resource permission does not imply the same value is also - a permitted token audience, or vice versa. + request. At least one is required for every association: both + client_credentials and token exchange take exactly one resource per + request and grant it as the token audience. Must be a subset of the + server's allowed_audiences allowlist (RunConfig.AllowedAudiences) — the + same RFC 8707 resource-URI list DelegateClientRunConfig.Audiences is + validated against. items: type: string type: array @@ -2013,6 +2030,14 @@ components: type: string type: array uniqueItems: false + findings: + description: |- + Findings lists every error and warning with its rule ID and location. + Each Errors or Warnings entry corresponds to exactly one finding. + items: + $ref: '#/components/schemas/github_com_stacklok_toolhive_pkg_skills.Finding' + type: array + uniqueItems: false valid: description: Valid indicates whether the skill definition is valid. type: boolean @@ -2475,6 +2500,25 @@ components: - FailureReasonKeySigned - FailureReasonUnsignedRejected - FailureReasonUnknown + github_com_stacklok_toolhive_pkg_skills.Finding: + properties: + file: + description: |- + File is the slash-separated path of the affected file, relative to the + validated directory. + type: string + line: + description: Line is the 1-based line in File, or 0 when unknown. + type: integer + message: + description: Message describes the problem. + type: string + rule: + description: Rule is the stable ID of the check that produced the finding. + type: string + severity: + $ref: '#/components/schemas/github_com_stacklok_toolhive_pkg_skills.Severity' + type: object github_com_stacklok_toolhive_pkg_skills.InstallStatus: description: Status is the current installation status. enum: @@ -2607,6 +2651,15 @@ components: x-enum-varnames: - ScopeUser - ScopeProject + github_com_stacklok_toolhive_pkg_skills.Severity: + description: Severity is "error" or "warning". + enum: + - error + - warning + type: string + x-enum-varnames: + - SeverityError + - SeverityWarning github_com_stacklok_toolhive_pkg_skills.SkillContent: properties: body: @@ -2824,6 +2877,14 @@ components: type: string type: array uniqueItems: false + findings: + description: |- + Findings lists every error and warning with its rule ID and location. + Each Errors or Warnings entry corresponds to exactly one finding. + items: + $ref: '#/components/schemas/github_com_stacklok_toolhive_pkg_skills.Finding' + type: array + uniqueItems: false valid: description: Valid indicates whether the skill definition is valid. type: boolean diff --git a/static/api-specs/toolhive-crds/mcpexternalauthconfigs.schema.json b/static/api-specs/toolhive-crds/mcpexternalauthconfigs.schema.json index 86899f647..31af9ad55 100644 --- a/static/api-specs/toolhive-crds/mcpexternalauthconfigs.schema.json +++ b/static/api-specs/toolhive-crds/mcpexternalauthconfigs.schema.json @@ -385,17 +385,16 @@ "spiffeClientAuth": { "description": "SPIFFEClientAuth associates SPIFFE principal patterns with explicit\nOAuth client identities and permissions. A sibling of TokenExchange and\nJWTBearer below, not nested under either: client authentication does\nnot by itself confer a grant. See SPIFFEClientConfig.", "items": { - "description": "SPIFFEClientConfig associates one SPIFFE principal pattern from a declared\ntrust domain with an explicit OAuth client identity and permissions.\nDeclaring a client does not grant access by itself. SPIFFE clients\nauthenticate with a JWT-SVID or an X.509-SVID and have no client secret.\nTrust material comes from the declared bundle source (see\nSPIFFETrustDomainConfig's doc comment).\n\nGrantTypes is deliberately not exposed here: the runtime only accepts\nexactly the RFC 8693 token-exchange grant for a SPIFFE client\n(validateSPIFFEGrants in pkg/authserver/spiffe_trust.go), so the converter\nalways supplies it instead of letting it be configured.", + "description": "SPIFFEClientConfig associates one SPIFFE principal pattern from a declared\ntrust domain with an explicit OAuth client identity and permissions.\nDeclaring a client does not grant access by itself. SPIFFE clients\nauthenticate with a JWT-SVID or an X.509-SVID and have no client secret.\nTrust material comes from the declared bundle source (see\nSPIFFETrustDomainConfig's doc comment).", "properties": { "audiences": { - "description": "Audiences are RFC 8693 token audiences this association may request.", + "description": "Deprecated: ignored; use resources.\n\nThe field was required in earlier releases and is still accepted so\nexisting objects keep validating. A non-empty value is reported by the\nDeprecatedInboundGrantConfiguration condition and has no effect on token\ntargeting.", "items": { "maxLength": 2048, "minLength": 1, "type": "string" }, "maxItems": 50, - "minItems": 1, "type": "array", "x-kubernetes-list-type": "set" }, @@ -405,6 +404,23 @@ "minLength": 1, "type": "string" }, + "grantTypes": { + "default": [ + "urn:ietf:params:oauth:grant-type:token-exchange" + ], + "description": "GrantTypes contains the OAuth grants permitted for this association.\nIt defaults to the token-exchange grant when omitted, which is what the\noperator configured before this field existed. List client_credentials\nto opt in to the SPIFFE-bound client credentials grant. The list alone\ndecides which grants the association may use: client authentication does\nnot confer any grant, and there is no separate per-grant enable switch.\nUse urn:ietf:params:oauth:grant-type:token-exchange for RFC 8693 token\nexchange.", + "items": { + "enum": [ + "client_credentials", + "urn:ietf:params:oauth:grant-type:token-exchange" + ], + "type": "string" + }, + "maxItems": 2, + "minItems": 1, + "type": "array", + "x-kubernetes-list-type": "set" + }, "methods": { "description": "Methods are the credential types this association may authenticate\nwith. Must be a subset of the referenced trust domain's methods.", "items": { @@ -427,7 +443,7 @@ "type": "string" }, "resources": { - "description": "Resources are RFC 8707 resource indicators this association may\nrequest. Must be a subset of the server's allowed_audiences allowlist,\nwhich is derived at reconcile time and not available on this CRD, so\nallowlist membership is validated at reconcile time, not admission.\nShape (a well-formed absolute HTTP(S) URI) is independent of that\nderived allowlist and is validated here. Distinct from Audiences: a\nresource permission does not imply the same value is also a permitted\ntoken audience, or vice versa.", + "description": "Resources are RFC 8707 resource indicators this association may\nrequest. Must be a subset of the server's allowed_audiences allowlist,\nwhich is derived at reconcile time and not available on this CRD, so\nallowlist membership is validated at reconcile time, not admission.\nShape (a well-formed absolute HTTP(S) URI) is independent of that\nderived allowlist and is validated here. Required, with at least one\nentry, for every association: client_credentials and token exchange each\ntake exactly one resource per request and grant it as the token\naudience.", "items": { "maxLength": 2048, "minLength": 1, @@ -458,7 +474,6 @@ } }, "required": [ - "audiences", "clientId", "methods", "principalPattern", @@ -470,6 +485,10 @@ { "message": "principalPattern path must not contain . or .. segments", "rule": "self.principalPattern.split('/').all(segment, segment != '.' && segment != '..')" + }, + { + "message": "resources is required", + "rule": "has(self.resources) && size(self.resources) > 0" } ] }, @@ -636,12 +655,12 @@ }, "insecureAllowConfidentialOverLoopbackHTTP": { "default": false, - "description": "InsecureAllowConfidentialOverLoopbackHTTP opts in to confidential\nDynamic Client Registration (DCR) and delegate clients when issuer is a\nplain-HTTP loopback URL (e.g. \"http://localhost:8080\"). Without this\nflag, that combination is rejected at reconcile time: a loopback http://\nissuer is normally fine for local development since the traffic never\nleaves the machine, but confidential clients send secrets over cleartext.\nForcing TLS onto every loopback deployment instead would just push\noperators toward insecureAllowHTTP, which is worse: that also disables\nthe non-loopback host check. Has no effect when there are no confidential\nclients or issuer is https.\n\nprivate_key_jwt registration has no equivalent flag or transport\nrestriction: unlike confidential registration, it never returns a\nclient_secret (or any other secret) in the DCR response, so there is\nnothing here for cleartext HTTP to expose.", + "description": "InsecureAllowConfidentialOverLoopbackHTTP opts in to confidential\nDynamic Client Registration (DCR), delegate clients and SPIFFE\nassociations that have spiffe_jwt in methods and client_credentials in\ngrantTypes on the same association, when issuer is a plain-HTTP loopback\nURL (e.g. \"http://localhost:8080\"). Without this\nflag, that combination is rejected at admission, and reconcile additionally\nrequires the issuer host to be loopback. A loopback http://\nissuer is normally fine for local development since the traffic never\nleaves the machine, but confidential clients send secrets over cleartext.\nForcing TLS onto every loopback deployment instead would just push\noperators toward insecureAllowHTTP, which is worse: that also disables\nthe non-loopback host check. Has no effect when there are no confidential\nclients or issuer is https.\n\nprivate_key_jwt registration has no equivalent flag or transport\nrestriction: unlike confidential registration, it never returns a\nclient_secret (or any other secret) in the DCR response, so there is\nnothing here for cleartext HTTP to expose.", "type": "boolean" }, "insecureAllowHTTP": { "default": false, - "description": "InsecureAllowHTTP permits an http:// issuer URL for non-localhost hosts.\nOnly set this for in-cluster Kubernetes deployments where traffic between\npods traverses a trusted network (e.g. the in-cluster service mesh).\nProduction deployments reachable outside the cluster MUST use https://.\n\nOn VirtualMCPServer: when false (the default), http:// issuers for non-localhost\nhosts are rejected at reconcile time with an AuthServerConfigValidated=False condition.\n\nOn MCPServer and MCPRemoteProxy (via MCPExternalAuthConfig): this field is\nstructurally present but enforcement is deferred to pod startup via Config.Validate();\na misconfigured issuer will cause the pod to crash at startup rather than surface\nas an operator condition.\n\nOne combination is rejected at admission on all three CRDs regardless of the\nabove: setting this field alongside confidential client registration or\ndelegate clients, which would issue or use client secrets in cleartext over\nan unauthenticated endpoint (see the XValidation rule on\nEmbeddedAuthServerConfig).", + "description": "InsecureAllowHTTP permits an http:// issuer URL for non-localhost hosts.\nOnly set this for in-cluster Kubernetes deployments where traffic between\npods traverses a trusted network (e.g. the in-cluster service mesh).\nProduction deployments reachable outside the cluster MUST use https://.\n\nOn VirtualMCPServer: when false (the default), http:// issuers for non-localhost\nhosts are rejected at reconcile time with an AuthServerConfigValidated=False condition.\n\nOn MCPServer and MCPRemoteProxy (via MCPExternalAuthConfig): this field is\nstructurally present but enforcement is deferred to pod startup via Config.Validate();\na misconfigured issuer will cause the pod to crash at startup rather than surface\nas an operator condition.\n\nOne combination is rejected at admission on all three CRDs regardless of the\nabove: setting this field alongside confidential client registration or\ndelegate clients, or a SPIFFE association that has spiffe_jwt in methods and\nclient_credentials in grantTypes on the same association, which would issue\nor use client secrets or JWT-SVIDs in cleartext over an unauthenticated\nendpoint (see the XValidation rule on\nEmbeddedAuthServerConfig).", "type": "boolean" }, "issuer": { @@ -1444,6 +1463,12 @@ "dcrConfig": { "description": "DCRConfig enables RFC 7591 Dynamic Client Registration against the upstream\nauthorization server. When set, the client credentials are obtained at\nruntime rather than being pre-provisioned, and ClientID must be left empty.\nMutually exclusive with ClientID.", "properties": { + "clientName": { + "description": "ClientName is the optional RFC 7591 \"client_name\" registration metadata\nsent when ToolHive registers with the upstream. When empty, ToolHive\nregisters as \"ToolHive MCP Client\". It is display-only metadata: the\nupstream shows it on its authorization screen, and it is never used as\na key. Changing it does not rename an already-registered client; the\nnew value applies only the next time ToolHive registers a fresh client,\nfor example after rotating via RotationKey, or when the upstream\nrejects the cached registration. Names with leading or trailing\nwhitespace, or containing control or format characters, are rejected.", + "maxLength": 256, + "pattern": "^[^\\p{Cc}\\p{Cf}\\p{Z}]([^\\p{Cc}\\p{Cf}]*[^\\p{Cc}\\p{Cf}\\p{Z}])?$", + "type": "string" + }, "discoveryUrl": { "description": "DiscoveryURL is the RFC 8414 / OIDC Discovery document URL. The resolver\nissues a single GET against this URL (no well-known-path fallback) and\nreads registration_endpoint, authorization_endpoint, token_endpoint,\ntoken_endpoint_auth_methods_supported, and scopes_supported from the\nresponse.\nMutually exclusive with RegistrationEndpoint.\nHTTPS is required because the registration endpoint resolved from this\ndocument carries the initial access token and the issued client_secret\n(RFC 7591 §3, RFC 8414 §3). MaxLength is a defensive size cap (etcd\nobject budget, regex evaluation cost) and matches the conventional URL\nlength cap.", "maxLength": 2048, @@ -1769,6 +1794,12 @@ "dcrConfig": { "description": "DCRConfig enables RFC 7591 Dynamic Client Registration. When set, ClientID\nand ClientSecretRef must be omitted. If neither discoveryUrl nor\nregistrationEndpoint is set, discovery is derived from issuerUrl.", "properties": { + "clientName": { + "description": "ClientName is the optional RFC 7591 \"client_name\" registration metadata\nsent when ToolHive registers with the upstream. When empty, ToolHive\nregisters as \"ToolHive MCP Client\". It is display-only metadata: the\nupstream shows it on its authorization screen, and it is never used as\na key. Changing it does not rename an already-registered client; the\nnew value applies only the next time ToolHive registers a fresh client,\nfor example after rotating via RotationKey, or when the upstream\nrejects the cached registration. Names with leading or trailing\nwhitespace, or containing control or format characters, are rejected.", + "maxLength": 256, + "pattern": "^[^\\p{Cc}\\p{Cf}\\p{Z}]([^\\p{Cc}\\p{Cf}]*[^\\p{Cc}\\p{Cf}\\p{Z}])?$", + "type": "string" + }, "discoveryUrl": { "description": "DiscoveryURL is the RFC 8414 / OIDC Discovery document URL. The resolver\nissues a single GET against this URL (no well-known-path fallback) and\nreads registration_endpoint, authorization_endpoint, token_endpoint,\ntoken_endpoint_auth_methods_supported, and scopes_supported from the\nresponse.\nMutually exclusive with RegistrationEndpoint.\nHTTPS is required because the registration endpoint resolved from this\ndocument carries the initial access token and the issued client_secret\n(RFC 7591 §3, RFC 8414 §3). MaxLength is a defensive size cap (etcd\nobject budget, regex evaluation cost) and matches the conventional URL\nlength cap.", "maxLength": 2048, @@ -2032,16 +2063,16 @@ "rule": "!has(self.inboundGrants) || !has(self.inboundGrants.spiffeClientAuth) || self.inboundGrants.spiffeClientAuth.all(client, !client.clientId.matches('^[A-Za-z][A-Za-z0-9+.-]*://.+'))" }, { - "message": "insecureAllowHTTP cannot be combined with confidential client registration or delegateClients; client secrets would be issued or used in cleartext over an unauthenticated endpoint", - "rule": "!(has(self.insecureAllowHTTP) && self.insecureAllowHTTP && ((has(self.allowConfidentialClientRegistration) && self.allowConfidentialClientRegistration) || (has(self.delegateClients) && size(self.delegateClients) > 0) || (has(self.inboundGrants) && has(self.inboundGrants.tokenExchange) && has(self.inboundGrants.tokenExchange.delegateClients) && size(self.inboundGrants.tokenExchange.delegateClients) > 0)))" + "message": "insecureAllowHTTP cannot be combined with confidential client registration, delegateClients or JWT-SVID SPIFFE associations that grant client_credentials; client secrets or JWT-SVIDs would be issued or used in cleartext over an unauthenticated endpoint", + "rule": "!(has(self.insecureAllowHTTP) && self.insecureAllowHTTP && ((has(self.allowConfidentialClientRegistration) && self.allowConfidentialClientRegistration) || (has(self.delegateClients) && size(self.delegateClients) > 0) || (has(self.inboundGrants) && has(self.inboundGrants.tokenExchange) && has(self.inboundGrants.tokenExchange.delegateClients) && size(self.inboundGrants.tokenExchange.delegateClients) > 0) || (has(self.inboundGrants) && has(self.inboundGrants.spiffeClientAuth) && self.inboundGrants.spiffeClientAuth.exists(a, 'spiffe_jwt' in a.methods && has(a.grantTypes) && 'client_credentials' in a.grantTypes))))" }, { "message": "forceConfidentialRedirectUris requires allowConfidentialClientRegistration to be true", "rule": "(!has(self.forceConfidentialRedirectUris) || size(self.forceConfidentialRedirectUris) == 0) || (has(self.allowConfidentialClientRegistration) && self.allowConfidentialClientRegistration)" }, { - "message": "confidential client registration or delegateClients with an HTTP issuer require insecureAllowConfidentialOverLoopbackHTTP to be explicitly enabled; the issuer must still be loopback", - "rule": "!self.issuer.startsWith('http://') || (has(self.insecureAllowConfidentialOverLoopbackHTTP) && self.insecureAllowConfidentialOverLoopbackHTTP) || ((!has(self.allowConfidentialClientRegistration) || !self.allowConfidentialClientRegistration) && (!has(self.delegateClients) || size(self.delegateClients) == 0) && (!has(self.inboundGrants) || !has(self.inboundGrants.tokenExchange) || !has(self.inboundGrants.tokenExchange.delegateClients) || size(self.inboundGrants.tokenExchange.delegateClients) == 0))" + "message": "confidential client registration, delegateClients or JWT-SVID SPIFFE associations that grant client_credentials with an HTTP issuer require insecureAllowConfidentialOverLoopbackHTTP to be explicitly enabled; the issuer must still be loopback", + "rule": "!self.issuer.startsWith('http://') || (has(self.insecureAllowConfidentialOverLoopbackHTTP) && self.insecureAllowConfidentialOverLoopbackHTTP) || ((!has(self.allowConfidentialClientRegistration) || !self.allowConfidentialClientRegistration) && (!has(self.delegateClients) || size(self.delegateClients) == 0) && (!has(self.inboundGrants) || !has(self.inboundGrants.tokenExchange) || !has(self.inboundGrants.tokenExchange.delegateClients) || size(self.inboundGrants.tokenExchange.delegateClients) == 0) && !(has(self.inboundGrants) && has(self.inboundGrants.spiffeClientAuth) && self.inboundGrants.spiffeClientAuth.exists(a, 'spiffe_jwt' in a.methods && has(a.grantTypes) && 'client_credentials' in a.grantTypes)))" }, { "message": "canonical tokenExchange conflicts with legacy delegateClients or RFC 8693 trusted issuer policy", diff --git a/static/api-specs/toolhive-crds/mcpremoteproxies.schema.json b/static/api-specs/toolhive-crds/mcpremoteproxies.schema.json index bc6eb6051..e4b6d6b4b 100644 --- a/static/api-specs/toolhive-crds/mcpremoteproxies.schema.json +++ b/static/api-specs/toolhive-crds/mcpremoteproxies.schema.json @@ -1206,7 +1206,7 @@ "type": "object" }, "resources": { - "description": "Resources defines the resource requirements for the proxy container", + "description": "Resources defines the resource requirements for the proxy container.\nUnset fields fall back to defaults: requests of 50m CPU and 64Mi memory,\nlimits of 200m CPU and 256Mi memory. Resources set on the \"toolhive\"\ncontainer through podTemplateSpec take precedence over this field.\nA limit set without a request, here or in podTemplateSpec, drops the\ndefault request so Kubernetes copies the limit into the request as usual.\nA request set without a limit raises the default limit to match if the\nrequest is above it. Requests and limits the user sets explicitly are used as given.", "properties": { "limits": { "description": "Limits describes the maximum amount of compute resources allowed", diff --git a/static/api-specs/toolhive-crds/virtualmcpservers.schema.json b/static/api-specs/toolhive-crds/virtualmcpservers.schema.json index 47e125152..ae86f2d5e 100644 --- a/static/api-specs/toolhive-crds/virtualmcpservers.schema.json +++ b/static/api-specs/toolhive-crds/virtualmcpservers.schema.json @@ -276,17 +276,16 @@ "spiffeClientAuth": { "description": "SPIFFEClientAuth associates SPIFFE principal patterns with explicit\nOAuth client identities and permissions. A sibling of TokenExchange and\nJWTBearer below, not nested under either: client authentication does\nnot by itself confer a grant. See SPIFFEClientConfig.", "items": { - "description": "SPIFFEClientConfig associates one SPIFFE principal pattern from a declared\ntrust domain with an explicit OAuth client identity and permissions.\nDeclaring a client does not grant access by itself. SPIFFE clients\nauthenticate with a JWT-SVID or an X.509-SVID and have no client secret.\nTrust material comes from the declared bundle source (see\nSPIFFETrustDomainConfig's doc comment).\n\nGrantTypes is deliberately not exposed here: the runtime only accepts\nexactly the RFC 8693 token-exchange grant for a SPIFFE client\n(validateSPIFFEGrants in pkg/authserver/spiffe_trust.go), so the converter\nalways supplies it instead of letting it be configured.", + "description": "SPIFFEClientConfig associates one SPIFFE principal pattern from a declared\ntrust domain with an explicit OAuth client identity and permissions.\nDeclaring a client does not grant access by itself. SPIFFE clients\nauthenticate with a JWT-SVID or an X.509-SVID and have no client secret.\nTrust material comes from the declared bundle source (see\nSPIFFETrustDomainConfig's doc comment).", "properties": { "audiences": { - "description": "Audiences are RFC 8693 token audiences this association may request.", + "description": "Deprecated: ignored; use resources.\n\nThe field was required in earlier releases and is still accepted so\nexisting objects keep validating. A non-empty value is reported by the\nDeprecatedInboundGrantConfiguration condition and has no effect on token\ntargeting.", "items": { "maxLength": 2048, "minLength": 1, "type": "string" }, "maxItems": 50, - "minItems": 1, "type": "array", "x-kubernetes-list-type": "set" }, @@ -296,6 +295,23 @@ "minLength": 1, "type": "string" }, + "grantTypes": { + "default": [ + "urn:ietf:params:oauth:grant-type:token-exchange" + ], + "description": "GrantTypes contains the OAuth grants permitted for this association.\nIt defaults to the token-exchange grant when omitted, which is what the\noperator configured before this field existed. List client_credentials\nto opt in to the SPIFFE-bound client credentials grant. The list alone\ndecides which grants the association may use: client authentication does\nnot confer any grant, and there is no separate per-grant enable switch.\nUse urn:ietf:params:oauth:grant-type:token-exchange for RFC 8693 token\nexchange.", + "items": { + "enum": [ + "client_credentials", + "urn:ietf:params:oauth:grant-type:token-exchange" + ], + "type": "string" + }, + "maxItems": 2, + "minItems": 1, + "type": "array", + "x-kubernetes-list-type": "set" + }, "methods": { "description": "Methods are the credential types this association may authenticate\nwith. Must be a subset of the referenced trust domain's methods.", "items": { @@ -318,7 +334,7 @@ "type": "string" }, "resources": { - "description": "Resources are RFC 8707 resource indicators this association may\nrequest. Must be a subset of the server's allowed_audiences allowlist,\nwhich is derived at reconcile time and not available on this CRD, so\nallowlist membership is validated at reconcile time, not admission.\nShape (a well-formed absolute HTTP(S) URI) is independent of that\nderived allowlist and is validated here. Distinct from Audiences: a\nresource permission does not imply the same value is also a permitted\ntoken audience, or vice versa.", + "description": "Resources are RFC 8707 resource indicators this association may\nrequest. Must be a subset of the server's allowed_audiences allowlist,\nwhich is derived at reconcile time and not available on this CRD, so\nallowlist membership is validated at reconcile time, not admission.\nShape (a well-formed absolute HTTP(S) URI) is independent of that\nderived allowlist and is validated here. Required, with at least one\nentry, for every association: client_credentials and token exchange each\ntake exactly one resource per request and grant it as the token\naudience.", "items": { "maxLength": 2048, "minLength": 1, @@ -349,7 +365,6 @@ } }, "required": [ - "audiences", "clientId", "methods", "principalPattern", @@ -361,6 +376,10 @@ { "message": "principalPattern path must not contain . or .. segments", "rule": "self.principalPattern.split('/').all(segment, segment != '.' && segment != '..')" + }, + { + "message": "resources is required", + "rule": "has(self.resources) && size(self.resources) > 0" } ] }, @@ -527,12 +546,12 @@ }, "insecureAllowConfidentialOverLoopbackHTTP": { "default": false, - "description": "InsecureAllowConfidentialOverLoopbackHTTP opts in to confidential\nDynamic Client Registration (DCR) and delegate clients when issuer is a\nplain-HTTP loopback URL (e.g. \"http://localhost:8080\"). Without this\nflag, that combination is rejected at reconcile time: a loopback http://\nissuer is normally fine for local development since the traffic never\nleaves the machine, but confidential clients send secrets over cleartext.\nForcing TLS onto every loopback deployment instead would just push\noperators toward insecureAllowHTTP, which is worse: that also disables\nthe non-loopback host check. Has no effect when there are no confidential\nclients or issuer is https.\n\nprivate_key_jwt registration has no equivalent flag or transport\nrestriction: unlike confidential registration, it never returns a\nclient_secret (or any other secret) in the DCR response, so there is\nnothing here for cleartext HTTP to expose.", + "description": "InsecureAllowConfidentialOverLoopbackHTTP opts in to confidential\nDynamic Client Registration (DCR), delegate clients and SPIFFE\nassociations that have spiffe_jwt in methods and client_credentials in\ngrantTypes on the same association, when issuer is a plain-HTTP loopback\nURL (e.g. \"http://localhost:8080\"). Without this\nflag, that combination is rejected at admission, and reconcile additionally\nrequires the issuer host to be loopback. A loopback http://\nissuer is normally fine for local development since the traffic never\nleaves the machine, but confidential clients send secrets over cleartext.\nForcing TLS onto every loopback deployment instead would just push\noperators toward insecureAllowHTTP, which is worse: that also disables\nthe non-loopback host check. Has no effect when there are no confidential\nclients or issuer is https.\n\nprivate_key_jwt registration has no equivalent flag or transport\nrestriction: unlike confidential registration, it never returns a\nclient_secret (or any other secret) in the DCR response, so there is\nnothing here for cleartext HTTP to expose.", "type": "boolean" }, "insecureAllowHTTP": { "default": false, - "description": "InsecureAllowHTTP permits an http:// issuer URL for non-localhost hosts.\nOnly set this for in-cluster Kubernetes deployments where traffic between\npods traverses a trusted network (e.g. the in-cluster service mesh).\nProduction deployments reachable outside the cluster MUST use https://.\n\nOn VirtualMCPServer: when false (the default), http:// issuers for non-localhost\nhosts are rejected at reconcile time with an AuthServerConfigValidated=False condition.\n\nOn MCPServer and MCPRemoteProxy (via MCPExternalAuthConfig): this field is\nstructurally present but enforcement is deferred to pod startup via Config.Validate();\na misconfigured issuer will cause the pod to crash at startup rather than surface\nas an operator condition.\n\nOne combination is rejected at admission on all three CRDs regardless of the\nabove: setting this field alongside confidential client registration or\ndelegate clients, which would issue or use client secrets in cleartext over\nan unauthenticated endpoint (see the XValidation rule on\nEmbeddedAuthServerConfig).", + "description": "InsecureAllowHTTP permits an http:// issuer URL for non-localhost hosts.\nOnly set this for in-cluster Kubernetes deployments where traffic between\npods traverses a trusted network (e.g. the in-cluster service mesh).\nProduction deployments reachable outside the cluster MUST use https://.\n\nOn VirtualMCPServer: when false (the default), http:// issuers for non-localhost\nhosts are rejected at reconcile time with an AuthServerConfigValidated=False condition.\n\nOn MCPServer and MCPRemoteProxy (via MCPExternalAuthConfig): this field is\nstructurally present but enforcement is deferred to pod startup via Config.Validate();\na misconfigured issuer will cause the pod to crash at startup rather than surface\nas an operator condition.\n\nOne combination is rejected at admission on all three CRDs regardless of the\nabove: setting this field alongside confidential client registration or\ndelegate clients, or a SPIFFE association that has spiffe_jwt in methods and\nclient_credentials in grantTypes on the same association, which would issue\nor use client secrets or JWT-SVIDs in cleartext over an unauthenticated\nendpoint (see the XValidation rule on\nEmbeddedAuthServerConfig).", "type": "boolean" }, "issuer": { @@ -1335,6 +1354,12 @@ "dcrConfig": { "description": "DCRConfig enables RFC 7591 Dynamic Client Registration against the upstream\nauthorization server. When set, the client credentials are obtained at\nruntime rather than being pre-provisioned, and ClientID must be left empty.\nMutually exclusive with ClientID.", "properties": { + "clientName": { + "description": "ClientName is the optional RFC 7591 \"client_name\" registration metadata\nsent when ToolHive registers with the upstream. When empty, ToolHive\nregisters as \"ToolHive MCP Client\". It is display-only metadata: the\nupstream shows it on its authorization screen, and it is never used as\na key. Changing it does not rename an already-registered client; the\nnew value applies only the next time ToolHive registers a fresh client,\nfor example after rotating via RotationKey, or when the upstream\nrejects the cached registration. Names with leading or trailing\nwhitespace, or containing control or format characters, are rejected.", + "maxLength": 256, + "pattern": "^[^\\p{Cc}\\p{Cf}\\p{Z}]([^\\p{Cc}\\p{Cf}]*[^\\p{Cc}\\p{Cf}\\p{Z}])?$", + "type": "string" + }, "discoveryUrl": { "description": "DiscoveryURL is the RFC 8414 / OIDC Discovery document URL. The resolver\nissues a single GET against this URL (no well-known-path fallback) and\nreads registration_endpoint, authorization_endpoint, token_endpoint,\ntoken_endpoint_auth_methods_supported, and scopes_supported from the\nresponse.\nMutually exclusive with RegistrationEndpoint.\nHTTPS is required because the registration endpoint resolved from this\ndocument carries the initial access token and the issued client_secret\n(RFC 7591 §3, RFC 8414 §3). MaxLength is a defensive size cap (etcd\nobject budget, regex evaluation cost) and matches the conventional URL\nlength cap.", "maxLength": 2048, @@ -1660,6 +1685,12 @@ "dcrConfig": { "description": "DCRConfig enables RFC 7591 Dynamic Client Registration. When set, ClientID\nand ClientSecretRef must be omitted. If neither discoveryUrl nor\nregistrationEndpoint is set, discovery is derived from issuerUrl.", "properties": { + "clientName": { + "description": "ClientName is the optional RFC 7591 \"client_name\" registration metadata\nsent when ToolHive registers with the upstream. When empty, ToolHive\nregisters as \"ToolHive MCP Client\". It is display-only metadata: the\nupstream shows it on its authorization screen, and it is never used as\na key. Changing it does not rename an already-registered client; the\nnew value applies only the next time ToolHive registers a fresh client,\nfor example after rotating via RotationKey, or when the upstream\nrejects the cached registration. Names with leading or trailing\nwhitespace, or containing control or format characters, are rejected.", + "maxLength": 256, + "pattern": "^[^\\p{Cc}\\p{Cf}\\p{Z}]([^\\p{Cc}\\p{Cf}]*[^\\p{Cc}\\p{Cf}\\p{Z}])?$", + "type": "string" + }, "discoveryUrl": { "description": "DiscoveryURL is the RFC 8414 / OIDC Discovery document URL. The resolver\nissues a single GET against this URL (no well-known-path fallback) and\nreads registration_endpoint, authorization_endpoint, token_endpoint,\ntoken_endpoint_auth_methods_supported, and scopes_supported from the\nresponse.\nMutually exclusive with RegistrationEndpoint.\nHTTPS is required because the registration endpoint resolved from this\ndocument carries the initial access token and the issued client_secret\n(RFC 7591 §3, RFC 8414 §3). MaxLength is a defensive size cap (etcd\nobject budget, regex evaluation cost) and matches the conventional URL\nlength cap.", "maxLength": 2048, @@ -1923,16 +1954,16 @@ "rule": "!has(self.inboundGrants) || !has(self.inboundGrants.spiffeClientAuth) || self.inboundGrants.spiffeClientAuth.all(client, !client.clientId.matches('^[A-Za-z][A-Za-z0-9+.-]*://.+'))" }, { - "message": "insecureAllowHTTP cannot be combined with confidential client registration or delegateClients; client secrets would be issued or used in cleartext over an unauthenticated endpoint", - "rule": "!(has(self.insecureAllowHTTP) && self.insecureAllowHTTP && ((has(self.allowConfidentialClientRegistration) && self.allowConfidentialClientRegistration) || (has(self.delegateClients) && size(self.delegateClients) > 0) || (has(self.inboundGrants) && has(self.inboundGrants.tokenExchange) && has(self.inboundGrants.tokenExchange.delegateClients) && size(self.inboundGrants.tokenExchange.delegateClients) > 0)))" + "message": "insecureAllowHTTP cannot be combined with confidential client registration, delegateClients or JWT-SVID SPIFFE associations that grant client_credentials; client secrets or JWT-SVIDs would be issued or used in cleartext over an unauthenticated endpoint", + "rule": "!(has(self.insecureAllowHTTP) && self.insecureAllowHTTP && ((has(self.allowConfidentialClientRegistration) && self.allowConfidentialClientRegistration) || (has(self.delegateClients) && size(self.delegateClients) > 0) || (has(self.inboundGrants) && has(self.inboundGrants.tokenExchange) && has(self.inboundGrants.tokenExchange.delegateClients) && size(self.inboundGrants.tokenExchange.delegateClients) > 0) || (has(self.inboundGrants) && has(self.inboundGrants.spiffeClientAuth) && self.inboundGrants.spiffeClientAuth.exists(a, 'spiffe_jwt' in a.methods && has(a.grantTypes) && 'client_credentials' in a.grantTypes))))" }, { "message": "forceConfidentialRedirectUris requires allowConfidentialClientRegistration to be true", "rule": "(!has(self.forceConfidentialRedirectUris) || size(self.forceConfidentialRedirectUris) == 0) || (has(self.allowConfidentialClientRegistration) && self.allowConfidentialClientRegistration)" }, { - "message": "confidential client registration or delegateClients with an HTTP issuer require insecureAllowConfidentialOverLoopbackHTTP to be explicitly enabled; the issuer must still be loopback", - "rule": "!self.issuer.startsWith('http://') || (has(self.insecureAllowConfidentialOverLoopbackHTTP) && self.insecureAllowConfidentialOverLoopbackHTTP) || ((!has(self.allowConfidentialClientRegistration) || !self.allowConfidentialClientRegistration) && (!has(self.delegateClients) || size(self.delegateClients) == 0) && (!has(self.inboundGrants) || !has(self.inboundGrants.tokenExchange) || !has(self.inboundGrants.tokenExchange.delegateClients) || size(self.inboundGrants.tokenExchange.delegateClients) == 0))" + "message": "confidential client registration, delegateClients or JWT-SVID SPIFFE associations that grant client_credentials with an HTTP issuer require insecureAllowConfidentialOverLoopbackHTTP to be explicitly enabled; the issuer must still be loopback", + "rule": "!self.issuer.startsWith('http://') || (has(self.insecureAllowConfidentialOverLoopbackHTTP) && self.insecureAllowConfidentialOverLoopbackHTTP) || ((!has(self.allowConfidentialClientRegistration) || !self.allowConfidentialClientRegistration) && (!has(self.delegateClients) || size(self.delegateClients) == 0) && (!has(self.inboundGrants) || !has(self.inboundGrants.tokenExchange) || !has(self.inboundGrants.tokenExchange.delegateClients) || size(self.inboundGrants.tokenExchange.delegateClients) == 0) && !(has(self.inboundGrants) && has(self.inboundGrants.spiffeClientAuth) && self.inboundGrants.spiffeClientAuth.exists(a, 'spiffe_jwt' in a.methods && has(a.grantTypes) && 'client_credentials' in a.grantTypes)))" }, { "message": "canonical tokenExchange conflicts with legacy delegateClients or RFC 8693 trusted issuer policy", From 0986f6cc4555219f28078895ce8f9199405a6a16 Mon Sep 17 00:00:00 2001 From: "stacklok-octosts[bot]" <327033170+stacklok-octosts[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2026 21:10:02 +0000 Subject: [PATCH 3/3] Apply prettier and eslint fixups to skill output --- docs/toolhive/faq.mdx | 8 +- docs/toolhive/guides-cli/ai-plugins.mdx | 12 ++ docs/toolhive/guides-cli/run-mcp-servers.mdx | 24 +++- .../toolhive/guides-cli/skills-management.mdx | 52 +++++++ .../guides-k8s/embedded-auth-server-k8s.mdx | 17 ++- docs/toolhive/guides-k8s/remote-mcp-proxy.mdx | 32 ++++- .../accept-workload-assertions.mdx | 19 ++- .../guides-vmcp/delegate-agent-identity.mdx | 128 +++++++++++++++--- .../guides-vmcp/embedded-auth-server-vmcp.mdx | 18 +-- 9 files changed, 270 insertions(+), 40 deletions(-) diff --git a/docs/toolhive/faq.mdx b/docs/toolhive/faq.mdx index ab13ec0c2..929975030 100644 --- a/docs/toolhive/faq.mdx +++ b/docs/toolhive/faq.mdx @@ -214,8 +214,12 @@ Each MCP server proxy, and each Virtual MCP Server (vMCP), sends a report every 15 minutes. A report contains: - The number of tool calls so far that day, split by the MCP client that made - them, such as Claude Code or Cursor. ToolHive recognizes a fixed list of - clients and reports any other client as `other`. + them, such as Claude Code or Cursor. ToolHive identifies the client from the + information the client sends when it connects or, when the server doesn't + track sessions, from a known client name in the request's `User-Agent` header. + ToolHive never stores or sends the raw `User-Agent` value. It recognizes a + fixed list of clients, reports any other client as `other`, and reports calls + it can't attribute as `unknown`. - How the server is set up, each value from a fixed list: the transport, whether it runs in a container or remotely, where its definition came from (the built-in registry, a custom registry, a `uvx://`, `npx://`, or `go://` diff --git a/docs/toolhive/guides-cli/ai-plugins.mdx b/docs/toolhive/guides-cli/ai-plugins.mdx index 0c1baff7d..606f87fb9 100644 --- a/docs/toolhive/guides-cli/ai-plugins.mdx +++ b/docs/toolhive/guides-cli/ai-plugins.mdx @@ -204,12 +204,24 @@ Before building, check the manifest and directory structure: thv ai-plugin validate ./my-plugin ``` +Validation also checks every skill bundled in the plugin and reports its errors +and warnings, prefixed with `bundled skill "":`. Warnings, such as a +broken link in a bundled skill's `SKILL.md`, never make the plugin invalid. +ToolHive installs the whole plugin, so a bundled skill's links can point +anywhere inside the plugin directory, and bundled scripts keep their executable +permissions. For the full list of skill checks and warnings, see +[Validate a skill](./skills-management.mdx#validate-a-skill). + For JSON output: ```bash thv ai-plugin validate ./my-plugin --format json ``` +The JSON output includes a `findings` array with the severity, rule ID, file, +and line of each issue. For a bundled skill, `file` is relative to the plugin +directory, such as `skills/release-notes/SKILL.md`. + ### Build an OCI artifact Package the plugin into an OCI artifact stored in the local OCI store: diff --git a/docs/toolhive/guides-cli/run-mcp-servers.mdx b/docs/toolhive/guides-cli/run-mcp-servers.mdx index a1cd9d5ef..7e113c882 100644 --- a/docs/toolhive/guides-cli/run-mcp-servers.mdx +++ b/docs/toolhive/guides-cli/run-mcp-servers.mdx @@ -208,8 +208,10 @@ thv run ://@ ``` You'll likely need to specify additional arguments like the transport method, -volumes, and environment variables. Check your MCP server's documentation and -see [`thv run --help`](../reference/cli/thv_run.md) for more options. +volumes, and environment variables. By default, `uvx://` servers use the `stdio` +transport and other servers use `streamable-http`. Check your MCP server's +documentation and see [`thv run --help`](../reference/cli/thv_run.md) for more +options. :::info[What's happening?] @@ -240,6 +242,24 @@ must be a valid package in the [PyPI registry](https://pypi.org/). The thv run --name aws-docs uvx://awslabs.aws-documentation-mcp-server@latest ``` +Most Python MCP servers communicate over stdio, so `uvx://` servers use the +`stdio` transport unless you set `--transport`, `--target-port`, or +`--stateless`, or the server's registry entry specifies a transport. If the +package serves Streamable HTTP or SSE, set the transport explicitly: + +```bash +thv run --transport streamable-http uvx:// -- --transport streamable-http +``` + +:::info[Changed in v0.67.0] + +`uvx://` servers used to default to `streamable-http`. If you run an HTTP or SSE +`uvx://` package without `--transport` or `--target-port`, add +`--transport streamable-http` or `--transport sse`; otherwise ToolHive starts it +as a stdio server and clients can't reach it. + +::: + diff --git a/docs/toolhive/guides-cli/skills-management.mdx b/docs/toolhive/guides-cli/skills-management.mdx index 81ebd578c..c1496e1d3 100644 --- a/docs/toolhive/guides-cli/skills-management.mdx +++ b/docs/toolhive/guides-cli/skills-management.mdx @@ -362,6 +362,10 @@ name, and must not start or end with a hyphen. You can also add optional files in `scripts/`, `references/`, and `assets/` subdirectories for executable code, documentation, and static resources. +ToolHive installs skill files without executable permissions, so tell the agent +to run bundled scripts through an interpreter, such as `bash scripts/check.sh` +or `python3 scripts/report.py`, instead of `./scripts/check.sh`. + For the full list of frontmatter fields (version, license, allowed-tools, and more) and directory structure details, see [Understanding skills](../concepts/skills.mdx#skill-structure). @@ -386,6 +390,50 @@ This verifies that: - The `name` matches the directory name - No symlinks or path traversal issues exist +Validation also reports warnings for problems that pass these checks but break +the skill once it's installed. Warnings never make a skill invalid or change the +exit code: + +- `ref-unresolved`: a relative link or image in `SKILL.md`, or in a Markdown + file it links to, points at a file that doesn't exist. +- `ref-escapes-root`: a link or path leaves the skill directory, for example + `../shared/notes.md`. Only the skill directory is installed, so the target + won't exist on the user's machine. +- `script-direct-exec`: the instructions run a bundled script directly, such as + `./scripts/check.sh`. Installed skill files aren't executable, so run the + script through an interpreter instead, such as `bash scripts/check.sh`. +- `allowed-tools-comma`: the `allowed-tools` field is comma-delimited instead of + space-delimited. +- `skill-md-too-long`: `SKILL.md` is longer than 500 lines. + +For machine-readable results, for example in CI or an editor integration, add +`--format json`. Alongside the `errors` and `warnings` strings, the output +includes a `findings` array with the severity, a stable rule ID, the file, and +the line of each issue: + +```bash +thv skill validate ./my-skill --format json +``` + +```json +{ + "valid": true, + "warnings": ["link \"references/setup.md\" does not exist"], + "findings": [ + { + "severity": "warning", + "rule": "ref-unresolved", + "file": "SKILL.md", + "line": 12, + "message": "link \"references/setup.md\" does not exist" + } + ] +} +``` + +The `line` is `0` when a check doesn't apply to a specific line. Rule IDs are +stable, so you can filter on them in scripts. + ### Build an OCI artifact Package your skill into an OCI artifact: @@ -620,6 +668,10 @@ Common issues include: - Skill `name` doesn't match the directory name - Symlinks present in the skill directory (not allowed for security) +Warnings such as `ref-unresolved` or `script-direct-exec` don't fail validation, +but they point at links or commands that won't work once the skill is installed. +See [Validate a skill](#validate-a-skill) for what each warning means. +
diff --git a/docs/toolhive/guides-k8s/embedded-auth-server-k8s.mdx b/docs/toolhive/guides-k8s/embedded-auth-server-k8s.mdx index 4efac9263..b5d4e5b7b 100644 --- a/docs/toolhive/guides-k8s/embedded-auth-server-k8s.mdx +++ b/docs/toolhive/guides-k8s/embedded-auth-server-k8s.mdx @@ -220,7 +220,7 @@ with a generic "authorization header required" error. | `cimd` | Optional Client ID Metadata Document (CIMD) configuration. When `cimd.enabled` is `true`, the auth server accepts HTTPS URLs as `client_id` values and resolves them via CIMD, letting clients (for example, VS Code) authenticate without prior Dynamic Client Registration. See [Enable CIMD for zero-registration clients](#enable-cimd-for-zero-registration-clients). | | `baselineClientScopes` | Optional list of OAuth 2.0 scopes merged into every DCR-registered client's scope set. Use this when MCP clients register with a narrowed `scope` field but then request wider scopes at `/oauth/authorize`. See [Enable baseline scopes for DCR clients](#enable-baseline-scopes-for-dcr-clients). | | `tlsListener` | Optional. Serves the authorization server's OAuth endpoints over HTTPS on port 8443, using a certificate and private key from a Secret. See [Serve the authorization server over TLS](#serve-the-authorization-server-over-tls). | -| `spiffeTrustDomains` | Optional. Declares SPIFFE trust domains and their trust bundles, used with `inboundGrants.spiffeClientAuth` to let SPIFFE workloads authenticate with JWT-SVIDs or X.509-SVIDs for token exchange. See [Authenticate workloads with SPIFFE SVIDs](../guides-vmcp/delegate-agent-identity.mdx#authenticate-workloads-with-spiffe-svids). | +| `spiffeTrustDomains` | Optional. Declares SPIFFE trust domains and their trust bundles, used with `inboundGrants.spiffeClientAuth` to let SPIFFE workloads authenticate with JWT-SVIDs or X.509-SVIDs for token exchange or the client credentials grant. See [Authenticate workloads with SPIFFE SVIDs](../guides-vmcp/delegate-agent-identity.mdx#authenticate-workloads-with-spiffe-svids). | | `disableUpstreamTokenInjection` | Optional. When `true`, the embedded auth server authenticates clients normally but the proxy strips `Authorization`, `Cookie`, and `Proxy-Authorization` from forwarded requests instead of swapping the JWT for an upstream token. Use this for public backends (such as documentation servers) that you still want to gate behind client auth. Cannot be combined with `tokenExchange`, `awsSts`, or OBO (Stacklok Enterprise) on the same workload, since each would re-add credentials after the strip. | ## Step 5: Create the MCPOIDCConfig and MCPServer resources @@ -1023,6 +1023,21 @@ entirely. Don't set `clientId` or `clientSecretRef` when you set `dcrConfig`. ToolHive obtains the client ID and client secret from the DCR response. +ToolHive registers as `ToolHive MCP Client` by default, and the upstream shows +that name to users on its authorization screen. To show a name your users +recognize, set `dcrConfig.clientName`: + +```yaml +dcrConfig: + clientName: Acme Engineering MCP Gateway +``` + +The name can be up to 256 characters, without leading or trailing whitespace or +control characters. Changing it doesn't rename a client that's already +registered. The new name applies the next time ToolHive registers a fresh +client, for example after you change +[`rotationKey`](#re-register-a-dropped-upstream-client). + #### DCR with an OAuth 2.0 upstream For an OAuth 2.0 upstream, use an RFC 8414 discovery document. ToolHive reads diff --git a/docs/toolhive/guides-k8s/remote-mcp-proxy.mdx b/docs/toolhive/guides-k8s/remote-mcp-proxy.mdx index 060a47e29..5dfd04ef8 100644 --- a/docs/toolhive/guides-k8s/remote-mcp-proxy.mdx +++ b/docs/toolhive/guides-k8s/remote-mcp-proxy.mdx @@ -185,6 +185,35 @@ When you apply an `MCPRemoteProxy` resource, here's what happens: ::: +#### Size the proxy container + +The operator fills in any CPU or memory request or limit you leave unset with +these defaults: + +| | CPU | Memory | +| -------- | ------ | ------- | +| Requests | `50m` | `64Mi` | +| Limits | `200m` | `256Mi` | + +Values you set in `spec.resources`, or on the `toolhive` container through +[`podTemplateSpec`](#customize-the-remote-proxy-pod), override the defaults +field by field, and `podTemplateSpec` takes precedence over `spec.resources`. If +you set a limit without a request, Kubernetes uses the limit as the request. If +you set a request above the default limit, the limit rises to match it. + +A busy proxy, especially one that runs the embedded authorization server, can +use more than 256Mi of memory. Check the pod's memory usage and set +`spec.resources.limits.memory` explicitly so the pod isn't OOMKilled. + +:::info[Changed in v0.67.0] + +`MCPRemoteProxy` containers used to run without default requests or limits. +After the operator upgrade, each proxy that leaves a resource field unset +restarts once and gets the 256Mi memory limit. Before you upgrade, set explicit +limits on any proxy whose memory usage is near or above 256Mi. + +::: + ### Authentication configuration The `oidcConfigRef` field references an MCPOIDCConfig resource that validates @@ -1100,7 +1129,8 @@ Typical causes: - The remote server uses a private CA but `caBundleRef` is missing or points to a Secret/ConfigMap that doesn't exist. - The pod was OOMKilled. `kubectl describe pod` shows `Reason: OOMKilled` in the - last terminated state - raise `resources.limits`. + last terminated state - raise `resources.limits.memory` above the 256Mi + default. See [Size the proxy container](#size-the-proxy-container).
diff --git a/docs/toolhive/guides-vmcp/accept-workload-assertions.mdx b/docs/toolhive/guides-vmcp/accept-workload-assertions.mdx index ad68ba153..246f65816 100644 --- a/docs/toolhive/guides-vmcp/accept-workload-assertions.mdx +++ b/docs/toolhive/guides-vmcp/accept-workload-assertions.mdx @@ -177,9 +177,16 @@ hashing the raw assertion for replay protection instead), and whether the assertion's `aud` needs an `acceptedAudiences` entry to match, per the tabs above. -| Error | Likely cause | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `invalid_grant`: "The JWT bearer assertion issuer is not enabled for this grant." | The assertion's `iss` doesn't match a `trustedIssuers` entry with an `inboundGrants.jwtBearer.issuerPolicies` entry configured. | -| `invalid_grant`: "The JWT bearer assertion subject is not configured for this grant." | The assertion's `sub` has no matching entry in `issuerPolicies[].subjectBindings`. | -| `invalid_target` | The `resource` parameter isn't in the matched subject binding's `allowedResources`. | -| `invalid_grant`: "The JWT bearer assertion has already been used." | The assertion's replay key (its `jti`, or a hash of the assertion when `jti` is absent) was already consumed. | +When an assertion fails a validation rule, ToolHive returns `invalid_grant` with +an `error_description` that starts with the reason code `invalid_assertion`, +followed by a hint. A client can read the reason code to decide how to respond +without parsing the hint. + +| Error | Likely cause | +| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `invalid_grant`: "invalid_assertion: The JWT bearer assertion issuer is not enabled for this grant." | The assertion's `iss` doesn't match a `trustedIssuers` entry with an `inboundGrants.jwtBearer.issuerPolicies` entry configured. | +| `invalid_grant`: "The JWT bearer assertion subject is not configured for this grant." | The assertion's `sub` has no matching entry in `issuerPolicies[].subjectBindings`. | +| `invalid_target` | The `resource` parameter isn't in the matched subject binding's `allowedResources`. | +| `invalid_grant`: "invalid_assertion: The JWT bearer assertion has already been used." | The assertion's replay key (its `jti`, or a hash of the assertion when `jti` is absent) was already consumed. | +| `invalid_grant`: "invalid_assertion: The JWT bearer assertion exceeds the configured maximum age." | The assertion's issued lifetime (`exp` minus `iat`) is longer than the issuer policy's `maxAssertionAge`. Request a shorter-lived assertion, or raise `maxAssertionAge`. | +| HTTP 503 `temporarily_unavailable`: "issuer_unavailable" | ToolHive couldn't fetch the issuer's signing keys, so it never evaluated the assertion. Check that the issuer's JWKS endpoint is reachable from the authorization server, then retry the request. | diff --git a/docs/toolhive/guides-vmcp/delegate-agent-identity.mdx b/docs/toolhive/guides-vmcp/delegate-agent-identity.mdx index ed221615c..3d782fd57 100644 --- a/docs/toolhive/guides-vmcp/delegate-agent-identity.mdx +++ b/docs/toolhive/guides-vmcp/delegate-agent-identity.mdx @@ -312,16 +312,23 @@ SVID formats: (mutual TLS). This requires the authorization server's own TLS listener and a TLS connection that reaches it end to end. -A SPIFFE client can use only the RFC 8693 token-exchange grant and has no client -secret. To have a workload get a token in its own name, with no user subject -token, use the [JWT-bearer grant](./accept-workload-assertions.mdx) instead. +A SPIFFE client has no client secret. Each client association chooses which of +two grants its workloads can use: + +- **Token exchange (RFC 8693):** the workload presents a subject token, such as + a user's token, and gets a token that names that subject with the workload + recorded as the acting party. Use this when an agent acts on behalf of a user. + This is the default. +- **Client credentials:** the workload gets a token in its own name, with no + subject token. Use this for an agent that calls MCP servers as itself, for + example a scheduled job with no user behind it. ### Declare the trust domain and client associations Two blocks under `authServerConfig` work together. `spiffeTrustDomains` declares each trust domain you accept and where ToolHive loads its trust bundle from. `inboundGrants.spiffeClientAuth` maps a SPIFFE ID, or a pattern of SPIFFE IDs, -to one OAuth client ID with its allowed audiences and scopes. +to one OAuth client ID with its grants, allowed resources, and scopes. First, store your trust domain's bundle in a ConfigMap. The bundle must be a SPIFFE trust bundle in JWKS format, such as the output of @@ -363,7 +370,12 @@ spec: principalPattern: spiffe://example.org/ns/agents/sa/reporting-agent clientId: reporting-agent methods: [spiffe_jwt, spiffe_x509] - audiences: [https://vmcp.example.com/mcp-resource] + # highlight-start + grantTypes: + - urn:ietf:params:oauth:grant-type:token-exchange + - client_credentials + resources: [https://vmcp.example.com/mcp-resource] + # highlight-end scopes: [openid] ``` @@ -379,15 +391,28 @@ spec: `spiffeClientAuth` fields: -| Field | Description | -| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `trustDomainRef` | Required. The `name` of a `spiffeTrustDomains` entry. | -| `principalPattern` | Required. An exact SPIFFE ID, or one ending in `/*` to match every ID below that path. It must start with `spiffe:///`. Patterns must not overlap. | -| `clientId` | Required. The OAuth client ID that matching workloads authenticate as. It must be unique and must not match a `delegateClients[].clientId`. | -| `methods` | Required. `spiffe_jwt`, `spiffe_x509`, or both. Must be a subset of the trust domain's `methods`. `spiffe_x509` requires `tlsListener` and an `https://` issuer. | -| `audiences` | Required. The RFC 8693 audiences this client may request. | -| `scopes` | Required. The scopes this client may request. | -| `resources` | Optional. RFC 8707 resource indicators this client may request. Each must be one of the server's allowed audiences. | +| Field | Description | +| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `trustDomainRef` | Required. The `name` of a `spiffeTrustDomains` entry. | +| `principalPattern` | Required. An exact SPIFFE ID, or one ending in `/*` to match every ID below that path. It must start with `spiffe:///`. Patterns must not overlap. | +| `clientId` | Required. The OAuth client ID that matching workloads authenticate as. It must be unique and must not match a `delegateClients[].clientId`. | +| `methods` | Required. `spiffe_jwt`, `spiffe_x509`, or both. Must be a subset of the trust domain's `methods`. `spiffe_x509` requires `tlsListener` and an `https://` issuer. | +| `grantTypes` | Optional. The grants matching workloads can use: `urn:ietf:params:oauth:grant-type:token-exchange`, `client_credentials`, or both. Defaults to token exchange only. | +| `resources` | Required, with at least one entry. The RFC 8707 resource indicators this client may request, as absolute HTTP(S) URIs. Each must be one of the server's allowed audiences. Every request names exactly one of these, and it becomes the issued token's audience. | +| `scopes` | Required. The scopes this client may request. | +| `audiences` | Deprecated and ignored. Use `resources` instead. A non-empty value is reported in the `DeprecatedInboundGrantConfiguration` status condition, and the authorization server logs a warning at startup. | + +To grant `client_credentials` to an association that allows `spiffe_jwt`, the +issuer must use `https://`. A captured JWT-SVID would otherwise let anyone get +tokens for that workload. For local development with a loopback `http://` +issuer, set `insecureAllowConfidentialOverLoopbackHTTP: true`. + +An association that grants only `client_credentials` doesn't turn on token +exchange for the server. When some association lists `client_credentials`, the +authorization server metadata at `/.well-known/oauth-authorization-server` +advertises `client_credentials` in `grant_types_supported`. It also lists +`spiffe_jwt` and `spiffe_x509` in `token_endpoint_auth_methods_supported` when +an association enables them. ToolHive polls the bundle file every 30 seconds, so a rotated bundle in the ConfigMap takes effect without a restart. If ToolHive can't load a fresh bundle @@ -409,7 +434,7 @@ curl -s -X POST https://vmcp.example.com:8443/oauth/token \ --data-urlencode "grant_type=urn:ietf:params:oauth:grant-type:token-exchange" \ --data-urlencode "subject_token=" \ --data-urlencode "subject_token_type=urn:ietf:params:oauth:token-type:access_token" \ - --data-urlencode "audience=https://vmcp.example.com/mcp-resource" \ + --data-urlencode "resource=https://vmcp.example.com/mcp-resource" \ --data-urlencode "client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-spiffe" \ --data-urlencode "client_assertion=" ``` @@ -420,6 +445,12 @@ association's `clientId`. The SVID must expire within 6 minutes and be at most 16 KiB. ToolHive doesn't track JWT-SVID `jti` values, so keep SVID lifetimes short. +Every SPIFFE token request names its target with exactly one `resource` +parameter, which must exactly match an entry in the association's `resources`. +ToolHive rejects a missing, empty, or repeated `resource`, and any `audience` +parameter, with `invalid_target`. The issued token's `aud` is the requested +resource. + ### Exchange a token with an X.509-SVID With `spiffe_x509` enabled, the authorization server's TLS listener on port 8443 @@ -432,7 +463,7 @@ curl -s -X POST https://vmcp.example.com:8443/oauth/token \ --data-urlencode "grant_type=urn:ietf:params:oauth:grant-type:token-exchange" \ --data-urlencode "subject_token=" \ --data-urlencode "subject_token_type=urn:ietf:params:oauth:token-type:access_token" \ - --data-urlencode "audience=https://vmcp.example.com/mcp-resource" \ + --data-urlencode "resource=https://vmcp.example.com/mcp-resource" \ --data-urlencode "client_id=reporting-agent" ``` @@ -452,6 +483,35 @@ authenticates as itself, so write principal patterns that can't match a proxy's or gateway's SPIFFE ID. Behind an ingress that terminates TLS, use JWT-SVIDs instead. +### Get a token with the client credentials grant + +When the association lists `client_credentials` in `grantTypes`, a workload can +get a token in its own name, with no subject token. It authenticates with its +SVID exactly as in the exchange examples above, using either a JWT-SVID as the +`client_assertion` or an X.509-SVID over mutual TLS: + +```bash title="POST /oauth/token" +curl -s -X POST https://vmcp.example.com:8443/oauth/token \ + --data-urlencode "grant_type=client_credentials" \ + --data-urlencode "resource=https://vmcp.example.com/mcp-resource" \ + --data-urlencode "scope=openid" \ + --data-urlencode "client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-spiffe" \ + --data-urlencode "client_assertion=" +``` + +The issued access token carries these claims: + +- `sub`: the workload's verified SPIFFE ID +- `client_id`: the association's `clientId` +- `aud`: the requested `resource` +- `scp`: the granted scopes, as an array + +Each requested scope must be in the association's `scopes`. A request with no +`scope` gets a token with no scopes. ToolHive doesn't issue a refresh token. The +token expires at the earlier of the server's access token lifetime and the +expiry of the SVID that authenticated the request, so a token never outlives its +credential. To get a new token, the workload requests one with a fresh SVID. + ### Subject tokens for SPIFFE clients A SPIFFE client isn't a delegate client, so it gets none of a delegate client's @@ -459,7 +519,7 @@ exemptions for ToolHive-issued tokens. The subject token can be either of these: - A token issued by this ToolHive authorization server. ToolHive accepts it when the token's `client_id` is the SPIFFE client's `clientId`, or when its - `may_act.sub` names that `clientId`. + `may_act.sub` names that `clientId` or the workload's SPIFFE ID. - A token from an external issuer listed under `trustedIssuers`. The matching `inboundGrants.tokenExchange.issuerPolicies` entry must authorize the token's actor through `allowedActors` or `actorMatcher`, or through a `may_act` claim @@ -468,9 +528,30 @@ exemptions for ToolHive-issued tokens. The subject token can be either of these: [RFC 8693 delegation with a pre-provisioned delegate client](#rfc-8693-delegation-with-a-pre-provisioned-delegate-client) for how to set up an issuer policy. -In both cases, the token's `aud` must include every audience the issued token -gets. The issued token records the SPIFFE client in `act.sub`, using the -configured `clientId`; the SPIFFE ID itself doesn't appear in the token. +In both cases, the subject token's `aud` must include the requested `resource`. + +The issued token records the workload's verified SPIFFE ID in the outermost +`act.sub`, and its `client_id` claim is the association's `clientId`. To write a +Cedar policy for every workload of a SPIFFE client, match +`principal.claim_client_id`. To write a policy for one workload, match its +SPIFFE ID in `principal.claim_act.sub`. + +:::info[Changed in v0.67.0] + +The outermost `act.sub` of a SPIFFE client's exchanged token used to be the +association's `clientId`. If your Cedar policies match `claim_act.sub` against a +SPIFFE `clientId`, change them to match `claim_client_id` instead. + +::: + +A principal pattern ending in `/*` gives many workloads the same `clientId`, so +ToolHive binds each token to the workload that obtained it. When a SPIFFE client +presents a ToolHive-issued subject token that it's accepted for only because of +its `client_id`, the token's `sub` or outermost `act.sub` must be the calling +workload's SPIFFE ID. One workload therefore can't exchange a token that a +sibling workload obtained through client credentials or token exchange. If the +workload sends an `actor_token`, the actor token's `sub` must be its own SPIFFE +ID. :::warning @@ -512,6 +593,13 @@ exchange that issuer's tokens whose actor passes `allowedActors` or | `invalid_target`: "The client is not permitted to request audience ..." | The `audience` parameter on the exchange request isn't in the delegate client's `audiences` list. Request one of the listed audiences, or add the audience to `delegateClients[].audiences`. | | HTTP 401 `invalid_client` for a SPIFFE client using an X.509-SVID | The client certificate didn't reach the authorization server's TLS listener on port 8443, for example because an ingress terminated TLS, or the certificate doesn't match the association's `principalPattern`. Use TLS passthrough to port 8443, or switch the client to a JWT-SVID. | | HTTP 401 `invalid_client` for a SPIFFE client using a JWT-SVID | Check that the SVID's only audience is exactly the `issuer`, that it expires within 6 minutes, that its SPIFFE ID matches a `principalPattern` enabled for `spiffe_jwt`, and that the trust bundle in the ConfigMap is current. | +| `invalid_target` for a SPIFFE client | The request didn't carry exactly one `resource` that matches an entry in the association's `resources`, or it carried an `audience` parameter. Send a single `resource` and no `audience`. | +| `invalid_grant`: "The subject token was issued to a different workload of this client." | The ToolHive-issued subject token names a different workload than the caller, or names no workload. A workload can exchange only tokens that name its own SPIFFE ID in `sub` or the outermost `act.sub`. | +| `invalid_request`: "The actor token's subject does not match the authenticated workload." | The `actor_token`'s `sub` isn't the calling workload's SPIFFE ID. | +| `unauthorized_client` on a `client_credentials` request | The client isn't an authenticated SPIFFE client, or its association doesn't list `client_credentials` in `grantTypes`. | +| `invalid_scope` on a `client_credentials` request | A requested scope isn't in the association's `scopes`. | +| CRD rejected: `resources is required` | A `spiffeClientAuth` entry has no `resources`. Add at least one resource that's also one of the server's allowed audiences. | +| Status condition `DeprecatedInboundGrantConfiguration` lists `spiffeClientAuth[].audiences` | The association still sets the deprecated `audiences` field, which ToolHive ignores. Move the values to `resources` and remove `audiences`. | | Status condition: `bundleSource: type "bundle_endpoint" is not supported by this build; only "file" is supported` | Set `bundleSource.type: file` and supply the trust bundle through a ConfigMap. The same applies to `workload_api`. | | CRD rejected: `issuerPolicies[]: allowedDelegateClients: Required value` | An `inboundGrants.tokenExchange.issuerPolicies` entry is missing `allowedDelegateClients`. Add it. | | CRD rejected: "delegateClients with an HTTP issuer require insecureAllowConfidentialOverLoopbackHTTP to be explicitly enabled" | A delegate client uses a plain-HTTP issuer. Use an `https://` issuer, or for local development set `insecureAllowConfidentialOverLoopbackHTTP: true` with a loopback issuer. | diff --git a/docs/toolhive/guides-vmcp/embedded-auth-server-vmcp.mdx b/docs/toolhive/guides-vmcp/embedded-auth-server-vmcp.mdx index 7580f19bc..d6e45035c 100644 --- a/docs/toolhive/guides-vmcp/embedded-auth-server-vmcp.mdx +++ b/docs/toolhive/guides-vmcp/embedded-auth-server-vmcp.mdx @@ -365,16 +365,17 @@ but do not use CIMD. Client-side DCR does not require configuration. ### Choose a way to get a token -The embedded authorization server supports five ways a caller can get a +The embedded authorization server supports six ways a caller can get a ToolHive-issued token, each suited to a different trust relationship: -| Pattern | Who authenticates | Result | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| [Confidential DCR](#allow-confidential-dcr-clients) | A client self-registers and gets a `client_secret` | The client acts as itself; no delegation | -| [Backend token exchange](../concepts/backend-auth.mdx#token-exchange) | A client presents its own token to a backend IdP | The client's own identity, re-scoped to a backend audience | -| [RFC 8693 delegate-client exchange](./delegate-agent-identity.mdx) | A pre-provisioned client presents a user's subject token | A token naming the user, with the agent recorded as the acting party (`act`) | -| [SPIFFE client exchange](./delegate-agent-identity.mdx#authenticate-workloads-with-spiffe-svids) | A SPIFFE workload authenticates with its SVID and presents a subject token from ToolHive or a trusted issuer | A token naming the subject, with the workload's configured client ID as the acting party (`act`) | -| [RFC 7523 JWT-bearer grant](./accept-workload-assertions.mdx) | No client at all; the assertion itself is the credential | A token naming the workload; no delegation, no pre-registered client | +| Pattern | Who authenticates | Result | +| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- | +| [Confidential DCR](#allow-confidential-dcr-clients) | A client self-registers and gets a `client_secret` | The client acts as itself; no delegation | +| [Backend token exchange](../concepts/backend-auth.mdx#token-exchange) | A client presents its own token to a backend IdP | The client's own identity, re-scoped to a backend audience | +| [RFC 8693 delegate-client exchange](./delegate-agent-identity.mdx) | A pre-provisioned client presents a user's subject token | A token naming the user, with the agent recorded as the acting party (`act`) | +| [SPIFFE client exchange](./delegate-agent-identity.mdx#authenticate-workloads-with-spiffe-svids) | A SPIFFE workload authenticates with its SVID and presents a subject token from ToolHive or a trusted issuer | A token naming the subject, with the workload's SPIFFE ID as the acting party (`act`) | +| [SPIFFE client credentials](./delegate-agent-identity.mdx#get-a-token-with-the-client-credentials-grant) | A SPIFFE workload authenticates with its SVID and asks for a token in its own name | A token naming the workload's SPIFFE ID; no delegation | +| [RFC 7523 JWT-bearer grant](./accept-workload-assertions.mdx) | No client at all; the assertion itself is the credential | A token naming the workload; no delegation, no pre-registered client | ### Enable CIMD for zero-registration clients @@ -584,6 +585,7 @@ ToolHive obtains the client ID and secret from the DCR response. | Field | Description | | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dcrConfig.clientName` | Optional name ToolHive registers with, shown on the upstream's authorization screen. Defaults to `ToolHive MCP Client`. Up to 256 characters. Applies only when ToolHive registers a fresh client, so changing it doesn't rename an existing registration. | | `dcrConfig.discoveryUrl` | HTTPS URL of an RFC 8414 or OpenID Connect discovery document. | | `dcrConfig.registrationEndpoint` | HTTPS URL of the RFC 7591 registration endpoint. | | `dcrConfig.initialAccessTokenRef` | Optional reference to a Secret whose value ToolHive sends as a bearer token when it calls the registration endpoint. Requires `name` and `key`. |