feat: ssrf allow CGNAT ip range for ipv4#1257
Closed
ognyvrac wants to merge 1 commit intoory:masterfrom
Closed
Conversation
|
I582987 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Contributor
|
Duplicate of ory/x#806, please check the discussion there. |
Open
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add CGNAT IP Range Support to SSRF Protection
Summary
This PR adds support for the CGNAT (Carrier-Grade NAT) IP address range 100.64.0.0/10 to the SSRF protection mechanisms in the HTTP client transports. This enables Oathkeeper to work correctly in environments using Carrier-Grade NAT infrastructure.
Background
CGNAT (Carrier-Grade NAT) uses the shared address space 100.64.0.0/10 as defined in RFC 6598. This address space is used by ISPs and organizations for internal network infrastructure when traditional private address space (RFC 1918) is insufficient or already allocated.
The CGNAT range was missing from the allowed internal IP prefixes, causing issues when Oathkeeper needs to communicate with services in CGNAT environments.
In our case, access to one of our mutators, that resides on the same Kubernetes cluster as our Oathkeeper Pod, was declined as the
100.64.0.0/10is used by the Calico CNI. This IP range should NOT be publicly exposed as per the RFC.Changes
Added 100.64.0.0/10 to the allowed IPv4 prefixes in both HTTP transport configurations:
allowInternalAllowIPv6 transport (supports both IPv4 and IPv6)
IPv4-only transport configuration
Impact
This is a non-breaking enhancement that is user transparent; thus, I do not see a need for the design document
Related issue(s)
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
security@ory.com) from the maintainers to push
the changes.
works.
Further Comments
Change is minimal, I did not see a reason to create the design document.
Furthermore, no tests exist for this part of the code - that is why I did not add any (correct me if I am wrong).
IMO comments are telling enough. As this is not a customer-facing change I do not see where to document it better.