-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
P1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featureauthIssues and PRs related to Authentication / OAuthIssues and PRs related to Authentication / OAuthbugSomething isn't workingSomething isn't working
Description
Problem
PR #1548 implemented SEP-985 fallback discovery but is missing a critical security requirement from RFC 9728 Section 3.3.
RFC 9728 Section 3.3 requires: The resource field in protected resource metadata responses MUST be validated to match the expected resource identifier. If values don't match, the metadata MUST be rejected.
This validation prevents impersonation attacks where a malicious server returns metadata claiming to describe a legitimate resource but containing attacker-controlled authorization servers.
What's Needed
Client must validate:
- Same origin validation: Resource field must have same scheme, host, and port as the server
- Path validation for path-based discovery: When using
/.well-known/oauth-protected-resource/{path}, the resource field must match or be a valid parent of the expected path - Fallback on mismatch: Reject invalid metadata and try the next discovery URL in the fallback chain
Related
Metadata
Metadata
Assignees
Labels
P1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featureauthIssues and PRs related to Authentication / OAuthIssues and PRs related to Authentication / OAuthbugSomething isn't workingSomething isn't working