Skip to content
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

Global allow list should be respected even if the address resolves to an internal IP #146

Open
tnsardesai opened this issue Sep 14, 2021 · 2 comments

Comments

@tnsardesai
Copy link

disclaimer: I have not tried this yet to see the actual behavior so let me know if I am wrong

In checkIfRequestShouldBeProxied() we can see safeResolve is called on every allow. So if the host resolves to an internal IP it is going to get denied. It would be great if global_allow_list was honored even if the ip resolves to an internal address (either as default or by passing some flag)

My current workaround would be to just use --unsafe-allow-private-ranges when I only want to allow some dynamic ip for a known internal hostname

@mattm-stripe
Copy link
Contributor

In our use, we have global allow entries like, say, api.some-partner.com. Those domains and their DNS is externally controlled, and we do not want them to be able to resolve to an internal IP address. So the behaviour as-is today is required for our model.

We could plausibly add an option to have domains that are allowed, even if they resolve to an internal IP. I can see how that would be useful in some circumstances. I admit to being a bit worried about ballooning complexity, especially around what I view as one of our most important security guarantees of not allowing traffic to private IPs.

@tnsardesai
Copy link
Author

That totally makes sense. Our use case is that we have an internal login sever which is used to simulate user logins during a load test. Today the only way to allow the proxy to connect to this server would be by using --unsafe-allow-private-ranges which allows access to the entire internal network.

I think implementing a flag like --unsafe-allow-private-global-list would be better so that instead of allowing all the private ranges we only allow it for a specific enter like api.internal.app.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants