-
Notifications
You must be signed in to change notification settings - Fork 147
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
Secure default or configurable TLS settings #251
Comments
This is a dealbreaker for us, because our CERT forbids services using TLS < 1.2 |
A workaround could be binding the REST servers port to localhost, set up a reverse proxy and use that to terminate TLS with proper crypto. In the distant past I used Apache httpd for that, nowadays I prefer nginx or traefik. Since this issue is open for over a year now, this should give you a fast result that makes your CERT and CISO happy. |
I have switched to rclone which has option --min-tls-version |
Proper production TLS support involves far more than what rest-server offers, and adding an option for a minimum TLS version barely scratches the surface. The option is mostly there for convenience in a simple deployment, but if you have more strict requirements, a reverse proxy is really the way to go. |
|
@Framsfex I disagree, because that answer is basically "Just don't use rest-server but a different tool". I was so frustrated by the direction this issue took during the last 24h that I dug through the code, learned a bit about go and started to write a patch that configures the tls encryption with secure default ciphersuits and enables a user to select the minimal TLS version provided by the https service. When I'm satisfied with my test results I will create a PR for it. |
Output of
rest-server --version
rest-server version rest-server 0.12.1 compiled with go1.20.5 on linux/amd64
What should rest-server do differently?
If rest-server runs with
--tls
option and proper certificates it provides an https service on the configured port (or 8000/tcp by default). But it accepts insecure cipher suits and TLS versions. I used nmap to probe the servers capabilities:What are you trying to do? What is your use case?
I'm security-focused and try to avoid insecure encryption settings in my services. In this particular case I'd prefer TLSv1.2 as the minimal allowed TLS version and absolute no 3DES based cipher suites. I have no experience with Go but I tried to figure out the code to see if I can suggest changes with more secure values. Unfortunately I failed here so I can't prepare a pull request in this case.
My usual approach would be letting the service provide http and use a reverse proxy like traefik or nginx to add tls with secure settings and a central certificate management. But in this one particular installation it would add another dependency to the service which is otherwise not necessary/installed on the system.
Did rest-server help you today? Did it make you happy in any way?
This last question is awesome. Please keep it. I'm using restic for quite some time now and until now I made my repositories accessible via NFS shares. The REST server makes remote access simpler and easier to handle via remote connections (I can forward the port on NAT or add proxies in front of it, there is so much more I can do with a simple webservice than with an NFS server). I have not checked the performance yet but it should have less overhead and thus should be faster than NFS is. Thank you for making rest-server!
The text was updated successfully, but these errors were encountered: