-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
unsafe nginx config #5117
Comments
@josh4trunks Any input? :) |
Hmm, never heard of this before but I can see the issue. I agree we should change this. There are 3 lines where this should be changed for both...
|
I've done the suggested configuration change on my setup now aswell. No negative behavior so far. Additionally I would suggest adding:
|
I do not believe I do not think we need to give general configuration tips, only things specific to nextcloud. |
I noticed that gzip is enabled in the sample config files. Should we disable it for HTTPS to mitigate attacks like BREACH? |
I don't know enough about BREACH to know if our recommendation of SSL and gzip is vulnerable. |
@LukasReschke regarding HTTPS and gzip and the potential BREACH attack. cc @benediktg for the gzip part. |
Sure, disabling gzip is the most effective way of preventing the BREACH attack. http://breachattack.com says
I think having gzip enabled is still nice to have, hence it'd be great to know what e.g. @LukasReschke can say about the other mitigation options and their applicability in Nextcloud. (5–7 sound like security by obscurity to me). |
i just use gzip for static data like js, css, png, jpg, the rest is disabled. thats all. then it is secure. the nexcloud user data should not be compressed. |
Secrets such as the CSRF token are XOR'ed in Nextcloud with a random secret per request, but I'd still recommend disabling GZIP for dynamic pages to be honest :) |
maybe we should take a look at our recommended gzip_types?
|
user data disabled all. generated can be json or js as well. |
i use like this for nginx the http, the main directive:
secure location
/api could be the secrue locations. the rest is gzipped. |
It looks like this issue has been closed. Was there any resolution on the gzip discussion? I haven't noticed any changes to the gzip settings in the recommended nginx config |
dont use gzip on ssl, otherwise it is unsafe... |
Ok, thanks. Should the documentation be updated then? Right now, it does use gzip for SSL. |
Not necessarily – I simply let gzip activated because it means a measurable performance gain. |
@josh4trunks |
@MeiRos, yes it looks like my comment #5117 (comment) was not fully implemented. These two lines in https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx.rst...
Should be changed to...
If someone wants to submit a PR and mention me we can review it there. |
BTW:
It's not and these are actually best practices and/or good suggestions. Of course use CSRF tokens. And even adding random data (often as a random padding) to prevent size information leak is actually a thing, which is done in proper modern security protocols. AFAIK TLS 1.3 uses it. |
Generally I am also not sure how BREACH may work with HTTP/2, which again does yet different binary data transmission etc. I assume, they only tested with HTTP 1. |
It is easy.
Your error:
Just do not use
$uri
for NGINX, use$request_uri;
For use like this:
The text was updated successfully, but these errors were encountered: