Skip to content

fix(auth): let url origin decide protected resource metadata discovery - #1264

Open
DaleSeo wants to merge 1 commit into
mainfrom
fix-auth-prm-discovery-follow-ups
Open

fix(auth): let url origin decide protected resource metadata discovery#1264
DaleSeo wants to merge 1 commit into
mainfrom
fix-auth-prm-discovery-follow-ups

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Sep 12, 2026

Copy link
Copy Markdown
Member

Motivation and Context

Follow-up to PR #1204: a .well-known guess only rules itself out, while an advertised URL reports the error. Two cases were still ignoring the origin. A resource_metadata pointer found in a .well-known candidate's 401 response was fetched as Advertised. That meant a bad document could end discovery without trying the remaining candidates. It is now treated as a WellKnownGuess. Advertised is reserved for the resource's own challenge.

How Has This Been Tested?

Added tests

Breaking Changes

None

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@github-actions github-actions Bot added T-core Core library changes T-transport Transport layer changes labels Sep 12, 2026
@DaleSeo
DaleSeo marked this pull request as ready for review September 12, 2026 15:52
@DaleSeo
DaleSeo requested a review from a team as a code owner September 12, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant