owncloud aktualisieren #1

Closed
fenris wants to merge 44 commits from task-377 into main
4 changed files with 11 additions and 5 deletions
Showing only changes of commit a2f22c3b70 - Show all commits

View file

@ -8,6 +8,11 @@
"description": "in hours", "description": "in hours",
"default": null "default": null
}, },
"dhparam_size": {
"nullable": false,
"type": "integer",
"default": null
},
"improved_security": { "improved_security": {
"nullable": false, "nullable": false,
"type": "boolean", "type": "boolean",

View file

@ -1,6 +1,6 @@
{ {
"cfg_nginx_defaults": { "cfg_nginx_defaults": {
"auto_reload_interval": null, "auto_reload_interval": null,
"improved_security": false "dhparam_size": 2048
} }
} }

View file

@ -18,10 +18,10 @@
}, },
{ {
"name": "generate dhparams file", "name": "generate dhparams file",
"when": "cfg_nginx.improved_security", "when": "cfg_nginx.dhparam_size != None",
"become": true, "become": true,
"ansible.builtin.command": { "ansible.builtin.command": {
"cmd": "openssl dhparam -out /etc/nginx/dhparam 4096" "cmd": "openssl dhparam -out /etc/nginx/dhparam {{cfg_nginx.dhparam_size | string}}"
}, },
"args": { "args": {
"creates": "/etc/nginx/dhparam" "creates": "/etc/nginx/dhparam"
@ -29,9 +29,8 @@
}, },
{ {
"name": "place hardening config", "name": "place hardening config",
"when": "cfg_nginx.improved_security",
"become": true, "become": true,
"ansible.builtin.copy": { "ansible.builtin.template": {
"src": "ssl-hardening.conf", "src": "ssl-hardening.conf",
"dest": "/etc/nginx/ssl-hardening.conf" "dest": "/etc/nginx/ssl-hardening.conf"
} }

View file

@ -3,7 +3,9 @@ ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
ssl_session_tickets off; ssl_session_tickets off;
# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam
{% if cfg_nginx.dhparam_size != None %}
ssl_dhparam /etc/nginx/dhparam; ssl_dhparam /etc/nginx/dhparam;
{% endif %}
# intermediate configuration # intermediate configuration
ssl_protocols TLSv1.2 TLSv1.3; ssl_protocols TLSv1.2 TLSv1.3;