Repository navigation
Description
Part of "Delegated client access to a user's connections" (#6406). Split from "Ownership-checked credential read for delegated tokens, keyed by user and routed provider" (#6407), which shipped part A and the upstream_inject read with its exported option ("Read delegated credentials in upstream_inject" (#7355)).
Why. A token admitted on the delegated route has no tsid, so Identity.UpstreamTokens is empty for it. upstream_inject now reads the user's credential through UserCredentialReader. The other strategies that take a subject token from the user's upstream credential still fail closed on the delegated route.
What changes
token_exchange(including the OBO variant),aws_stsandxaaread the subject token for the routed backend's provider through the reader on the delegated route, using the shared lookup from Read delegated credentials in upstream_inject #7355. They never fall back toIdentity.UpstreamTokens. Other routes are unchanged.xaaneeds a valid ID token. The reader can return a credential whose ID token has expired when its refresh failed, soxaachecks the ID token's expiry and fails the call with the error that names the provider.thv vmcp servebuilds the reader before it discovers backends and passes it to every strategy, so a CLI-built vMCP gets the same reads as an embedder. Storage that is not user-keyed still fails closed per request.- With user-keyed storage,
thv vmcp serverefuses to start if its token validator is not bound to the embedded issuer, has no audience, or does not verify tokens with the in-process key provider.
Acceptance
- Per strategy: the reader is used on the delegated route and
Identity.UpstreamTokensis ignored; fail closed with no reader; the named error for no connection orinvalid_grant; the generic 500 for another user's row; a user ID in the tool arguments does not change which row is read. xaa: a credential with an expired ID token fails the call with the named error.thv vmcp serve: the reader reaches the strategies; the startup check stops the vMCP with an error that names the missing setting.
Does not block "Delegated access: turn on subject resolution at ID-JAG redemption" (#7247) or Mecatl phase 1, which uses upstream_inject only.
Depends on. Nothing open. Work in progress on branch credential-read-5-remaining-strategies (needs rebasing onto main; its first commits are older copies of #7353 and #7355).
Activity