-
Notifications
You must be signed in to change notification settings - Fork 117
fix: allow calling internal IP range 100.64.0.0/10 with relevant ResilientClient options #806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: allow calling internal IP range 100.64.0.0/10 with relevant ResilientClient options #806
Conversation
0ca4115 to
e39baf3
Compare
978dabb to
f5b7cd2
Compare
|
Thanks for the review @alnr 🙏 I pushed some edits around the suggestion about the tests. Let me know what you think :) |
f5b7cd2 to
0b46d7d
Compare
|
Thank you for the PR - I just want to note that we have pretty strict security requirements in our internal systems, and generally do not allow merging a weakening of those guarantees. Whatever ends up in the final code must deny/allow the same IP ranges as before. |
Thanks for the details, however I am unsure how to interpret them 🤔 Would you consider adding By default, we would deny the same IP ranges (the ones in ssrf), however we would allow adding an exception for 100.64.0.0/10 IPs (which can never be called today). |
0b46d7d to
13f1993
Compare
13f1993 to
f949dbf
Compare
f949dbf to
5eaf97d
Compare
5eaf97d to
66d6f05
Compare
66d6f05 to
57a2754
Compare
57a2754 to
1750395
Compare
1750395 to
a7c6090
Compare
a7c6090 to
3b0b5ec
Compare
3b0b5ec to
85a0f7b
Compare
|
@David-Wobrock |
I rebased the PR, even though I'm unsure why 035d1e2 removed all test files 🤔 |
85a0f7b to
72256de
Compare
We've recently moved to an internal monorepo using https://github.com/google/copybara to synchronize PRs with the open-source repose, and there are still a couple of rough edges to iron out. I think this is one of them. As to the general fate of this PR: I want to believe it is correct and would like to merge this change. However, #806 (comment) is still relevant. Maybe you can produce some documentation links on how adding this CIDR range is guaranteed to be safe? We value community contributions immensely. For a while now we have not had enough resources to review and merge enough of them. This will improve with time as Ory grows (looking good). ❤️ |
|
Hey @alnr
In terms of SSRF prevention, I think this PR should neither be weakening nor increasing security. The goal is to add the ability to allow this specific range, like it's done for others. It's not a special case compared to others. And I want to allow users to create an exception for this range, so that some specific IPs can be defined as valid internal callbacks. I found a related discussion on kOps: kubernetes/kops#7325. Does that make sense? :) |
The `ResilientClient` options `ResilientClientDisallowInternalIPs` and `ResilientClientAllowInternalIPRequestsTo` were not allowing to call the IP range, like 100.64.0.0/10, properly. Some IP ranges are still not possible to bypass.
72256de to
f8960cb
Compare
|
Just for my understanding here...while the default config is ok, why is there no option to override or integrate it with user-supplied config or env vars? That way, each environment could manage its own specificities. Would a PR introducing this possibility even be considered? |
The
ResilientClientoptionsResilientClientDisallowInternalIPsandResilientClientAllowInternalIPRequestsTowere not allowing to call certain IP ranges, like 100.64.0.0/10 properly.Related Issue or Design Document
Fixes: #805
And relates to Kratos issue: ory/kratos#4049
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
Further comments