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

feat: remove SafeRoundTripper and allow private-IP HTTP connections #1152

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

hf
Copy link
Contributor

@hf hf commented Jun 20, 2023

Removes SafeRoundTripper which was a HTTP RoundTripper which did not allow establishing HTTP connections to servers listening on private IP addresses.

This is probably inherited from the Netlify codebase, and was added as a safeguard to avoid cyclic requests with their hooks implementation which is not used by Supabase.

Why it's absolutely normal to expect connections to private IP addresses:

  • Running GoTrue in Kuberenetes, AWS ECS, or other places.
  • Local development with Docker, which loves to create virtual private networks inside containers all the time.
  • Caches inside VPCs.
  • Rendering templates served only within the VPC and not those that are publicly available.

@hf hf requested a review from a team as a code owner June 20, 2023 14:57
@hf hf force-pushed the hf/remove-safe-round-tripper branch from 071ae1c to cc01c53 Compare June 20, 2023 15:01
@silentworks
Copy link

silentworks commented Jun 20, 2023

Looks like the test is failing because it's still referencing a variable that was removed in this PR.

@hf hf force-pushed the hf/remove-safe-round-tripper branch from cc01c53 to 08dece3 Compare June 20, 2023 15:42
@hf hf force-pushed the hf/remove-safe-round-tripper branch from 08dece3 to f1e9be7 Compare June 20, 2023 15:48
Copy link

@silentworks silentworks left a comment

Choose a reason for hiding this comment

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

LGTM!

@kangmingtay
Copy link
Member

@hf fwiw, i dont think this will resolve the issue because we use netlify's mailme under the hood which imports the netlify http commons package: https://github.com/netlify/mailme/blob/876c043aa349526e4372914d5ee416ec1de242f1/mailme.go#L120

@kangmingtay
Copy link
Member

also i think we should update the description in the PR and unlink the issue to avoid confusion

@hf hf merged commit 773e45e into master Jun 28, 2023
@hf hf deleted the hf/remove-safe-round-tripper branch June 28, 2023 07:31
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
…supabase#1152)

Removes `SafeRoundTripper` which was a HTTP `RoundTripper` which did not
allow establishing HTTP connections to servers listening on private IP
addresses.

This is probably inherited from the Netlify codebase, and was added as a
safeguard to avoid cyclic requests with their hooks implementation which
is not used by Supabase.

Why it's absolutely normal to expect connections to private IP
addresses:

- Running GoTrue in Kuberenetes, AWS ECS, or other places. 
- Local development with Docker, which loves to create virtual private
networks inside containers all the time.
- Caches inside VPCs.
- Rendering templates served only within the VPC and not those that are
publicly available.
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
…supabase#1152)

Removes `SafeRoundTripper` which was a HTTP `RoundTripper` which did not
allow establishing HTTP connections to servers listening on private IP
addresses.

This is probably inherited from the Netlify codebase, and was added as a
safeguard to avoid cyclic requests with their hooks implementation which
is not used by Supabase.

Why it's absolutely normal to expect connections to private IP
addresses:

- Running GoTrue in Kuberenetes, AWS ECS, or other places. 
- Local development with Docker, which loves to create virtual private
networks inside containers all the time.
- Caches inside VPCs.
- Rendering templates served only within the VPC and not those that are
publicly available.
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
…supabase#1152)

Removes `SafeRoundTripper` which was a HTTP `RoundTripper` which did not
allow establishing HTTP connections to servers listening on private IP
addresses.

This is probably inherited from the Netlify codebase, and was added as a
safeguard to avoid cyclic requests with their hooks implementation which
is not used by Supabase.

Why it's absolutely normal to expect connections to private IP
addresses:

- Running GoTrue in Kuberenetes, AWS ECS, or other places. 
- Local development with Docker, which loves to create virtual private
networks inside containers all the time.
- Caches inside VPCs.
- Rendering templates served only within the VPC and not those that are
publicly available.
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.

3 participants