You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Discovered-mode outgoing auth: should an explicit per-backend override win over discovered auth? #6329
Split out of the #6242 review, where this was (rightly) flagged as a behaviour change that should not be settled as a side effect of a PR about reporting unsupported auth types.
Current behaviour
With VirtualMCPServer.spec.outgoingAuth.source: discovered, auth discovered from the backend resource's own externalAuthConfigRef wins over an explicit per-backend entry in spec.outgoingAuth.backends. The explicit entry only takes effect as a fallback when the backend has no discovered auth (pkg/vmcp/aggregator/discoverer.go, applyAuthConfigToBackend).
Question
Is that the intended precedence? An operator who writes an explicit entry for a specific named backend arguably expresses stronger intent than the backend's own declaration — that is how per-backend overrides read elsewhere in the config. On the other hand, the backend resource's declaration is maintained closest to the backend, and letting the vMCP spec override it means a vMCP author can point a backend at a different credential than its owner configured — which may be exactly the point, or exactly the problem, depending on the trust model between the two roles.
Whichever way this lands, it decides which credential a live backend authenticates with, so it deserves its own decision (and probably a note in the VirtualMCPServer docs about which side wins and why). The first revision of #6242 implemented override-wins together with an ExplicitBackends marker to distinguish operator-written entries from discovery-populated ones in the generated config; that implementation was reverted per review but can serve as a reference point.
Sorry for the slow response on this one, @3nesdeniz. Thanks for splitting it out of #6242 so it gets a proper decision.
You have the current behaviour right. In discovered mode the backend's own auth is kept whenever it has any, and an explicit entry under spec.outgoingAuth.backends only applies as a fallback. The same resolution runs at startup and when the Kubernetes backend watcher rebuilds a backend.
Whether that is the precedence we want depends on the trust model between backend owners and vMCP authors, so we are taking it to the team for a decision rather than settling it in a PR. If we decide to change it or document it, we will follow up here, and your earlier override-wins revision is a useful reference. If you do not hear back from us for a while, that most likely means it is not something we can prioritize in the near term, but the issue stays open.
Activity
ChrisJBurns commentedon Oct 30, 2026
Sorry for the slow response on this one, @3nesdeniz. Thanks for splitting it out of #6242 so it gets a proper decision.
You have the current behaviour right. In
discoveredmode the backend's own auth is kept whenever it has any, and an explicit entry underspec.outgoingAuth.backendsonly applies as a fallback. The same resolution runs at startup and when the Kubernetes backend watcher rebuilds a backend.Whether that is the precedence we want depends on the trust model between backend owners and vMCP authors, so we are taking it to the team for a decision rather than settling it in a PR. If we decide to change it or document it, we will follow up here, and your earlier override-wins revision is a useful reference. If you do not hear back from us for a while, that most likely means it is not something we can prioritize in the near term, but the issue stays open.