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

Audit nginx SSL setup with new Mozilla Config tool #3753

Open
humphd opened this issue Nov 3, 2022 · 1 comment
Open

Audit nginx SSL setup with new Mozilla Config tool #3753

humphd opened this issue Nov 3, 2022 · 1 comment
Labels
area: nginx type: enhancement New feature or request

Comments

@humphd
Copy link
Contributor

humphd commented Nov 3, 2022

Mozilla has updated their SSL Config tool. We have SSL setup on production, see https://github.com/Seneca-CDOT/telescope/blob/master/config/nginx.conf.template.

If there is anything that Mozilla is doing, or doing different from us, let's figure out why and make sure we fix our config if it's wrong.

@humphd humphd added type: enhancement New feature or request area: nginx labels Nov 3, 2022
@RC-Lee
Copy link
Contributor

RC-Lee commented Dec 15, 2022

Not familiar with SSL setup.
I haven't had time to deep dive, just time to gather some info.

Comparing the two configs, here is what they have and we don't.

ssl_session_timeout 1d;
ssl_session_tickets off;

# intermediate configuration
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;

The NGINX default for `ssl_session_timeout

Syntax:	ssl_session_timeout time;
Default:	ssl_session_timeout 5m;
Context:	http, server.

Specifies a time during which a client may reuse the session parameters.

Default at 5m, while Mozilla has them set at 1d.
There has been different perspectives on the "right" time to set it to.
More info:


Nginx default for ssl_session_tickets

Syntax:	ssl_session_tickets on | off;
Default:	ssl_session_tickets on;
Context:	http, server
This directive appeared in version 1.5.9.

Default is on while Mozilla has it off. The rationale was that it was for better security.

But it seems nginx 1.23.2 might have a change to this that will make this no longer an issue?
https://nginx.org/en/CHANGES

Feature: TLS session tickets encryption keys are now automatically
     rotated when using shared memory in the "ssl_session_cache"
     directive.

Nginx default for ssl_session_protocols

Syntax:	ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3];
Default:	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Context:	http, server

Mozilla has them set at TLSv1.2 TLSv1.3
According to Nginx,

The TLSv1.1 and TLSv1.2 parameters (1.1.13, 1.0.12) work only when OpenSSL 1.0.1 or higher is used.

The TLSv1.3 parameter (1.13.0) works only when OpenSSL 1.1.1 or higher is used.

Nginx default for ssl_ciphers

Syntax:	ssl_ciphers ciphers;
Default:	ssl_ciphers HIGH:!aNULL:!MD5;
Context:	http, server

Specifies the enabled ciphers. The ciphers are specified in the format understood by the OpenSSL library, for example:

ssl_ciphers ALL:!aNULL:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

The full list can be viewed using the “openssl ciphers” command.

Mozilla has these ciphers

  1. ECDHE-ECDSA-AES128-GCM-SHA256
  2. ECDHE-ECDSA-AES256-GCM-SHA384
  3. ECDHE-ECDSA-CHACHA20-POLY1305
  4. DHE-RSA-AES128-GCM-SHA256
  5. DHE-RSA-AES256-GCM-SHA384

The NGINX default for ssl_prefer_server_ciphers

Syntax:	ssl_prefer_server_ciphers on | off;
Default:	ssl_prefer_server_ciphers off;
Context:	http, server

Specifies that server ciphers should be preferred over client ciphers when using the SSLv3 and TLS protocols.

Default is off, just like what Mozilla has.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nginx type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants