diff options
author | khramshinr <khramshinr@gmail.com> | 2024-12-11 11:51:10 +0800 |
---|---|---|
committer | khramshinr <khramshinr@gmail.com> | 2024-12-16 15:16:34 +0800 |
commit | 73b9eba81999744ba0adf4c252ccdb2bd0bd2a19 (patch) | |
tree | 4179cedb7da1fb9610aafb88baa366d75dc3aef7 /data/templates | |
parent | 221b384ff0096f07b96f13d1a5433e0b49c15846 (diff) | |
download | vyos-1x-73b9eba81999744ba0adf4c252ccdb2bd0bd2a19.tar.gz vyos-1x-73b9eba81999744ba0adf4c252ccdb2bd0bd2a19.zip |
T6934: Add preshared key for zabbix-agent monitoring service
- Allow configure preshared key for zabbix-agent
- Added op mode command for generatre random psk secret
- Removed duplicate xml definition for psk settings
Configure authentication mode:
```
# set service monitoring zabbix-agent authentication mode
Possible completions:
pre-shared-secret Use a pre-shared secret key
```
Configure PSK Settings:
```
# set service monitoring zabbix-agent authentication psk
Possible completions:
id ID for authentication
secret pre-shared secret key
```
Generate Random PSK:
```
$ generate psk random
Possible completions:
<Enter> Execute the current command
size Key size in bytes
```
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/zabbix-agent/zabbix-agent.conf.j2 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/data/templates/zabbix-agent/zabbix-agent.conf.j2 b/data/templates/zabbix-agent/zabbix-agent.conf.j2 index e6dcef872..b8df2d177 100644 --- a/data/templates/zabbix-agent/zabbix-agent.conf.j2 +++ b/data/templates/zabbix-agent/zabbix-agent.conf.j2 @@ -75,3 +75,16 @@ Include={{ directory }}/*.conf Timeout={{ timeout }} {% endif %} +{% if authentication is vyos_defined and authentication.mode is vyos_defined %} +{% if authentication.mode == "pre-shared-secret" %} +TLSConnect=psk +TLSAccept=psk +{% endif %} +{% if authentication.psk.secret is vyos_defined %} +TLSPSKFile={{ service_psk_file }} +{% endif %} +{% if authentication.psk.id is vyos_defined %} +TLSPSKIdentity={{ authentication.psk.id }} +{% endif %} +{% endif %} + |