Skip to content

Commit 635eaa5

Browse files
committed
add configurable ssl ciphers, curve, protocols
1 parent 0625176 commit 635eaa5

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ The following variables are available to configure the role:
6464
(cf. http://wiki.nginx.org/HttpFlvStreamModule), defaults to false.
6565
- **nginx_drupal_mp4_streaming**: Whether or not to use MP4 streaming, (cf.
6666
http://nginx.org/en/docs/http/ngx_http_mp4_module.html) defaults to false.
67+
- **nginx_drupal_ssl_protocols**: List of protocols to enable, defaults to SSLv3, TLSv1, TLSv1.1, TLSv1.2
68+
- **nginx_drupal_ssl_ecdh_curve**: Curve to use for ECDH, defaults to secp521r1
69+
- **nginx_drupal_ssl_ciphers**: Ciphers to use
70+
defaults to "ECDH+aRSA+AESGCM:ECDH+aRSA+SHA384:ECDH+aRSA+SHA256:ECDH:EDH+CAMELLIA:EDH+aRSA:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA"
6771
- **nginx_drupal_http_pre_includes**: A list of file to include in the
6872
```http``` context (in ```nginx.conf```), before any other directives.
6973
- **nginx_drupal_http_post_includes**: A list of file to include in the

defaults/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ nginx_drupal_mp4_streaming: false
2525
nginx_drupal_http_core:
2626
client_max_body_size: "10m"
2727
ssl_session_cache: true
28+
nginx_drupal_ssl_protocols: [ "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2" ]
29+
nginx_drupal_ssl_ecdh_curve: "secp521r1"
30+
nginx_drupal_ssl_ciphers: "ECDH+aRSA+AESGCM:ECDH+aRSA+SHA384:ECDH+aRSA+SHA256:ECDH:EDH+CAMELLIA:EDH+aRSA:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA"
2831
nginx_drupal_upstream_servers: ["unix:/var/run/php-fpm.sock", "php-fpm-zwei.sock"]
2932
nginx_drupal_upstream_backup_servers: ["unix:/var/run/php-fpm-bkp.sock"]
3033
nginx_drupal_sites: none

templates/nginx.j2

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,16 @@ http {
118118

119119
## Use only Perfect Forward Secrecy Ciphers. Fallback on non ECDH
120120
## for crufty clients.
121-
ssl_ciphers ECDH+aRSA+AESGCM:ECDH+aRSA+SHA384:ECDH+aRSA+SHA256:ECDH:EDH+CAMELLIA:EDH+aRSA:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA;
121+
ssl_ciphers {{nginx_drupal_ssl_ciphers}};
122122

123123
## No SSL2 support. Legacy support of SSLv3.
124-
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
124+
ssl_protocols {{nginx_drupal_ssl_protocols|join(" ")}};
125125

126126
## Pregenerated Diffie-Hellman parameters.
127127
ssl_dhparam /etc/nginx/dh_param.pem;
128128

129129
## Curve to use for ECDH.
130-
ssl_ecdh_curve secp521r1;
130+
ssl_ecdh_curve {{nginx_drupal_ssl_ecdh_curve}};
131131

132132
## Enable OCSP stapling. A better way to revocate server certificates.
133133
ssl_stapling on;

0 commit comments

Comments
 (0)