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

Give outbound http ability to ban private ips #2808

Merged
merged 2 commits into from
Sep 9, 2024
Merged

Conversation

rylev
Copy link
Collaborator

@rylev rylev commented Sep 6, 2024

We still allow private IPs in Spin CLI, but we might add the ability in the future to turn this off. Other runtimes might also want to take advantage of this feature.

Copy link
Collaborator

@lann lann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have a test for this.

crates/factor-outbound-http/src/wasi.rs Show resolved Hide resolved
@rylev
Copy link
Collaborator Author

rylev commented Sep 6, 2024

@lann I added a test. I don't love that the test relies on the actual system DNS resolver and is subject to being messed up if the local system is not what we expect (e.g., someone setting localhost to resolve to a non-local IP), but hopefully we don't run into issues.

Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
@rylev rylev merged commit 8ad00cc into main Sep 9, 2024
17 checks passed
@lann lann deleted the allow-private-ips branch September 9, 2024 12:39
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

Successfully merging this pull request may close these issues.

2 participants