mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Add Possibility to Configure PSK based Encryption on UI (#708)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= zabbix-proxy
|
||||
PLUGIN_VERSION= 1.0
|
||||
PLUGIN_VERSION= 1.1
|
||||
PLUGIN_COMMENT= Zabbix Proxy enables decentralized monitoring
|
||||
PLUGIN_DEPENDS= zabbix3-proxy
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
||||
+21
@@ -113,4 +113,25 @@
|
||||
<type>text</type>
|
||||
<help>Specifies how long we wait for agent, SNMP device or external check (in seconds).</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.encryption</id>
|
||||
<label>PSK based encryption</label>
|
||||
<type>checkbox</type>
|
||||
<help>Enable PSK based encryption for communicating with the Zabbix server</help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.encryptionidentity</id>
|
||||
<label>PSK Identity</label>
|
||||
<type>text</type>
|
||||
<help>The PSK identity configured on the Zabbix server</help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.encryptionpsk</id>
|
||||
<label>PSK</label>
|
||||
<type>text</type>
|
||||
<help>The PSK configured on the Zabbix server</help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
</form>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<model>
|
||||
<mount>//OPNsense/zabbixproxy/general</mount>
|
||||
<description>Zabbix Proxy configuration</description>
|
||||
<version>1.0.0</version>
|
||||
<version>1.1.0</version>
|
||||
<items>
|
||||
<enabled type="BooleanField">
|
||||
<default>0</default>
|
||||
@@ -79,5 +79,21 @@
|
||||
<default>4</default>
|
||||
<Required>N</Required>
|
||||
</timeout>
|
||||
<encryption type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>Y</Required>
|
||||
</encryption>
|
||||
<encryptionidentity type="TextField">
|
||||
<default></default>
|
||||
<Required>N</Required>
|
||||
<mask>/^.{1,128}$/</mask>
|
||||
<ValidationMessage>Should be a string between 1 and 128 characters.</ValidationMessage>
|
||||
</encryptionidentity>
|
||||
<encryptionpsk type="TextField">
|
||||
<default></default>
|
||||
<Required>N</Required>
|
||||
<mask>/^[A-Fa-f0-9]{32,512}$/</mask>
|
||||
<ValidationMessage>Should be a hexadecimal string between 32 and 512 characters.</ValidationMessage>
|
||||
</encryptionpsk>
|
||||
</items>
|
||||
</model>
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
zabbix_proxy:/etc/rc.conf.d/zabbix_proxy
|
||||
zabbix_proxy.conf:/usr/local/etc/zabbix3/zabbix_proxy.conf
|
||||
zabbix_proxy.psk:/usr/local/etc/zabbix3/zabbix_proxy.psk
|
||||
|
||||
+9
@@ -61,4 +61,13 @@ Timeout={{ OPNsense.zabbixproxy.general.timeout }}
|
||||
{% endif %}
|
||||
FpingLocation=/usr/local/sbin/fping
|
||||
Fping6Location=/usr/local/sbin/fping6
|
||||
{% if helpers.exists('OPNsense.zabbixproxy.general.encryption') and OPNsense.zabbixproxy.general.encryption == '1' %}
|
||||
{% if helpers.exists('OPNsense.zabbixproxy.general.proxymode') and OPNsense.zabbixproxy.general.proxymode == '1' %}
|
||||
TLSAccept=psk
|
||||
{% else %}
|
||||
TLSConnect=psk
|
||||
{% endif %}
|
||||
TLSPSKFile=/usr/local/etc/zabbix3/zabbix_proxy.psk
|
||||
TLSPSKIdentity={{ OPNsense.zabbixproxy.general.encryptionidentity }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{% if helpers.exists('OPNsense.zabbixproxy.general.enabled') and OPNsense.zabbixproxy.general.enabled == '1' %}
|
||||
{% if helpers.exists('OPNsense.zabbixproxy.general.encryption') and OPNsense.zabbixproxy.general.encryption == '1' %}
|
||||
{{ OPNsense.zabbixproxy.general.encryptionpsk }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user