Fix: OIDC scope handling for multi-provider compatibility#514
Merged
Conversation
- Bump mcp-oauth to v0.2.84 with provider-aware scope filtering: Google now drops unsupported scopes like "groups", and "openid" is force-merged for OIDC providers even when clients send non-standard scopes. - Remove "groups" from DefaultOAuthCIMDScopes since it is Dex-specific and should not be a universal default for CIMD scopes across providers. Made-with: Cursor
The test used a 100ms TTL with 70ms sleeps, leaving only 30ms margin. On loaded CI machines, sleep(70ms) can easily stretch past the TTL causing spurious failures. Increase TTL to 2s with 100ms sleeps. Made-with: Cursor
The mock client's ListTools returned instantly, so singleflight had no window to deduplicate concurrent calls. Add a gate channel that blocks ListTools until released, forcing overlapping calls inside singleflight. Made-with: Cursor
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
mcp-oauthfrom v0.2.82 to v0.2.84, which includes provider-aware scope filtering (Provider-aware scope filtering in resolveScopes() mcp-oauth#242 / PR Feat: Clarify SSO Token Reuse vs Token Forwarding with proactive SSO #243): Google now drops unsupported scopes likegroups, andopenidis force-merged for OIDC providers even when clients send non-standard scopes likeclaudeai.groupsfromDefaultOAuthCIMDScopes-- it is Dex-specific and should not be a universal default for CIMD scopes across all providers. Agent scopes (agentOAuthScopes) still includegroupssince Dex deployments need it for RBAC.Closes #513
Test plan
make test)muster test --parallel 50)Made with Cursor