GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — Add AuthSettings.validate_token_resource to check a bearer token's resource by maxisbey · Pull Request #3447 · modelcontextprotocol/python-sdk Conversation
|
📚 Documentation preview
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 12 files
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/run/authorization.md">
<violation number="1" location="docs/run/authorization.md:26">
P2: When introspection returns an array-valued `aud`, the bundled verifier forwards the array as `AccessToken.resource`, so Pydantic rejects the token before resource validation. Update the example verifier to select the URL-matching audience and reject the token when none matches.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Findings marked 🟡 are optional suggestions and need no follow-up push.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
RefreshToken gains an optional resource (RFC 8707 resource indicator) that a provider propagates to refreshed access tokens, as it does subject, so a server with validate_token_resource keeps accepting tokens after a refresh. The interaction suite's provider does so and a lifecycle test covers it. Also: log the reported resource with %r; note in the docs that resource_server_url should be the exact endpoint URL when the option is on; pin the default-off behaviour with an interaction test; have the simple-auth verifier pick the aud entry for this server when aud is a list.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
All reported issues were addressed across 8 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
t
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Code review found no issues
No high-confidence issues detected in this change.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
validate_token_resource becomes bool | None (default None). With a resource_server_url configured and no explicit choice, AuthSettings emits an MCPDeprecationWarning and behaves as False, so existing deployments keep working but are asked to decide; 3.0 makes True the default. An explicit False (the verifier checks the audience itself) is silent. The docs tutorials, the bearer_auth and oauth_client_credentials stories, and the oauth_server snippet now set it to True and issue tokens bound to their resource URL; docs/deprecated.md lists the new warning.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
All reported issues were addressed across 14 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…nippet URL The 3.0 default applies when resource_server_url is set (the field description, warning text, docs and deprecated.md now say so). The oauth_server snippet's resource_server_url matches the address mcp.run() serves on.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Code review found no issues
No high-confidence issues detected in this change.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.