security/wazuh-agent: make agent_name configurable (#4657)

This commit is contained in:
Andy Binder 2025-04-25 09:42:41 +02:00 committed by GitHub
parent 431a552718
commit a3a4a3b986
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 0 deletions

View file

@ -15,6 +15,13 @@
<type>text</type>
<help>Specifies the IP address or the hostname of the Wazuh manager.</help>
</field>
<field>
<id>agent.general.agent_name</id>
<label>Agent hostname</label>
<type>text</type>
<advanced>true</advanced>
<help>Specifies the hostname of this agent.</help>
</field>
<field>
<id>agent.general.protocol</id>
<label>Protocol</label>

View file

@ -12,6 +12,10 @@
<Required>Y</Required>
<IpAllowed>Y</IpAllowed>
</server_address>
<agent_name type="HostnameField">
<Required>N</Required>
<IpAllowed>N</IpAllowed>
</agent_name>
<protocol type="OptionField">
<default>tcp</default>
<Required>Y</Required>

View file

@ -7,6 +7,9 @@
</server>
<crypto_method>aes</crypto_method>
<enrollment>
{% if not helpers.empty('OPNsense.WazuhAgent.general.agent_name') %}
<agent_name>{{ OPNsense.WazuhAgent.general.agent_name }}</agent_name>
{% endif %}
<port>{{OPNsense.WazuhAgent.auth.port}}</port>
</enrollment>
</client>