-
Notifications
You must be signed in to change notification settings - Fork 116
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: Enable Native TLS Support for Cloud Run Deployments #365
Comments
Our concern with similar proposals has been that if we make it easy to deploy the proxy without TLS, then people who don't know what they're doing will end up deploying it without TLS while exposed to the public Internet. We've had problems with third-party apps being misconfigured in this way in the past. I'm open to suggestions for accomplishing what your'e after, but it needs friction. Friction is load-bearing here; it discourages an enthusiastic but non-techncial DIYer from blindly adding flags or running commands in a terminal. For example, even though TLS breaks server authentication instead of client authentication, this breakage deters most users from setting up insecure deployments because of the red flags that get raised when server authentication breaks. One alternative: Use this repository as a package instead of using tesla-proxy directly. Tesla proxy is a thin wrapper around the proxy package, and you could write another thin wrapper that does what you want without needing to fork. |
Okay, thank you, Seth. That's perfectly reasonable. Let me try and think of a solution that will make it feasible to deploy to certain platforms but still maintain enough friction to not allow people to irresponsibly deploy butchered, insecure instances. |
@sethterashima I managed to get it to run successfully in Cloud Run with the following commit: gbhall@813d0e8 I'd still like to incorporate this into the official repo. I understand this commit introduced the lack of friction you're describing. If you're happy, I can add a bit more friction. However, this implementation works perfectly with Cloud Run, which is an ideal platform for deployment. |
I consider the following a workaround and also wish for a proper config switch, running a second proxy is probably the maximum "friction" possible. @gbhall I am able to run the unmodified tesla-http-proxy on gcloud run with a nginx sidecar similar to whats described on https://cloud.google.com/run/docs/internet-proxy-nginx-sidecar So run tesla-http-proxy with (self signed) HTTPS and It is of course not quite right to proxy once again and go back to https, and also wastes some resources having to run nginx. But it works and at my current scale of 1 vehicle, that does not matter and is easier to run than a fork/thin wrapper. I'm still exploring if this is a good "free" deployment option. service.yaml
nginx.conf
|
What about using the if the header is set by the reverse proxy / TLS offloading it should be enough, right? |
Description
Currently, deploying the application to Google Cloud Run necessitates providing TLS key and certificate files as arguments during deployment. However, Cloud Run manages HTTPS termination externally, forwarding decrypted HTTP traffic to the container. This dual TLS handling results in conflicts and errors such as:
"Client sent an HTTP request to an HTTPS server."
http: TLS handshake error from <IP>: EOF
Additionally, omitting TLS arguments prevents the application from starting, as it relies on these configurations for secure operations.
Error loading public key: open : no such file or directory
Proposed Solution
Introduce a configuration option or modification within the application to conditionally handle TLS based on the deployment environment or the presence of specific environment variables. This would enable the application to:
Current Deployment Command
The text was updated successfully, but these errors were encountered: