Skip to content

Add AuthServerConfig validation condition to VirtualMCPServer reconciler#4350

Draft
jhrozek wants to merge 3 commits intovmcp-add-as-scaffolding-3from
vmcp-add-as-scaffolding-4
Draft

Add AuthServerConfig validation condition to VirtualMCPServer reconciler#4350
jhrozek wants to merge 3 commits intovmcp-add-as-scaffolding-3from
vmcp-add-as-scaffolding-4

Conversation

@jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Mar 24, 2026

Summary

  • When a VirtualMCPServer has an inline AuthServerConfig, the operator should validate it during reconciliation and surface the result as a status condition.
  • Add AuthServerConfigValidated condition to the VirtualMCPServer reconciler that is set when inline AuthServerConfig is present on the spec.
  • Add SetAuthServerConfigValidatedCondition to the status collector interface.
  • Add E2E test for the condition lifecycle.

Fixes: #4143

Type of change

  • New feature

Test plan

  • Unit tests (task test)
  • Linting (task lint-fix)
  • E2E tests (new virtualmcp_authserver_config_test.go)

Special notes for reviewers

Draft — stacked on #4349. Review the incremental diff only.

Generated with Claude Code

jhrozek and others added 3 commits March 24, 2026 15:27
Phase 2 of the vMCP embedded authorization server (#4141):

- Add RegisterHandlers(mux) to EmbeddedAuthServer — the AS owns its
  route paths (/oauth/, /.well-known/openid-configuration, etc.)
- Add AuthServer field to vMCP server Config
- Replace /.well-known/ catch-all with explicit registrations:
  /.well-known/oauth-protected-resource (exact + subpath) is always
  registered; Mode B conditionally adds AS discovery/JWKS routes
- No commands.go changes — CLI path deferred to Phase 4

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add StrategyTypeUpstreamInject and UpstreamInjectConfig to backend auth
strategy types. Add ValidateAuthServerIntegration with cross-cutting
validation rules (V-01 through V-07) that accept (*Config, *RunConfig)
as separate arguments rather than a combined RuntimeConfig type.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add RuntimeConfig and AuthServerConfig wrapper types to config model
  (runtime-only, not part of CRD schema)
- Set AuthServerConfigValidated condition in reconciler when inline
  AuthServerConfig is present on the spec
- Add E2E test for AuthServerConfigValidated condition lifecycle

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the size/S Small PR: 100-299 lines changed label Mar 24, 2026
@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.24%. Comparing base (d447384) to head (244236f).

Files with missing lines Patch % Lines
...perator/controllers/virtualmcpserver_controller.go 0.00% 5 Missing and 1 partial ⚠️
...v-operator/pkg/virtualmcpserverstatus/collector.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           vmcp-add-as-scaffolding-3    #4350      +/-   ##
=============================================================
- Coverage                      69.32%   69.24%   -0.08%     
=============================================================
  Files                            479      479              
  Lines                          48571    48579       +8     
=============================================================
- Hits                           33671    33640      -31     
- Misses                         12302    12339      +37     
- Partials                        2598     2600       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jhrozek jhrozek force-pushed the vmcp-add-as-scaffolding-3 branch from d447384 to 39a9a1e Compare March 24, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants