- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3
Description
Strengthen SSRF Protection Requirements to Mandatory Standards
Summary: Section 6.5 Server Side Request Forgery (SSRF) Attacks uses SHOULD language and could benefit from more specific implementation guidance to help authorization servers prevent SSRF attacks.
Current Specification Language
From Section 6.5 Server Side Request Forgery (SSRF) Attacks:
Authorization servers fetching the client metadata document and resolving URLs located in the metadata document should be aware of possible SSRF attacks. Authorization servers SHOULD avoid fetching any URLs using private or loopback addresses and consider network policies or other measures to prevent making requests to these addresses. Authorization servers SHOULD also be aware of the possibility that URLs might be non-http-based URI schemes which can lead to other possible SSRF attack vectors.
The current text provides good awareness guidance but could benefit from more concrete implementation details.
Rationale
As discussed in Issue #30, there's community interest in more specific SSRF protection guidance. Implementers would benefit from clearer requirements around IP address validation, timeouts, and redirect handling when fetching metadata documents.
Aaron's recent suggestions for mandatory Accept headers and authentication-first approaches provide a good foundation for more detailed requirements.
Recommendation
Enhancing Section 6.5 with more specific guidance:
6.5 Server Side Request Forgery (SSRF) Attacks
Authorization servers MUST implement SSRF protections when fetching client metadata documents to prevent abuse as attack vectors against internal networks.
Authorization servers MUST validate that client metadata document URLs do not resolve to special-use IP addresses as defined in the IANA Special-Use IP Address Registry [RFC6890]. This validation MUST occur after DNS resolution and MUST account for DNS rebinding attacks.
Authorization servers MUST implement connection timeouts and MUST limit HTTP redirects when fetching metadata documents to prevent resource exhaustion and redirect-based bypass attacks.
And adding to Section 4 Client Information Discovery:
Authorization servers MUST include an
Accept: application/jsonheader when fetching client metadata documents.Authorization servers SHOULD defer fetching client metadata documents until after user authentication to reduce the attack surface for unauthenticated requests.
And adding the following normative reference:
RFC6890:
  title: "Special-Use IP Addresses"
  date: 2013-04
  target: https://www.rfc-editor.org/rfc/rfc6890.html
Related Work
- Builds on community discussion in Issue #30 where implementers shared experiences with SSRF protection
- Incorporates Aaron's recommendations for Acceptheaders and authentication-first approaches
- Complements existing security considerations in Section 6
Implementation Impact
These enhancements would provide clearer security guidance that authorization server implementers could reference during development. The more specific requirements would help ensure consistent SSRF protections across implementations while maintaining flexibility in deployment-specific timeout and redirect limit values.