Skip to content

Read delegated credentials in token_exchange, aws_sts and xaa, and in thv vmcp serve #7359

Backlog

Description

@jhrozek

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_sts and xaa read 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 to Identity.UpstreamTokens. Other routes are unchanged.
  • xaa needs a valid ID token. The reader can return a credential whose ID token has expired when its refresh failed, so xaa checks the ID token's expiry and fails the call with the error that names the provider.
  • thv vmcp serve builds 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 serve refuses 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.UpstreamTokens is ignored; fail closed with no reader; the named error for no connection or invalid_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

  1. added
    needs-triage
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions