From fd9887c5af2f53c0b863f5b8757a87466b0edbe2 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Mon, 3 Jun 2019 18:09:57 +0200 Subject: [PATCH 1/2] API: Harden default cipher list According to https://www.acunetix.com/blog/articles/tls-ssl-cipher-hardening/ --- doc/09-object-types.md | 2 +- lib/remote/apilistener.ti | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/09-object-types.md b/doc/09-object-types.md index 660b1e34b..8c1eb59cc 100644 --- a/doc/09-object-types.md +++ b/doc/09-object-types.md @@ -1121,7 +1121,7 @@ Configuration Attributes: accept\_config | Boolean | **Optional.** Accept zone configuration. Defaults to `false`. accept\_commands | Boolean | **Optional.** Accept remote commands. Defaults to `false`. max\_anonymous\_clients | Number | **Optional.** Limit the number of anonymous client connections (not configured endpoints and signing requests). - cipher\_list | String | **Optional.** Cipher list that is allowed. For a list of available ciphers run `openssl ciphers`. Defaults to `ALL:!LOW:!WEAK:!MEDIUM:!EXP:!NULL`. + cipher\_list | String | **Optional.** Cipher list that is allowed. For a list of available ciphers run `openssl ciphers`. Defaults to `ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256`. tls\_protocolmin | String | **Optional.** Minimum TLS protocol version. Since v2.11, only `TLSv1.2` is supported. Defaults to `TLSv1.2`. tls\_handshake\_timeout | Number | **Optional.** TLS Handshake timeout. Defaults to `10s`. access\_control\_allow\_origin | Array | **Optional.** Specifies an array of origin URLs that may access the API. [(MDN docs)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Access-Control-Allow-Origin) diff --git a/lib/remote/apilistener.ti b/lib/remote/apilistener.ti index 20f59bb12..4217ce0ab 100644 --- a/lib/remote/apilistener.ti +++ b/lib/remote/apilistener.ti @@ -18,7 +18,7 @@ class ApiListener : ConfigObject [config, deprecated] String ca_path; [config] String crl_path; [config] String cipher_list { - default {{{ return "ALL:!LOW:!WEAK:!MEDIUM:!EXP:!NULL"; }}} + default {{{ return "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256"; }}} }; [config] String tls_protocolmin { default {{{ return "TLSv1.2"; }}} From b5ce0f3d32aa433c91904932c5475cab33c5a0cf Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 5 Jun 2019 09:55:49 +0200 Subject: [PATCH 2/2] Add cipher list change to upgrading docs --- doc/16-upgrading-icinga-2.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/doc/16-upgrading-icinga-2.md b/doc/16-upgrading-icinga-2.md index 656dcb835..4cd2c0d32 100644 --- a/doc/16-upgrading-icinga-2.md +++ b/doc/16-upgrading-icinga-2.md @@ -53,7 +53,22 @@ and compiled into the binary as header only include. It helps our way to C++11 a to fix additional UTF8 issues more easily. Read more about its [design goals](https://github.com/nlohmann/json#design-goals) and [benchmarks](https://github.com/miloyip/nativejson-benchmark#parsing-time). -### TLS 1.2 +### Network Stack + +The core network stack has been rewritten in 2.11 (some say this could be Icinga 3). + +You can read the full story [here](https://github.com/Icinga/icinga2/issues/7041). + +The only visible changes for users are: + +- No more dead-locks with hanging TLS connections (Cluster, REST API) +- Better log messages in error cases +- More robust and stable with using external libraries instead of self-written socket I/O + +Coming with this release, we've also updated TLS specific requirements +explained below. + +#### TLS 1.2 v2.11 raises the minimum required TLS version to 1.2. This is available since OpenSSL 1.0.1 (EL6 & Debian Jessie). @@ -64,6 +79,23 @@ handshake. The `api` feature attribute `tls_protocolmin` now only supports the value `TLSv1.2` being the default. +#### Hardened Cipher List + +The previous default cipher list allowed weak ciphers. There's no sane way +other than explicitly setting the allowed ciphers. + +The new default sets this to: + +``` +ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 +``` + +You can override this setting in the [api](09-object-types.md#objecttype-apilistener) +feature with the `cipher_list` attribute. + +In case that one of these ciphers is marked as insecure in the future, +please let us know with an issue on GitHub. + ### HA-aware Features v2.11 introduces additional HA functionality similar to the DB IDO feature.