diff --git a/README.md b/README.md index 944644a0..69d4d92e 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,10 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst * `haproxy_global_maxconn`: [optional]: Sets the maximum per-process number of concurrent connections * `haproxy_global_ca_base`: [default: `/etc/ssl/certs`]: Assigns a default directory to fetch SSL CA certificates and CRLs from when a relative path is used with `"ca-file"` or `"crl-file"` directives * `haproxy_global_crt_base`: [default: `/etc/ssl/private`]: Assigns a default directory to fetch SSL certificates from when a relative path is used with `"crtfile"` directives -* `haproxy_global_ssl_default_bind_ciphers`: [default: `kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL`]: This setting is only available when support for OpenSSL was built in. It sets the default string describing the list of cipher algorithms (`"cipher suite"`) that are negotiated during the SSL/TLS handshake for all `"bind"` lines which do not explicitly define theirs +* `haproxy_global_ssl_default_bind_ciphers`: [default: `kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL`]: This setting is only available when support for OpenSSL was built in. It sets the default string describing the list of cipher algorithms ("cipher suite") that are negotiated during the SSL/TLS handshake for all `"bind"` lines which do not explicitly define theirs * `haproxy_global_ssl_default_bind_options`: [default: `no-sslv3`]: This setting is only available when support for OpenSSL was built in. It sets default ssl-options to force on all `"bind"` lines +* `haproxy_global_ssl_default_server_ciphers`: [default: `kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL`]: This setting is only available when support for OpenSSL was built in. It sets the default string describing the list of cipher algorithms that are negotiated during the SSL/TLS handshake with the server, for all `"server"` lines which do not explicitly define theirs +* `haproxy_global_ssl_default_server_options`: [default: `no-sslv3`]: This setting is only available when support for OpenSSL was built in. It sets default ssl-options to force on all `"server"` lines * `haproxy_global_nbproc`: [default: `1`]: Number of processes to create when going daemon. This requires the `daemon` mode. By default, only one process is created, which is the recommended mode of operation * `haproxy_global_tune`: [default: `[]`]: (Performance) tuning declarations * `haproxy_global_tune.{n}.key`: [required]: Setting name (e.g. `ssl.cachesize`) diff --git a/defaults/main.yml b/defaults/main.yml index 3191776d..ef2afe94 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -26,6 +26,8 @@ haproxy_global_ca_base: /etc/ssl/certs haproxy_global_crt_base: /etc/ssl/private haproxy_global_ssl_default_bind_ciphers: 'kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL' haproxy_global_ssl_default_bind_options: 'no-sslv3' +haproxy_global_ssl_default_server_ciphers: 'kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL' +haproxy_global_ssl_default_server_options: 'no-sslv3' haproxy_global_nbproc: 1 # defaults section diff --git a/templates/etc/haproxy/global.cfg.j2 b/templates/etc/haproxy/global.cfg.j2 index 1416ee18..10b2ccac 100644 --- a/templates/etc/haproxy/global.cfg.j2 +++ b/templates/etc/haproxy/global.cfg.j2 @@ -58,6 +58,17 @@ ssl-default-bind-options {{ haproxy_global_ssl_default_bind_options }} {% endif %} +{% if haproxy_global_ssl_default_server_ciphers != false %} + # Default ciphers to use on SSL-enabled listening sockets. + # For more information, see ciphers(1SSL). This list is from: + # https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/ + ssl-default-server-ciphers {{ haproxy_global_ssl_default_server_ciphers }} +{% endif %} + +{% if haproxy_global_ssl_default_server_options != false %} + ssl-default-server-options {{ haproxy_global_ssl_default_server_options }} +{% endif %} + nbproc {{ haproxy_global_nbproc }} {% for tune in haproxy_global_tune | default([]) %}