-
Notifications
You must be signed in to change notification settings - Fork 617
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
Feature Request: IP Whitelisting #439
Comments
No this is t supported right now but shouldn’t be too hard to add. How often do these ip ranges change? Also, no need to apologize :) |
Good to know is relatively easy! I wouldn't have thought they would change TOO often. Being easily updatable is always nice though. Possibly another |
I was working on a PR for this exact thing or very similar. A few options to allow simple ACL type behavior. Example: only allow traffic from the specified source blocks (default deny) allow all traffic except traffic from the specified source blocks (default allow) Specifying an |
@microadam would that address your need? @magiconair have any suggestions around that approach? |
That looks good. The only question I had what to do with the PROXY connections? You'd have to use the |
That's true, it wouldn't be the actual source at that point but the "declared" source from |
@leprechau IPv6 addresses, hostnames (dns reverse lookup timeout comes to mind...) I also thought about more complex use cases like testing for cookies and so forth but I think that should live in the app layer. While thinking about this: Is this something that should be configured on a per-route level or on a global level? What is the underlying use-case? |
In our use case we have some services that need to be exposed via the load balancer but shouldn't necessarily have complete unrestricted access. We could use firewall rules on the load balancer itself but that would require dedicated IPs or bind ports for those specific services. Having a light ACL option on the route would allow this to happen without needing dynamic listeners. |
To the IPv6 part the |
Just in case we change our minds and allow more complex rules should there be an indication that the value after Wild thinking:
Could the first argument be something that's considered a filter function and the remainder the input values? Can you have more than one I'm not saying we need all this right now or ever but if we can design the syntax in a way that allows us to extend the use-case later then that might help. Also, if you think this would be overkill and we can solve that differently then I'm fine with that, too. |
Those are all valid points. I agree that having a single |
The proposed approach definitely fulfils my use case! @leprechau awesome that you are working on this! |
On an implementation point, it would probably need to look at any |
Yes, I was going to isolate that into a separate getRemoteIP function or something similar. I have the CIDR processing done but I need to work on putting the option processing into it's own function to check for subgroups ( |
@leprechau please keep it to ip matching for now unless you're confident that you thought the other option through. |
@magiconair It currently only supports the |
@microadam would appreciate your feedback as well ... especially if you can build the code in the PR and let me know how it works for you. |
Apologies if this is mentioned elsewhere, I couldn't see anything.
It would be great if we could whitelist specific hostnames to specific IP ranges. Not sure if something like that is planned or outside of the scope of this project?
Thanks!
The text was updated successfully, but these errors were encountered: