RFC: Multi-upstream authorization for MCPServer/MCPRemoteProxy#61
Closed
jhrozek wants to merge 1 commit into
Closed
RFC: Multi-upstream authorization for MCPServer/MCPRemoteProxy#61jhrozek wants to merge 1 commit into
jhrozek wants to merge 1 commit into
Conversation
Adds upstream claims enrichment middleware that reads the identity provider's JWT access token and merges non-protected claims into the Identity used by Cedar authorization.
Contributor
Author
|
duplicate of #4408 |
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.
Summary
rolefield (identity|backend) toUpstreamProviderConfigupstreamclaimsmiddleware with a protected-allowlist merge strategy (12 claims protected)MultiUpstreamNotSupportedcontroller guardsKey Design Decisions
iss,aud,exp,iat,nbf,jti,tsid,client_id,sub,name,email,acr,amr) are preserved from the TH JWT; all other upstream claims merge naturallysubis a critical security control: The TH JWTsubis an internal UUID fromResolveUser(), not the raw upstream subject. Overwriting would change the Cedar principal entity IDParseUnverifiedfor upstream tokens within the server trust boundary; opaque tokens silently skip enrichmentclaim_groups,claim_roles, etc.Dependencies
identity.UpstreamTokens)role: backendtoken injection)Test plan
claim_groupsfrom identity upstream🤖 Generated with Claude Code