Skip to content

Compare auth server metadata issuer ignoring trailing slash#955

Merged
guglielmo-san merged 2 commits into
modelcontextprotocol:mainfrom
edgexr:bug953
May 14, 2026
Merged

Compare auth server metadata issuer ignoring trailing slash#955
guglielmo-san merged 2 commits into
modelcontextprotocol:mainfrom
edgexr:bug953

Conversation

@gainsley
Copy link
Copy Markdown
Contributor

oauthex/auth_meta.go: fixes metadata issuer comparison to ignore trailing slash difference

Google's gmail MCP server returns https://accounts.google.com/ as the Authorization Server in the Protected Resource Metadata, but returns https://accounts.google.com in the Auth Server Metadata. This causes a comparison failure per rfc8414 section-3.3: Authorization Server Metadata Validation. The authorization server URL is meant to be a base to build other URLs from, it does not seem necessary to enforce that the trailing slash (or lack thereof) matches with the issuer URL. Please see #953 for more details.

Fixes #953

Comment thread oauthex/auth_meta_test.go Outdated
Co-authored-by: Guglielmo Colombo <guglielmoc@google.com>
@guglielmo-san guglielmo-san enabled auto-merge (squash) May 14, 2026 07:25
@guglielmo-san guglielmo-san merged commit da3535b into modelcontextprotocol:main May 14, 2026
9 checks passed
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.

auth metadata URL comparison fails due to trailing slash

2 participants