Skip to content

Commit e573f70

Browse files
Update ToolHive reference docs for toolhive-operator-crds-0.0.35 (#239)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent bcbeb9b commit e573f70

File tree

1 file changed

+144
-0
lines changed

1 file changed

+144
-0
lines changed

static/api-specs/toolhive-crd-api.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
Package v1alpha1 contains API Schema definitions for the toolhive v1alpha1 API group
99

1010
### Resource Types
11+
- [MCPExternalAuthConfig](#mcpexternalauthconfig)
12+
- [MCPExternalAuthConfigList](#mcpexternalauthconfiglist)
1113
- [MCPRegistry](#mcpregistry)
1214
- [MCPRegistryList](#mcpregistrylist)
1315
- [MCPServer](#mcpserver)
@@ -160,6 +162,23 @@ _Appears in:_
160162
| `value` _string_ | Value of the environment variable | | Required: \{\} <br /> |
161163

162164

165+
#### ExternalAuthConfigRef
166+
167+
168+
169+
ExternalAuthConfigRef defines a reference to a MCPExternalAuthConfig resource.
170+
The referenced MCPExternalAuthConfig must be in the same namespace as the MCPServer.
171+
172+
173+
174+
_Appears in:_
175+
- [MCPServerSpec](#mcpserverspec)
176+
177+
| Field | Description | Default | Validation |
178+
| --- | --- | --- | --- |
179+
| `name` _string_ | Name is the name of the MCPExternalAuthConfig resource | | Required: \{\} <br /> |
180+
181+
163182
#### GitSource
164183

165184

@@ -243,6 +262,88 @@ _Appears in:_
243262
| `useClusterAuth` _boolean_ | UseClusterAuth enables using the Kubernetes cluster's CA bundle and service account token<br />When true, uses /var/run/secrets/kubernetes.io/serviceaccount/ca.crt for TLS verification<br />and /var/run/secrets/kubernetes.io/serviceaccount/token for bearer token authentication<br />Defaults to true if not specified | | |
244263

245264

265+
#### MCPExternalAuthConfig
266+
267+
268+
269+
MCPExternalAuthConfig is the Schema for the mcpexternalauthconfigs API.
270+
MCPExternalAuthConfig resources are namespace-scoped and can only be referenced by
271+
MCPServer resources within the same namespace. Cross-namespace references
272+
are not supported for security and isolation reasons.
273+
274+
275+
276+
_Appears in:_
277+
- [MCPExternalAuthConfigList](#mcpexternalauthconfiglist)
278+
279+
| Field | Description | Default | Validation |
280+
| --- | --- | --- | --- |
281+
| `apiVersion` _string_ | `toolhive.stacklok.dev/v1alpha1` | | |
282+
| `kind` _string_ | `MCPExternalAuthConfig` | | |
283+
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
284+
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |
285+
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
286+
| `spec` _[MCPExternalAuthConfigSpec](#mcpexternalauthconfigspec)_ | | | |
287+
| `status` _[MCPExternalAuthConfigStatus](#mcpexternalauthconfigstatus)_ | | | |
288+
289+
290+
#### MCPExternalAuthConfigList
291+
292+
293+
294+
MCPExternalAuthConfigList contains a list of MCPExternalAuthConfig
295+
296+
297+
298+
299+
300+
| Field | Description | Default | Validation |
301+
| --- | --- | --- | --- |
302+
| `apiVersion` _string_ | `toolhive.stacklok.dev/v1alpha1` | | |
303+
| `kind` _string_ | `MCPExternalAuthConfigList` | | |
304+
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
305+
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |
306+
| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
307+
| `items` _[MCPExternalAuthConfig](#mcpexternalauthconfig) array_ | | | |
308+
309+
310+
#### MCPExternalAuthConfigSpec
311+
312+
313+
314+
MCPExternalAuthConfigSpec defines the desired state of MCPExternalAuthConfig.
315+
MCPExternalAuthConfig resources are namespace-scoped and can only be referenced by
316+
MCPServer resources in the same namespace.
317+
318+
319+
320+
_Appears in:_
321+
- [MCPExternalAuthConfig](#mcpexternalauthconfig)
322+
323+
| Field | Description | Default | Validation |
324+
| --- | --- | --- | --- |
325+
| `type` _string_ | Type is the type of external authentication to configure | | Enum: [tokenExchange] <br />Required: \{\} <br /> |
326+
| `tokenExchange` _[TokenExchangeConfig](#tokenexchangeconfig)_ | TokenExchange configures RFC-8693 OAuth 2.0 Token Exchange<br />Only used when Type is "tokenExchange" | | |
327+
328+
329+
#### MCPExternalAuthConfigStatus
330+
331+
332+
333+
MCPExternalAuthConfigStatus defines the observed state of MCPExternalAuthConfig
334+
335+
336+
337+
_Appears in:_
338+
- [MCPExternalAuthConfig](#mcpexternalauthconfig)
339+
340+
| Field | Description | Default | Validation |
341+
| --- | --- | --- | --- |
342+
| `observedGeneration` _integer_ | ObservedGeneration is the most recent generation observed for this MCPExternalAuthConfig.<br />It corresponds to the MCPExternalAuthConfig's generation, which is updated on mutation by the API Server. | | |
343+
| `configHash` _string_ | ConfigHash is a hash of the current configuration for change detection | | |
344+
| `referencingServers` _string array_ | ReferencingServers is a list of MCPServer resources that reference this MCPExternalAuthConfig<br />This helps track which servers need to be reconciled when this config changes | | |
345+
346+
246347
#### MCPRegistry
247348

248349

@@ -462,6 +563,7 @@ _Appears in:_
462563
| `audit` _[AuditConfig](#auditconfig)_ | Audit defines audit logging configuration for the MCP server | | |
463564
| `tools` _string array_ | ToolsFilter is the filter on tools applied to the MCP server<br />Deprecated: Use ToolConfigRef instead | | |
464565
| `toolConfigRef` _[ToolConfigRef](#toolconfigref)_ | ToolConfigRef references a MCPToolConfig resource for tool filtering and renaming.<br />The referenced MCPToolConfig must exist in the same namespace as this MCPServer.<br />Cross-namespace references are not supported for security and isolation reasons.<br />If specified, this takes precedence over the inline ToolsFilter field. | | |
566+
| `externalAuthConfigRef` _[ExternalAuthConfigRef](#externalauthconfigref)_ | ExternalAuthConfigRef references a MCPExternalAuthConfig resource for external authentication.<br />The referenced MCPExternalAuthConfig must exist in the same namespace as this MCPServer. | | |
465567
| `telemetry` _[TelemetryConfig](#telemetryconfig)_ | Telemetry defines observability configuration for the MCP server | | |
466568
| `trustProxyHeaders` _boolean_ | TrustProxyHeaders indicates whether to trust X-Forwarded-* headers from reverse proxies<br />When enabled, the proxy will use X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Port,<br />and X-Forwarded-Prefix headers to construct endpoint URLs | false | |
467569

@@ -481,6 +583,7 @@ _Appears in:_
481583
| --- | --- | --- | --- |
482584
| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#condition-v1-meta) array_ | Conditions represent the latest available observations of the MCPServer's state | | |
483585
| `toolConfigHash` _string_ | ToolConfigHash stores the hash of the referenced ToolConfig for change detection | | |
586+
| `externalAuthConfigHash` _string_ | ExternalAuthConfigHash is the hash of the referenced MCPExternalAuthConfig spec | | |
484587
| `url` _string_ | URL is the URL where the MCP server can be accessed | | |
485588
| `phase` _[MCPServerPhase](#mcpserverphase)_ | Phase is the current phase of the MCPServer | | Enum: [Pending Running Failed Terminating] <br /> |
486589
| `message` _string_ | Message provides additional information about the current phase | | |
@@ -835,6 +938,23 @@ _Appears in:_
835938
| `requests` _[ResourceList](#resourcelist)_ | Requests describes the minimum amount of compute resources required | | |
836939

837940

941+
#### SecretKeyRef
942+
943+
944+
945+
SecretKeyRef is a reference to a key within a Secret
946+
947+
948+
949+
_Appears in:_
950+
- [TokenExchangeConfig](#tokenexchangeconfig)
951+
952+
| Field | Description | Default | Validation |
953+
| --- | --- | --- | --- |
954+
| `name` _string_ | Name is the name of the secret | | Required: \{\} <br /> |
955+
| `key` _string_ | Key is the key within the secret | | Required: \{\} <br /> |
956+
957+
838958
#### SecretRef
839959

840960

@@ -964,6 +1084,30 @@ _Appears in:_
9641084
| `prometheus` _[PrometheusConfig](#prometheusconfig)_ | Prometheus defines Prometheus-specific configuration | | |
9651085

9661086

1087+
#### TokenExchangeConfig
1088+
1089+
1090+
1091+
TokenExchangeConfig holds configuration for RFC-8693 OAuth 2.0 Token Exchange.
1092+
This configuration is used to exchange incoming authentication tokens for tokens
1093+
that can be used with external services.
1094+
The structure matches the tokenexchange.Config from pkg/auth/tokenexchange/middleware.go
1095+
1096+
1097+
1098+
_Appears in:_
1099+
- [MCPExternalAuthConfigSpec](#mcpexternalauthconfigspec)
1100+
1101+
| Field | Description | Default | Validation |
1102+
| --- | --- | --- | --- |
1103+
| `tokenUrl` _string_ | TokenURL is the OAuth 2.0 token endpoint URL for token exchange | | Required: \{\} <br /> |
1104+
| `clientId` _string_ | ClientID is the OAuth 2.0 client identifier | | Required: \{\} <br /> |
1105+
| `clientSecretRef` _[SecretKeyRef](#secretkeyref)_ | ClientSecretRef is a reference to a secret containing the OAuth 2.0 client secret | | Required: \{\} <br /> |
1106+
| `audience` _string_ | Audience is the target audience for the exchanged token | | Required: \{\} <br /> |
1107+
| `scopes` _string array_ | Scopes is a list of OAuth 2.0 scopes to request for the exchanged token | | |
1108+
| `externalTokenHeaderName` _string_ | ExternalTokenHeaderName is the name of the custom header to use for the exchanged token.<br />If set, the exchanged token will be added to this custom header (e.g., "X-Upstream-Token").<br />If empty or not set, the exchanged token will replace the Authorization header (default behavior). | | |
1109+
1110+
9671111
#### ToolConfigRef
9681112

9691113

0 commit comments

Comments
 (0)