RFC for vMCP upstream_inject outgoing auth strategy#54
Merged
tgrunnagle merged 3 commits intomainfrom Mar 13, 2026
Merged
Conversation
jhrozek
reviewed
Mar 11, 2026
jhrozek
reviewed
Mar 11, 2026
Contributor
jhrozek
left a comment
There was a problem hiding this comment.
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
previously approved these changes
Mar 12, 2026
9 tasks
jerm-dro
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.UpstreamTokensat middleware time — but deliberately deferred the outgoing strategy that consumes those tokens. This PR adds that strategy.upstream_injectoutgoing auth strategy, which reads a named provider's access token fromidentity.UpstreamTokens map[string]stringand injects it asAuthorization: Beareron outgoing backend requests.identity.UpstreamTokensdirectly (noUpstreamTokenSourceinterface), consistent with RFC-0052's eager-load pattern.subjectProviderNameenhancement totoken_exchangefor cases where the backend STS trusts an upstream IDP rather than the TH-AS issuer.ExternalAuthTypeUpstreamInject,UpstreamInjectSpec,UpstreamInjectConverter, andsubjectProviderNameon the existingTokenExchangeConfigCRD type.