RFC 9728 resource is used instead of base url when possible - #962
Conversation
|
@filip-konecny-tfs Can you take a look at the red checks? Once resolved we can move forward |
0ad8259 to
1e3ae88
Compare
1e3ae88 to
8b48170
Compare
|
@alexhancock I did squash the commits and shortened the message so I can pass the lint message checks. Which erased the history of checks (sorry). The public API check is confusing me as it refers things which I did not initiate, at least I think. The semver check is confusing me, should I be the one bumping it? I can if you wish to do so. P.S. @filip-konecny-tfs is my work account which I should not use for this type of activities :-). |
…ource identifier validation Solves defficiences pointed out in modelcontextprotocol#962 - Overlapping path segment tests for match in path segment instead of prefix (starts with) - Simplified check for resource url parsing
|
If you fix up the commit messages including a |
e121d58 to
a71717a
Compare
|
@alexhancock I updated the commit messages and forced pushed them. We should be able to merge this. |
|
@DaleSeo and @alexhancock, thank you for your patience and help |
Motivation and Context
Library initiates OAuth2 workflow with predefined resource as the base url to abide RFC 8707. This violates a possibility where MCP belongs under umbrella of exposed functionalities. RFC 8707 permits it in its second paragraph.
There was already implemented resource discovery from OAuth2 resource metadata document defined by RFC 9728 in PR 937 which can access the exposed resource.
Use resource defined by OAuth2 resource metadata document so the creator of MCP and its provider can control what resource are tokens requested for.
How Has This Been Tested?
2 tests were added:
PR 937 already handles situations where document has missing resource.
Breaking Changes
Breaking change: changes default behavior where base url is utilized always for resource and use defined resource by provider when available.
Types of changes
Checklist
Additional context