PgSQL plugin is not able to start TLS encryption for official template
(ZBX-22060)
|
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent2 plugin (G) |
Affects Version/s: | 6.0.20, 6.4.5, 7.0.0alpha3 |
Fix Version/s: | 6.0.22rc1, 6.4.7rc1, 7.0.0alpha5, 7.0 (plan) |
Type: | Sub-task | Priority: | Major |
Reporter: | Denis Rasikhov | Assignee: | Eriks Sneiders |
Resolution: | Fixed | Votes: | 0 |
Labels: | plugin, postgresql | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() |
Team: | |
Sprint: | Sprint 103 (Aug 2023) |
Story Points: | 4 |
Description |
During the work on the parent issue the incorrect behaviour of TLSConnect parameters with verify_ca and verify_full values was noticed in the PostgreSQL plugin. It differs from the parameters providing the same functionality that are used by the psql command line client. Current behaviour doesn't allow you to check the server certificate without having to provide client certificate and key. For example: # Set up connection URI, replace <instanceip> with the IP or hostname of the monitored instance Plugins.PostgreSQL.Sessions.myconn.Uri=tcp://<instanceip>:5432 # Set up encryption mode to "verify_ca" (or "verify_full" if you also want to check the host name) Plugins.PostgreSQL.Sessions.myconn.TLSConnect=verify_ca #Plugins.PostgreSQL.Sessions.myconn.TLSConnect=verify_full # Set up the path to the CA certificate which was used to sign the server certificate (copy it to the host on which Zabbix agent is installed beforehand): Plugins.PostgreSQL.Sessions.myconn.TLSCAFile=/var/lib/zabbix/.postgresql/root.crt 3. Specify the session name in the {$PG.CONNSTRING} macro and password in {$PG.PASSWORD} macro. 4. Test any Zabbix agent item, for example "PostgreSQL: Get connections sum". Result: Expected: Consult the PostgreSQL documentation about encryption modes and options in libpq and certificates usage: |
Comments |
Comment by Eriks Sneiders [ 2023 Aug 31 ] |
Fixed in
|
Comment by Martins Valkovskis [ 2023 Oct 27 ] |
Updated documentation: |