Skip to content

feat: allow opting into private oauth metadata hosts#954

Open
DaleSeo wants to merge 2 commits into
mainfrom
feat/oauth-allow-private-metadata-hosts
Open

feat: allow opting into private oauth metadata hosts#954
DaleSeo wants to merge 2 commits into
mainfrom
feat/oauth-allow-private-metadata-hosts

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Jul 3, 2026

Copy link
Copy Markdown
Member

Motivation and Context

The SSRF hardening in PR #935 blocks loopback and private-network metadata hosts with no opt-out, which breaks local dev, some enterprise setups, and the client side of the official conformance suite that uses 127.0.0.1. This adds an opt-in set_allow_private_metadata_hosts on AuthorizationManager and OAuthState to allow only loopback/private hosts while still rejecting cloud-metadata and link-local addresses.

How Has This Been Tested?

New unit tests cover the guard directly.

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 Jul 3, 2026
@DaleSeo DaleSeo marked this pull request as ready for review July 3, 2026 12:35
@DaleSeo DaleSeo requested a review from a team as a code owner July 3, 2026 12:35
@DaleSeo DaleSeo self-assigned this Jul 3, 2026
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