Skip to content

RFC for vMCP upstream_inject outgoing auth strategy#54

Merged
tgrunnagle merged 3 commits intomainfrom
authserver-vmcp-upstream-inject_2026-03-11
Mar 13, 2026
Merged

RFC for vMCP upstream_inject outgoing auth strategy#54
tgrunnagle merged 3 commits intomainfrom
authserver-vmcp-upstream-inject_2026-03-11

Conversation

@tgrunnagle
Copy link
Contributor

Related issue: https://github.com/stacklok/stacklok-epics/issues/251

Summary

RFC-0053 (embedded AS in vMCP) wired upstream token accumulation into the vMCP auth pipeline and populated identity.UpstreamTokens at middleware time — but deliberately deferred the outgoing strategy that consumes those tokens. This PR adds that strategy.

  • Adds an RFC that specifies the upstream_inject outgoing auth strategy, which reads a named provider's access token from identity.UpstreamTokens map[string]string and injects it as Authorization: Bearer on outgoing backend requests.
  • The strategy is stateless and reads from identity.UpstreamTokens directly (no UpstreamTokenSource interface), consistent with RFC-0052's eager-load pattern.
  • Specifies an optional subjectProviderName enhancement to token_exchange for cases where the backend STS trusts an upstream IDP rather than the TH-AS issuer.
  • Covers CRD changes: ExternalAuthTypeUpstreamInject, UpstreamInjectSpec, UpstreamInjectConverter, and subjectProviderName on the existing TokenExchangeConfig CRD type.

@tgrunnagle tgrunnagle marked this pull request as ready for review March 11, 2026 20:44
@tgrunnagle tgrunnagle requested review from jerm-dro and jhrozek March 11, 2026 20:44
Copy link
Contributor

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'd just wait for Jeremy to see if the identity passing was as he wanted (I know he had opinions but I forgot what they were)

jerm-dro
jerm-dro previously approved these changes Mar 12, 2026
@tgrunnagle tgrunnagle merged commit 7c46970 into main Mar 13, 2026
1 check passed
@tgrunnagle tgrunnagle deleted the authserver-vmcp-upstream-inject_2026-03-11 branch March 13, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants