darklynx / request-baskets

HTTP requests collector to test webhooks, notifications, REST clients and more ...
https://rbaskets.in
MIT License
339 stars 52 forks source link

Add allow/deny feature for forward URLs #79

Open UiP9AV6Y opened 1 year ago

UiP9AV6Y commented 1 year ago

we operate the application in kubernetes and want to avoid access to internal ressources via request-baskets, as it can be turned into an open proxy. the most flexible use is probably to provide the ability to allow/deny domains and ip ranges.

example use cases:

by default, everything is allowed and nothing is denied (just as before). denials are applied after allowances, so that you can allow on a broad scale and deny granular.

given that the validation only has to be performed on basket creation/updates, the resource overhead for domain resolution should be relatively low.

eliliam commented 1 year ago

Any update on this? This would be a great feature to add

darklynx commented 1 year ago

PRs are welcome

darklynx commented 1 year ago

we operate the application in kubernetes and want to avoid access to internal ressources via request-baskets, as it can be turned into an open proxy.

That is a very valid concern šŸ‘

The easiest solution is an option to disable forwarding in general.

The proposed solution sounds like a reasonable amount of development with additional testing of corner cases like resolving a domain into IP and sub-network. Maybe there are already libraries in Go that solves that problem and they can be easily applied here. But I'm not aware of them, and not that familiar with such kind of libraries. Also I have a limited free time at the moment.

Hence, PRs for improvements are welcome and very much appreciated.

Thank you! šŸ™

darklynx commented 1 year ago

I think that the unrestricted forwarding feature made the Request Baskets "famous" and got us to the CVE database šŸ˜…: https://nvd.nist.gov/vuln/detail/CVE-2023-27163

And some samples of Request Baskets misuse, when running the service non-isolated from the rest of your network šŸ˜°: https://cyb3rc4t.hashnode.dev/htb-writeupsau