From: Grant Slater Date: Thu, 22 Aug 2019 21:22:29 +0000 (+0100) Subject: nginx: enable TLS 1.3 X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/8f6bf8b7cd2909565909a6f817426a3f6c8c0d80?ds=sidebyside nginx: enable TLS 1.3 --- diff --git a/cookbooks/imagery/templates/default/nginx_imagery.conf.erb b/cookbooks/imagery/templates/default/nginx_imagery.conf.erb index b95bc601f..dcdc28729 100644 --- a/cookbooks/imagery/templates/default/nginx_imagery.conf.erb +++ b/cookbooks/imagery/templates/default/nginx_imagery.conf.erb @@ -31,6 +31,10 @@ server { add_header Strict-Transport-Security "<%= node[:ssl][:strict_transport_security] %>" always; <% end -%> + # Requests sent within early data are subject to replay attacks. + # See: http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_early_data + ssl_early_data on; + root "/srv/<%= @name %>"; gzip on; diff --git a/cookbooks/nginx/templates/default/nginx.conf.erb b/cookbooks/nginx/templates/default/nginx.conf.erb index ae0d8bd41..e5969ce45 100644 --- a/cookbooks/nginx/templates/default/nginx.conf.erb +++ b/cookbooks/nginx/templates/default/nginx.conf.erb @@ -34,11 +34,12 @@ http { server_tokens off; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; ssl_ciphers <%= node[:ssl][:openssl_ciphers] -%>; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:50m; ssl_session_timeout 30m; + ssl_stapling on; # Validate the stapling response is signed by a trusted certificate diff --git a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb index a6962d893..611bd4a73 100644 --- a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb +++ b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb @@ -93,6 +93,10 @@ server { ssl_certificate /etc/ssl/certs/tile.openstreetmap.org.pem; ssl_certificate_key /etc/ssl/private/tile.openstreetmap.org.key; + # Requests sent within early data are subject to replay attacks. + # See: http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_early_data + ssl_early_data on; + # Immediately 404 layers we do not support <% for i in 20..99 do %> location /<%= i %>/ {