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

proxy support required for use in private subnets without internet egress (PCI, IRAP, ISM, SOC2, ISO27018) #146

Open
chrisdlangton opened this issue Sep 11, 2020 · 1 comment
Labels
difficulty: medium fix is medium in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap

Comments

@chrisdlangton
Copy link

chrisdlangton commented Sep 11, 2020

I cannot use send grid to send email from a webserver that is in a private subnet.

The webserver is behind a load balancer for ingress and requires a proxy (allowed hosts list) for egress.

This workload must be compliant, so best practices in security are required. This network topology is baseline standard (but more commonly users will leave everything ooen and exposed) for the basics to meet compliance for CIS, PCI, IRAP, ISM, SOC2, ISO27018

This lib can be removed as redundant from my observation.
I suggest sendgrid use urllib to do HTTP instead of reinvent the wheel. if you need more features use requests instead of reinvent the aircraft.
Both of these options allow a per-request proxy setting AND most importantly they both respect the operating system proxy setting (on linux it is the env var http_proxy and https_proxy case insensitive).

I would appreciate some attention on this. thank you

@childish-sambino
Copy link
Contributor

This repo uses urllib but it does not expose its interfaces for adding request handlers:

opener = urllib.build_opener()
request = urllib.Request(
self._build_url(query_params),
headers=self.request_headers,
data=data,
)

I think adding a proxies arg to def http_request which would just be passed to a new ProxyHandler that's passed to the opener would work. Then the interface would look similar to that of requests. This would not handle the env vars use case, but that may not be difficult.

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

@childish-sambino childish-sambino added difficulty: medium fix is medium in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap labels Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

2 participants