Description
Update the operator architecture documentation (docs/arch/09-operator-architecture.md) to describe the new authServerRef field, its role as the dedicated incoming auth reference (embedded auth server), its relationship to externalAuthConfigRef (outgoing auth), and the combined configuration pattern. Also regenerate the CRD API reference docs so the new fields appear in the auto-generated documentation.
Context
RFC-0050 adds a new authServerRef field to both MCPServerSpec and MCPRemoteProxySpec that separates the embedded auth server (incoming auth) from externalAuthConfigRef (outgoing auth). After #4640 lands the CRD types, controller logic, and unit tests, the architecture documentation needs to reflect these changes so developers and operators understand the new field, when to use it, and how it composes with outgoing auth types.
The existing docs/arch/09-operator-architecture.md documents both MCPServer and MCPRemoteProxy CRDs, including their key fields and configuration references. It currently has no mention of authServerRef or the incoming vs outgoing auth distinction. The CRD API reference docs at docs/operator/crd-api.md are auto-generated from Go type comments and need regeneration after the CRD type changes.
Dependencies: #4640 (CRD types, controller logic, and unit tests)
Blocks: None
Acceptance Criteria
Technical Approach
Recommended Implementation
The documentation updates focus on three areas within docs/arch/09-operator-architecture.md:
-
MCPServer section (around line 139-158): Add authServerRef to the list of supported configuration references, alongside the existing oidcConfigRef, telemetryConfigRef, and externalAuthConfigRef entries. Explain that authServerRef is the preferred path for configuring the embedded OAuth 2.0/OIDC authorization server (incoming auth), while externalAuthConfigRef is used for outgoing auth types (token exchange, AWS STS, bearer token injection, etc.).
-
MCPRemoteProxy section (around line 243-258): Add authServerRef to the key fields list. This is the primary use case -- enabling the embedded auth server alongside AWS STS request signing on the same proxy resource. Include a brief YAML snippet showing the combined pattern.
-
CRD Relationships Mermaid diagram (around line 102-137): Add authServerRef edges from both Server and Proxy nodes to the ExtAuth configuration node, using a distinct line style (e.g., dotted with different annotation) to visually distinguish it from externalAuthConfigRef.
-
MCPExternalAuthConfig section (around line 185-195): Update the description to note that MCPExternalAuthConfig resources can now be referenced via two paths: externalAuthConfigRef for outgoing auth types, and authServerRef for the embedded auth server type.
After documentation edits, regenerate the CRD API reference by running task crdref-gen from the cmd/thv-operator/ directory. This produces docs/operator/crd-api.md with the new authServerRef and authServerConfigHash fields documented from Go type comments added in #4640.
Patterns & Frameworks
- Follow the existing documentation style in
docs/arch/09-operator-architecture.md -- concise descriptions with code references and YAML examples
- Use Mermaid diagram syntax consistent with the existing CRD relationships diagram
- Follow the architecture documentation guidelines from
docs/arch/README.md: start with "why", include code references, add diagrams, and cross-reference related documents
- Reference RFC-0050 for detailed design rationale
Code Pointers
docs/arch/09-operator-architecture.md (lines 139-158) - MCPServer section where authServerRef description should be added alongside existing config refs
docs/arch/09-operator-architecture.md (lines 243-258) - MCPRemoteProxy section where authServerRef and combined auth pattern should be documented
docs/arch/09-operator-architecture.md (lines 102-137) - CRD Relationships Mermaid diagram needing authServerRef edges
docs/arch/09-operator-architecture.md (lines 185-195) - MCPExternalAuthConfig section needing dual-reference-path note
docs/operator/crd-api.md - Auto-generated CRD API reference docs (regenerated, not hand-edited)
cmd/thv-operator/Taskfile.yml (line 280) - crdref-gen task definition
docs/proposals/THV-0050-embedded-as-with-aws-sts.md - RFC-0050 with full design rationale
Component Interfaces
No new code interfaces. This task produces documentation changes only.
Example YAML snippet for the combined auth pattern documentation:
# MCPRemoteProxy with embedded auth server (incoming) + AWS STS (outgoing)
apiVersion: toolhive.stacklok.dev/v1alpha1
kind: MCPRemoteProxy
metadata:
name: bedrock-proxy
spec:
remoteURL: https://bedrock-mcp.example.com
authServerRef:
apiGroup: toolhive.stacklok.dev
kind: MCPExternalAuthConfig
name: my-auth-server # type: embeddedAuthServer
externalAuthConfigRef:
name: bedrock-sts-config # type: awsSts
Testing Strategy
Manual Verification
No automated tests -- this is a documentation-only task.
Out of Scope
References
Description
Update the operator architecture documentation (
docs/arch/09-operator-architecture.md) to describe the newauthServerReffield, its role as the dedicated incoming auth reference (embedded auth server), its relationship toexternalAuthConfigRef(outgoing auth), and the combined configuration pattern. Also regenerate the CRD API reference docs so the new fields appear in the auto-generated documentation.Context
RFC-0050 adds a new
authServerReffield to bothMCPServerSpecandMCPRemoteProxySpecthat separates the embedded auth server (incoming auth) fromexternalAuthConfigRef(outgoing auth). After #4640 lands the CRD types, controller logic, and unit tests, the architecture documentation needs to reflect these changes so developers and operators understand the new field, when to use it, and how it composes with outgoing auth types.The existing
docs/arch/09-operator-architecture.mddocuments both MCPServer and MCPRemoteProxy CRDs, including their key fields and configuration references. It currently has no mention ofauthServerRefor the incoming vs outgoing auth distinction. The CRD API reference docs atdocs/operator/crd-api.mdare auto-generated from Go type comments and need regeneration after the CRD type changes.Dependencies: #4640 (CRD types, controller logic, and unit tests)
Blocks: None
Acceptance Criteria
docs/arch/09-operator-architecture.mddescribes theauthServerReffield on both MCPServer and MCPRemoteProxyauthServerRefas the dedicated incoming auth reference (embedded auth server) distinct fromexternalAuthConfigRef(outgoing auth)authServerReffor embedded auth server +externalAuthConfigReffor AWS STS on the same resource)externalAuthConfigRefwithtype: embeddedAuthServercontinues to work09-operator-architecture.mdincludesauthServerRefedges from MCPServer and MCPRemoteProxy to MCPExternalAuthConfigtask crdref-gen(fromcmd/thv-operator/)Technical Approach
Recommended Implementation
The documentation updates focus on three areas within
docs/arch/09-operator-architecture.md:MCPServer section (around line 139-158): Add
authServerRefto the list of supported configuration references, alongside the existingoidcConfigRef,telemetryConfigRef, andexternalAuthConfigRefentries. Explain thatauthServerRefis the preferred path for configuring the embedded OAuth 2.0/OIDC authorization server (incoming auth), whileexternalAuthConfigRefis used for outgoing auth types (token exchange, AWS STS, bearer token injection, etc.).MCPRemoteProxy section (around line 243-258): Add
authServerRefto the key fields list. This is the primary use case -- enabling the embedded auth server alongside AWS STS request signing on the same proxy resource. Include a brief YAML snippet showing the combined pattern.CRD Relationships Mermaid diagram (around line 102-137): Add
authServerRefedges from both Server and Proxy nodes to the ExtAuth configuration node, using a distinct line style (e.g., dotted with different annotation) to visually distinguish it fromexternalAuthConfigRef.MCPExternalAuthConfig section (around line 185-195): Update the description to note that
MCPExternalAuthConfigresources can now be referenced via two paths:externalAuthConfigReffor outgoing auth types, andauthServerReffor the embedded auth server type.After documentation edits, regenerate the CRD API reference by running
task crdref-genfrom thecmd/thv-operator/directory. This producesdocs/operator/crd-api.mdwith the newauthServerRefandauthServerConfigHashfields documented from Go type comments added in #4640.Patterns & Frameworks
docs/arch/09-operator-architecture.md-- concise descriptions with code references and YAML examplesdocs/arch/README.md: start with "why", include code references, add diagrams, and cross-reference related documentsCode Pointers
docs/arch/09-operator-architecture.md(lines 139-158) - MCPServer section whereauthServerRefdescription should be added alongside existing config refsdocs/arch/09-operator-architecture.md(lines 243-258) - MCPRemoteProxy section whereauthServerRefand combined auth pattern should be documenteddocs/arch/09-operator-architecture.md(lines 102-137) - CRD Relationships Mermaid diagram needingauthServerRefedgesdocs/arch/09-operator-architecture.md(lines 185-195) - MCPExternalAuthConfig section needing dual-reference-path notedocs/operator/crd-api.md- Auto-generated CRD API reference docs (regenerated, not hand-edited)cmd/thv-operator/Taskfile.yml(line 280) -crdref-gentask definitiondocs/proposals/THV-0050-embedded-as-with-aws-sts.md- RFC-0050 with full design rationaleComponent Interfaces
No new code interfaces. This task produces documentation changes only.
Example YAML snippet for the combined auth pattern documentation:
Testing Strategy
Manual Verification
docs/arch/09-operator-architecture.mdrenders correctly (Mermaid diagrams, YAML snippets, cross-references)task crdref-gencompletes without errors anddocs/operator/crd-api.mdincludesauthServerRefandauthServerConfigHashfield documentationNo automated tests -- this is a documentation-only task.
Out of Scope
stacklok/docs-website(covered by fix(deps): update module github.com/lmittmann/tint to v1.1.2 #671)References