You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add RFC 9728 resource field validation for protected resource metadata discovery #1581
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
Activity
maxisbey commentedon Aug 10, 2026
This landed as part of v2, which is now released (via #2010, #2069) — closing. Feel free to reopen if there's something still outstanding.