Áú»¢¶Ä²© prend en charge les communications chiffr¨¦es entre le serveur Áú»¢¶Ä²©, le proxy Áú»¢¶Ä²©, les agents Áú»¢¶Ä²©, les utilitaires zabbix_sender et zabbix_get utilisant le protocole TLS (Transport Layer Security) v.1.2. Le chiffrement est pris en charge ¨¤ partir de Áú»¢¶Ä²© 3.0. Le chiffrement bas¨¦ sur des certificats et sur des cl¨¦s pr¨¦-partag¨¦es est pris en charge.
Le chiffrement est facultatif et configurable pour chaque composant individuellement (par exemple, certains proxys et agents peuvent ¨ºtre configur¨¦s pour utiliser le chiffrement bas¨¦ sur des certificats avec le serveur, tandis que d'autres peuvent utiliser le chiffrement par cl¨¦ pr¨¦-partag¨¦e).
Le serveur (proxy) peut utiliser diff¨¦rentes configurations de chiffrement pour diff¨¦rents h?tes.
Les d¨¦mons Áú»¢¶Ä²© utilisent un seul port d'¨¦coute pour les connexions entrantes chiffr¨¦es et non chiffr¨¦es. L'ajout d'un chiffrement ne n¨¦cessite pas l'ouverture de nouveaux ports sur les pare-feux.
* entre le serveur Web ex¨¦cutant l'interface Áú»¢¶Ä²© et le navigateur Web de l'utilisateur,
* entre le serveur Web ex¨¦cutant l'interface Áú»¢¶Ä²© et le serveur,
* entre le serveur Áú»¢¶Ä²© (proxy) et la base de donn¨¦es Áú»¢¶Ä²©.
* Actuellement, chaque connexion chiffr¨¦e s'ouvre par n¨¦gociation TLS compl¨¨te, aucune mise en cache de session et aucun ticket ne sont impl¨¦ment¨¦s.
* L'ajout du chiffrement augmente la dur¨¦e des contr?les et des actions, en fonction de la latence du r¨¦seau. Par exemple, si le d¨¦lai de transmission est de 100 ms, l'ouverture d'une connexion TCP et l'envoi d'une requ¨ºte non chiffr¨¦e prennent environ 200 ms.\\ Avec le chiffrement, 1000ms environ sont ajout¨¦s pour ¨¦tablir une connexion TLS.\\ Il peut ¨ºtre n¨¦cessaire d'augmenter les d¨¦lais d'attente. A d¨¦faut, certains ¨¦l¨¦ments et actions ex¨¦cutant des scripts distants sur des agents fonctionneront en connexion non chiffr¨¦e, apr¨¨s ¨¦chec d? ¨¤ l'expiration du chiffrement.
* Le chiffrement n'est pas pris en charge pour la [[fr:manual/discovery/network_discovery|d¨¦couverte r¨¦seau]]. Les v¨¦rifications des agents Áú»¢¶Ä²© effectu¨¦es par d¨¦couverte r¨¦seau ne seront pas chiffr¨¦es et si l'agent Áú»¢¶Ä²© est configur¨¦ pour rejeter les connexions non chiffr¨¦es, ces v¨¦rifications ¨¦choueront.
Pour prendre en charge le chiffrement, Áú»¢¶Ä²© doit ¨ºtre compil¨¦ et li¨¦ ¨¤ l'une des trois biblioth¨¨ques cryptographiques suivantes:
La biblioth¨¨que est s¨¦lectionn¨¦e en sp¨¦cifiant une des options suivantes au script "configure":
--with-mbedtls[=DIR]
--with-gnutls[=DIR]
--with-openssl[=DIR]
Par exemple, pour configurer les sources pour le serveur et l'agent avec OpenSSL, vous pouvez utiliser le script "configure" comme suit:
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-openssl
Diff¨¦rents composants Áú»¢¶Ä²© peuvent ¨ºtre compil¨¦s avec diff¨¦rentes biblioth¨¨ques cryptographiques (par exemple, un serveur avec OpenSSL, un agent avec GnuTLS).
Si vous pr¨¦voyez d'utiliser des cl¨¦s pr¨¦-partag¨¦es (PSK), envisagez d'utiliser les biblioth¨¨ques GnuTLS ou mbed TLS pour les composants Áú»¢¶Ä²© utilisant PSK. Les biblioth¨¨ques GnuTLS et mbed TLS prennent en charge les suites de chiffrement PSK avec . La biblioth¨¨que OpenSSL (versions 1.0.1 et 1.0.2c) prend en charge les PSK, mais les suites de chiffrement PSK disponibles ne fournissent pas confidentialit¨¦ persistante.
Les connexions dans Áú»¢¶Ä²© peuvent utiliser:
Deux param¨¨tres importants permettent de sp¨¦cifier le chiffrement des connexions entre les composants Áú»¢¶Ä²©:
TLSConnect
TLSAccept
TLSConnect
sp¨¦cifie le chiffrement ¨¤ utiliser pour les connexions sortantes et peut prendre une des trois valeurs (unencrypted
, PSK
, certificate
). TLSConnect
est utilis¨¦ dans les fichiers de configuration pour le proxy Áú»¢¶Ä²© (en mode actif, sp¨¦cifie uniquement les connexions au serveur) et l'agent Áú»¢¶Ä²© (pour les v¨¦rifications actives). Dans l'interface Áú»¢¶Ä²©, les ¨¦quivalents de TLSConnect
sont le champ Connexion ¨¤ l'h?te de l'onglet Configuration¡úH?tes¡ú<un h?te>¡úChiffrement et le champ Connexion au proxy de l'onglet Administration¡úProxys¡ú<un proxy>¡úChiffrement. Si le type de chiffrement configur¨¦ pour la connexion ¨¦choue, aucun autre type de chiffrement ne sera essay¨¦.
TLSAccept
indique quels types de connexions sont autoris¨¦s pour les connexions entrantes. Les types de connexion sont les suivants: unencrypted
, PSK
, certificate
. Une ou plusieurs valeurs peuvent ¨ºtre sp¨¦cifi¨¦es. TLSAccept
est utilis¨¦ dans les fichiers de configuration du proxy Áú»¢¶Ä²© (en mode passif, sp¨¦cifie uniquement les connexions du serveur) et du d¨¦mon agentd Áú»¢¶Ä²© (pour les v¨¦rifications passives). Dans l'interface Áú»¢¶Ä²©, les ¨¦quivalents de TLSAccept
sont le champ Connexion de l'h?te de l'onglet Configuration¡úH?tes¡ú<un h?te>¡úChiffrement et le champ Connexions du proxy de l'onglet Administration¡úProxys¡ú<un proxy>¡úChiffrement.
Normalement, vous ne configurez qu'un seul type de chiffrement pour les chiffrements entrants. Mais vous pourriez vouloir changer de type de chiffrement, par exemple du non chiffr¨¦ au certificat avec un temps d'arr¨ºt minimum et une possibilit¨¦ de retour en arri¨¨re.
Pour y parvenir, vous pouvez d¨¦finir TLSAccept=unencrypted,cert
dans le fichier de configuration du d¨¦mon agentd, puis red¨¦marrer l'agent Áú»¢¶Ä²©.
Ensuite, vous pourrez tester la connexion avec la commande zabbix_get
¨¤ destination de l'agent utilisant un certificat. Si cela fonctionne, vous pourrez reconfigurer le chiffrement pour cet agent dans l'onglet Configuration¡úH?tes¡ú<un h?te>¡úChiffrement de l'interface Áú»¢¶Ä²© en d¨¦finissant Connexion ¨¤ l'h?te ¨¤ "Certificat".
Lorsque le cache de configuration du serveur est mis ¨¤ jour (et la configuration du proxy est mise ¨¤ jour si l'h?te supervis¨¦ par proxy) les connexions ¨¤ cet agent seront alors chiffr¨¦es.
Si tout fonctionne comme pr¨¦vu, vous pourrez d¨¦finir TLSAccept=cert
dans le fichier de configuration de l'agent et red¨¦marrer l'agent Áú»¢¶Ä²©.
D¨¦s lors, l'agent n'acceptera que les connexions chiffr¨¦es bas¨¦es sur des certificats. Les connexions non chiffr¨¦es et bas¨¦es sur PSK seront rejet¨¦es.
Tout cela fonctionne de la m¨ºme mani¨¨re sur le serveur et le proxy. Si dans le champ Connexion de l'h?te de l'onglet Configuration¡úH?tes¡ú<un h?te>¡úChiffrement de l'interface Áú»¢¶Ä²© est d¨¦fini ¨¤ "Certificat", alors seules les connexions chiffr¨¦es bas¨¦es sur des certificats seront accept¨¦es depuis l'agent (surveillances actives) et du zabbix_sender
(¨¦l¨¦ments trappeur).
Vous configurerez tr¨¨s probablement les connexions entrantes et sortantes pour utiliser le m¨ºme type de chiffrement ou aucun chiffrement. Mais techniquement, il est possible de passer ¨¤ une configuration asym¨¦trique, par exemple un chiffrement par certificat pour les connexions entrantes et bas¨¦es sur PSK pour les connexions sortantes.
Pour une vue d'ensemble, la configuration de chiffrement pour chaque h?te est affich¨¦e dans l'interface Áú»¢¶Ä²© Configuration¡ú H?tes sur le c?t¨¦ droit, dans la colonne Chiffrement sur l'agent. Exemples d'affichage de configuration:
Exemple | Connexions A l'h?te | Connexions autoris¨¦es DE l'h?te | Connexions rejet¨¦es DE l'h?te |
---|---|---|---|
![]() |
Non chiffr¨¦es | Non chiffr¨¦es | Chiffr¨¦es par certificat et PSK |
![]() |
Chiffr¨¦es par certificat | Chiffr¨¦es par certificat | Non chiffr¨¦es et chiffr¨¦es par PSK |
![]() |
Chiffr¨¦es par PSK | Chiffr¨¦es par PSK | Non chiffr¨¦es et chiffr¨¦es par certificat |
![]() |
Chiffr¨¦es par PSK | Non chiffr¨¦es et chiffr¨¦es par PSK | Chiffr¨¦es par certificat |
![]() |
Chiffr¨¦es par certificat | Non chiffr¨¦es, chiffr¨¦es par certificat et chiffr¨¦es par PSK | - |
Par d¨¦faut, les connexions sont non chiffr¨¦es. Le chiffrement doit ¨ºtre configur¨¦ pour chaque h?te et chaque proxy individuellement.
Voir les man-pages zabbix_get et zabbix_sender pour une utilisation par chiffrement.
Les m¨¦thodes de chiffrement sont configur¨¦s en interne lors du d¨¦marrage de Áú»¢¶Ä²© et d¨¦pendent de la biblioth¨¨que cryptographique, actuellement ils ne sont pas configurables par l'utilisateur.
Configurations de chiffrements par type de biblioth¨¨que, de la priorit¨¦ la plus ¨¦lev¨¦e ¨¤ la plus basse:
µþ¾±²ú±ô¾±´Ç³Ù³ó¨¨±ç³Ü±ð | M¨¦thodes de chiffrement par certificat | M¨¦thodes de chiffrement PSK |
---|---|---|
mbed TLS (PolarSSL) 1.3.9 | TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256 TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA TLS-RSA-WITH-AES-128-GCM-SHA256 TLS-RSA-WITH-AES-128-CBC-SHA256 TLS-RSA-WITH-AES-128-CBC-SHA |
TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256 TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA TLS-PSK-WITH-AES-128-GCM-SHA256 TLS-PSK-WITH-AES-128-CBC-SHA256 TLS-PSK-WITH-AES-128-CBC-SHA |
GnuTLS 3.1.18 | TLS_ECDHE_RSA_AES_128_GCM_SHA256 TLS_ECDHE_RSA_AES_128_CBC_SHA256 TLS_ECDHE_RSA_AES_128_CBC_SHA1 TLS_RSA_AES_128_GCM_SHA256 TLS_RSA_AES_128_CBC_SHA256 TLS_RSA_AES_128_CBC_SHA1 |
TLS_ECDHE_PSK_AES_128_CBC_SHA256 TLS_ECDHE_PSK_AES_128_CBC_SHA1 TLS_PSK_AES_128_GCM_SHA256 TLS_PSK_AES_128_CBC_SHA256 TLS_PSK_AES_128_CBC_SHA1 |
OpenSSL 1.0.2c | ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA AES128-GCM-SHA256 AES128-SHA256 AES128-SHA |
PSK-AES128-CBC-SHA |
OpenSSL 1.1.0 | ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA AES128-GCM-SHA256 AES128-CCM8 AES128-CCM AES128-SHA256 AES128-SHA |
ECDHE-PSK-AES128-CBC-SHA256 ECDHE-PSK-AES128-CBC-SHA PSK-AES128-GCM-SHA256 PSK-AES128-CCM8 PSK-AES128-CCM PSK-AES128-CBC-SHA256 PSK-AES128-CBC-SHA |
M¨¦thodes de chiffrement utilisant des certificats:
Serveur TLS | |||
Client TLS | mbed TLS (PolarSSL) | GnuTLS | OpenSSL 1.0.2 |
mbed TLS (PolarSSL) | TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 | TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 | TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 |
GnuTLS | TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 | TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 | TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 |
OpenSSL 1.0.2 | TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 | TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 | TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 |
M¨¦thodes de chiffrement utilisant PSK:
Serveur TLS | |||
Client TLS | mbed TLS (PolarSSL) | GnuTLS | OpenSSL 1.0.2 |
mbed TLS (PolarSSL) | TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256 | TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256 | TLS-PSK-WITH-AES-128-CBC-SHA |
GnuTLS | TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256 | TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256 | TLS-PSK-WITH-AES-128-CBC-SHA |
OpenSSL 1.0.2 | TLS-PSK-WITH-AES-128-CBC-SHA | TLS-PSK-WITH-AES-128-CBC-SHA | TLS-PSK-WITH-AES-128-CBC-SHA |
The built-in ciphersuite selection criteria can be overridden with user-configured ciphersuites.
User-configured ciphersuites is a feature intended for advanced users who understand TLS ciphersuites, their security and consequences of mistakes, and who are comfortable with TLS troubleshooting.
The built-in ciphersuite selection criteria can be overridden using the following parameters:
Override scope | Parameter | Value | Description |
---|---|---|---|
Ciphersuite selection for certificates | TLSCipherCert13 | Valid OpenSSL 1.1.1 for TLS 1.3 protocol (their values are passed to the OpenSSL function SSL_CTX_set_ciphersuites()). | Certificate-based ciphersuite selection criteria for TLS 1.3 Only OpenSSL 1.1.1 or newer. |
TLSCipherCert | Valid OpenSSL for TLS 1.2 or valid GnuTLS . Their values are passed to the SSL_CTX_set_cipher_list() or gnutls_priority_init() functions, respectively. | Certificate-based ciphersuite selection criteria for TLS 1.2/1.3 (GnuTLS), TLS 1.2 (OpenSSL) | |
Ciphersuite selection for PSK | TLSCipherPSK13 | Valid OpenSSL 1.1.1 for TLS 1.3 protocol (their values are passed to the OpenSSL function SSL_CTX_set_ciphersuites()). | PSK-based ciphersuite selection criteria for TLS 1.3 Only OpenSSL 1.1.1 or newer. |
TLSCipherPSK | Valid OpenSSL for TLS 1.2 or valid GnuTLS . Their values are passed to the SSL_CTX_set_cipher_list() or gnutls_priority_init() functions, respectively. | PSK-based ciphersuite selection criteria for TLS 1.2/1.3 (GnuTLS), TLS 1.2 (OpenSSL) | |
Combined ciphersuite list for certificate and PSK | TLSCipherAll13 | Valid OpenSSL 1.1.1 for TLS 1.3 protocol (their values are passed to the OpenSSL function SSL_CTX_set_ciphersuites()). | Ciphersuite selection criteria for TLS 1.3 Only OpenSSL 1.1.1 or newer. |
TLSCipherAll | Valid OpenSSL for TLS 1.2 or valid GnuTLS . Their values are passed to the SSL_CTX_set_cipher_list() or gnutls_priority_init() functions, respectively. | Ciphersuite selection criteria for TLS 1.2/1.3 (GnuTLS), TLS 1.2 (OpenSSL) |
To override the ciphersuite selection in zabbix_get and zabbix_sender utilities - use the command-line parameters:
--tls-cipher13
--tls-cipher
The new parameters are optional. If a parameter is not specified, the internal default value is used. If a parameter is defined it cannot be empty.
If the setting of a TLSCipher* value in the crypto library fails then the server, proxy or agent will not start and an error is logged.
It is important to understand when each parameter is applicable.
The simplest case is outgoing connections:
--tls-cipher13
and --tls-cipher
can be used (encryption is unambiguously specified with a --tls-connect
parameter)It is a bit more complicated with incoming connections because rules are specific for components and configuration.
For Áú»¢¶Ä²© agent:
Agent connection setup | Cipher configuration |
---|---|
TLSConnect=cert | TLSCipherCert, TLSCipherCert13 |
TLSConnect=psk | TLSCipherPSK, TLSCipherPSK13 |
TLSAccept=cert | TLSCipherCert, TLSCipherCert13 |
TLSAccept=psk | TLSCipherPSK, TLSCipherPSK13 |
TLSAccept=cert,psk | TLSCipherAll, TLSCipherAll13 |
For Áú»¢¶Ä²© server and ** proxy**:
Connection setup | Cipher configuration |
---|---|
Outgoing connections using PSK | TLSCipherPSK, TLSCipherPSK13 |
Incoming connections using certificates | TLSCipherAll, TLSCipherAll13 |
Incoming connections using PSK if server has no certificate | TLSCipherPSK, TLSCipherPSK13 |
Incoming connections using PSK if server has certificate | TLSCipherAll, TLSCipherAll13 |
Some pattern can be seen in the two tables above:
The following tables show the TLSCipher*
built-in default values. They could be a good starting point for your own custom values.
Parameter | GnuTLS 3.6.12 |
---|---|
TLSCipherCert | NONE:+VERS-TLS1.2:+ECDHE-RSA:+RSA:+AES-128-GCM:+AES-128-CBC:+AEAD:+SHA256:+SHA1:+CURVE-ALL:+COMP-NULL:+SIGN-ALL:+CTYPE-X.509 |
TLSCipherPSK | NONE:+VERS-TLS1.2:+ECDHE-PSK:+PSK:+AES-128-GCM:+AES-128-CBC:+AEAD:+SHA256:+SHA1:+CURVE-ALL:+COMP-NULL:+SIGN-ALL |
TLSCipherAll | NONE:+VERS-TLS1.2:+ECDHE-RSA:+RSA:+ECDHE-PSK:+PSK:+AES-128-GCM:+AES-128-CBC:+AEAD:+SHA256:+SHA1:+CURVE-ALL:+COMP-NULL:+SIGN-ALL:+CTYPE-X.509 |
Parameter | OpenSSL 1.1.1d 1 |
---|---|
TLSCipherCert13 | |
TLSCipherCert | EECDH+aRSA+AES128:RSA+aRSA+AES128 |
TLSCipherPSK13 | TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256 |
TLSCipherPSK | kECDHEPSK+AES128:kPSK+AES128 |
TLSCipherAll13 | |
TLSCipherAll | EECDH+aRSA+AES128:RSA+aRSA+AES128:kECDHEPSK+AES128:kPSK+AES128 |
1 Default values are different for older OpenSSL versions (1.0.1, 1.0.2, 1.1.0), for LibreSSL and if OpenSSL is compiled without PSK support.
** Examples of user-configured ciphersuites **
See below the following examples of user-configured ciphersuites:
To see which ciphersuites have been selected you need to set 'DebugLevel=4' in the configuration file, or use the -vv
option for zabbix_sender.
Some experimenting with TLSCipher*
parameters might be necessary before you get the desired ciphersuites. It is inconvenient to restart Áú»¢¶Ä²© server, proxy or agent multiple times just to tweak TLSCipher*
parameters. More convenient options are using zabbix_sender or the openssl
command. Let's show both.
1. Using zabbix_sender.
Let's make a test configuration file, for example /home/zabbix/test.conf, with the syntax of a zabbix_agentd.conf file:
Hostname=nonexisting
ServerActive=nonexisting
TLSConnect=cert
TLSCAFile=/home/zabbix/ca.crt
TLSCertFile=/home/zabbix/agent.crt
TLSKeyFile=/home/zabbix/agent.key
TLSPSKIdentity=nonexisting
TLSPSKFile=/home/zabbix/agent.psk
You need valid CA and agent certificates and PSK for this example. Adjust certificate and PSK file paths and names for your environment.
If you are not using certificates, but only PSK, you can make a simpler test file:
Hostname=nonexisting
ServerActive=nonexisting
TLSConnect=psk
TLSPSKIdentity=nonexisting
TLSPSKFile=/home/zabbix/agentd.psk
The selected ciphersuites can be seen by running zabbix_sender (example compiled with OpenSSL 1.1.d):
$ zabbix_sender -vv -c /home/zabbix/test.conf -k nonexisting_item -o 1 2>&1 | grep ciphersuites
zabbix_sender [41271]: DEBUG: zbx_tls_init_child() certificate ciphersuites: TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA AES128-GCM-SHA256 AES128-CCM8 AES128-CCM AES128-SHA256 AES128-SHA
zabbix_sender [41271]: DEBUG: zbx_tls_init_child() PSK ciphersuites: TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-PSK-AES128-CBC-SHA256 ECDHE-PSK-AES128-CBC-SHA PSK-AES128-GCM-SHA256 PSK-AES128-CCM8 PSK-AES128-CCM PSK-AES128-CBC-SHA256 PSK-AES128-CBC-SHA
zabbix_sender [41271]: DEBUG: zbx_tls_init_child() certificate and PSK ciphersuites: TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA AES128-GCM-SHA256 AES128-CCM8 AES128-CCM AES128-SHA256 AES128-SHA ECDHE-PSK-AES128-CBC-SHA256 ECDHE-PSK-AES128-CBC-SHA PSK-AES128-GCM-SHA256 PSK-AES128-CCM8 PSK-AES128-CCM PSK-AES128-CBC-SHA256 PSK-AES128-CBC-SHA
Here you see the ciphersuites selected by default. These default values are chosen to ensure interoperability with Áú»¢¶Ä²© agents running on systems with older OpenSSL versions (from 1.0.1).
With newer systems you can choose to tighten security by allowing only a few ciphersuites, e.g. only ciphersuites with PFS (Perfect Forward Secrecy). Let's try to allow only ciphersuites with PFS using TLSCipher*
parameters.
The result will not be interoperable with systems using OpenSSL 1.0.1 and 1.0.2, if PSK is used. Certificate-based encryption should work.
Add two lines to the test.conf
configuration file:
and test again:
$ zabbix_sender -vv -c /home/zabbix/test.conf -k nonexisting_item -o 1 2>&1 | grep ciphersuites
zabbix_sender [42892]: DEBUG: zbx_tls_init_child() certificate ciphersuites: TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA
zabbix_sender [42892]: DEBUG: zbx_tls_init_child() PSK ciphersuites: TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-PSK-AES128-CBC-SHA256 ECDHE-PSK-AES128-CBC-SHA
zabbix_sender [42892]: DEBUG: zbx_tls_init_child() certificate and PSK ciphersuites: TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA AES128-GCM-SHA256 AES128-CCM8 AES128-CCM AES128-SHA256 AES128-SHA ECDHE-PSK-AES128-CBC-SHA256 ECDHE-PSK-AES128-CBC-SHA PSK-AES128-GCM-SHA256 PSK-AES128-CCM8 PSK-AES128-CCM PSK-AES128-CBC-SHA256 PSK-AES128-CBC-SHA
The "certificate ciphersuites" and "PSK ciphersuites" lists have changed - they are shorter than before, only containing TLS 1.3 ciphersuites and TLS 1.2 ECDHE-* ciphersuites as expected.
2. TLSCipherAll and TLSCipherAll13 cannot be tested with zabbix_sender; they do not affect "certificate and PSK ciphersuites" value shown in the example above. To tweak TLSCipherAll and TLSCipherAll13 you need to experiment with the agent, proxy or server.
So, to allow only PFS ciphersuites you may need to add up to three parameters
TLSCipherCert=EECDH+aRSA+AES128
TLSCipherPSK=kECDHEPSK+AES128
TLSCipherAll=EECDH+aRSA+AES128:kECDHEPSK+AES128
to zabbix_agentd.conf, zabbix_proxy.conf and zabbix_server_conf if each of them has a configured certificate and agent has also PSK.
If your Áú»¢¶Ä²© environment uses only PSK-based encryption and no certificates, then only one:
Now that you understand how it works you can test the ciphersuite selection even outside of Áú»¢¶Ä²©, with the openssl
command. Let's test all three TLSCipher*
parameter values:
$ openssl ciphers EECDH+aRSA+AES128 | sed 's/:/ /g'
TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA
$ openssl ciphers kECDHEPSK+AES128 | sed 's/:/ /g'
TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-PSK-AES128-CBC-SHA256 ECDHE-PSK-AES128-CBC-SHA
$ openssl ciphers EECDH+aRSA+AES128:kECDHEPSK+AES128 | sed 's/:/ /g'
TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA ECDHE-PSK-AES128-CBC-SHA256 ECDHE-PSK-AES128-CBC-SHA
You may prefer openssl ciphers
with option -V
for a more verbose output:
$ openssl ciphers -V EECDH+aRSA+AES128:kECDHEPSK+AES128
0x13,0x02 - TLS_AES_256_GCM_SHA384 TLSv1.3 Kx=any Au=any Enc=AESGCM(256) Mac=AEAD
0x13,0x03 - TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any Au=any Enc=CHACHA20/POLY1305(256) Mac=AEAD
0x13,0x01 - TLS_AES_128_GCM_SHA256 TLSv1.3 Kx=any Au=any Enc=AESGCM(128) Mac=AEAD
0xC0,0x2F - ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(128) Mac=AEAD
0xC0,0x27 - ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(128) Mac=SHA256
0xC0,0x13 - ECDHE-RSA-AES128-SHA TLSv1 Kx=ECDH Au=RSA Enc=AES(128) Mac=SHA1
0xC0,0x37 - ECDHE-PSK-AES128-CBC-SHA256 TLSv1 Kx=ECDHEPSK Au=PSK Enc=AES(128) Mac=SHA256
0xC0,0x35 - ECDHE-PSK-AES128-CBC-SHA TLSv1 Kx=ECDHEPSK Au=PSK Enc=AES(128) Mac=SHA1
Similarly, you can test the priority strings for GnuTLS:
$ gnutls-cli -l --priority=NONE:+VERS-TLS1.2:+ECDHE-RSA:+AES-128-GCM:+AES-128-CBC:+AEAD:+SHA256:+CURVE-ALL:+COMP-NULL:+SIGN-ALL:+CTYPE-X.509
Cipher suites for NONE:+VERS-TLS1.2:+ECDHE-RSA:+AES-128-GCM:+AES-128-CBC:+AEAD:+SHA256:+CURVE-ALL:+COMP-NULL:+SIGN-ALL:+CTYPE-X.509
TLS_ECDHE_RSA_AES_128_GCM_SHA256 0xc0, 0x2f TLS1.2
TLS_ECDHE_RSA_AES_128_CBC_SHA256 0xc0, 0x27 TLS1.2
Protocols: VERS-TLS1.2
Ciphers: AES-128-GCM, AES-128-CBC
MACs: AEAD, SHA256
Key Exchange Algorithms: ECDHE-RSA
Groups: GROUP-SECP256R1, GROUP-SECP384R1, GROUP-SECP521R1, GROUP-X25519, GROUP-X448, GROUP-FFDHE2048, GROUP-FFDHE3072, GROUP-FFDHE4096, GROUP-FFDHE6144, GROUP-FFDHE8192
PK-signatures: SIGN-RSA-SHA256, SIGN-RSA-PSS-SHA256, SIGN-RSA-PSS-RSAE-SHA256, SIGN-ECDSA-SHA256, SIGN-ECDSA-SECP256R1-SHA256, SIGN-EdDSA-Ed25519, SIGN-RSA-SHA384, SIGN-RSA-PSS-SHA384, SIGN-RSA-PSS-RSAE-SHA384, SIGN-ECDSA-SHA384, SIGN-ECDSA-SECP384R1-SHA384, SIGN-EdDSA-Ed448, SIGN-RSA-SHA512, SIGN-RSA-PSS-SHA512, SIGN-RSA-PSS-RSAE-SHA512, SIGN-ECDSA-SHA512, SIGN-ECDSA-SECP521R1-SHA512, SIGN-RSA-SHA1, SIGN-ECDSA-SHA1
Áú»¢¶Ä²© uses AES128 as the built-in default for data. Let's assume you are using certificates and want to switch to AES256, on OpenSSL 1.1.1.
This can be achieved by adding the respective parameters in zabbix_server.conf
:
TLSCAFile=/home/zabbix/ca.crt
TLSCertFile=/home/zabbix/server.crt
TLSKeyFile=/home/zabbix/server.key
TLSCipherCert13=TLS_AES_256_GCM_SHA384
TLSCipherCert=EECDH+aRSA+AES256:-SHA1:-SHA384
TLSCipherPSK13=TLS_CHACHA20_POLY1305_SHA256
TLSCipherPSK=kECDHEPSK+AES256:-SHA1
TLSCipherAll13=TLS_AES_256_GCM_SHA384
TLSCipherAll=EECDH+aRSA+AES256:-SHA1:-SHA384
Although only certificate-related ciphersuites will be used, TLSCipherPSK*
parameters are defined as well to avoid their default values which include less secure ciphers for wider interoperability. PSK ciphersuites cannot be completely disabled on server/proxy.
And in zabbix_agentd.conf
: