security/wazuh-agent: fix style and permission

This commit is contained in:
Franco Fichtner
2023-08-17 12:01:42 +02:00
parent bbfccfe734
commit caf466b7a7
14 changed files with 15 additions and 14 deletions
@@ -41,4 +41,4 @@ class ServiceController extends ApiMutableServiceControllerBase
protected static $internalServiceEnabled = 'general.enabled';
protected static $internalServiceTemplate = 'OPNsense/WazuhAgent';
protected static $internalServiceName = 'wazuh_agent';
}
}
@@ -36,4 +36,4 @@ class SettingsController extends ApiMutableModelControllerBase
{
protected static $internalModelName = 'agent';
protected static $internalModelClass = 'OPNsense\WazuhAgent\WazuhAgent';
}
}
@@ -43,4 +43,4 @@ class IndexController extends \OPNsense\Base\IndexController
// choose template
$this->view->pick('OPNsense/WazuhAgent/index');
}
}
}
@@ -119,4 +119,4 @@
<type>checkbox</type>
<help>Enable file integrity monitoring</help>
</field>
</form>
</form>
@@ -6,4 +6,4 @@
"description": "Wazuh Agent blocklist (internal)",
"content": ""
}
}
}
@@ -6,4 +6,4 @@
<pattern>api/wazuh_agent/*</pattern>
</patterns>
</page-services-wazuh_agent>
</acl>
</acl>
@@ -6,4 +6,4 @@
<ActiveResponses VisibleName="Logfile / active-responses" order="30" url="/ui/diagnostics/log/wazuhagent/activeresponses" />
</WazuhAgent>
</Services>
</menu>
</menu>
@@ -37,4 +37,4 @@
*/
class WazuhAgent extends BaseModel
{
}
}
@@ -90,4 +90,4 @@
</fw_alias_ignore>
</active_response>
</items>
</model>
</model>
+1 -1
View File
@@ -48,4 +48,4 @@ class OssecLogFormat(NewBaseLogFormat):
@property
def line(self):
return self._line[19:].strip().split(':', 1)[-1]
return self._line[19:].strip().split(':', 1)[-1]
@@ -1,5 +1,6 @@
#!/usr/local/bin/php
<?php
/**
* Copyright (C) 2023 Deciso B.V.
*
@@ -58,4 +59,4 @@ if (!empty((string)$mdl->auth->password)) {
mkdir("/var/log/wazuhagent/ossec/", 0700, true);
mkdir("/var/log/wazuhagent/activeresponses/", 0700, true);
@symlink("/var/ossec/logs/ossec.log", "/var/log/wazuhagent/ossec/ossec_99991231.log");
@symlink( "/var/ossec/logs/active-responses.log", "/var/log/wazuhagent/activeresponses/activeresponses_99991231.log");
@symlink("/var/ossec/logs/active-responses.log", "/var/log/wazuhagent/activeresponses/activeresponses_99991231.log");
@@ -1,4 +1,4 @@
[general]
{% if not helpers.empty('OPNsense.WazuhAgent.wazuh_command.fw_alias_ignore') and helpers.getUUID(OPNsense.WazuhAgent.wazuh_command.fw_alias_ignore) %}
skip_alias={{helpers.getUUID(OPNsense.WazuhAgent.wazuh_command.fw_alias_ignore).name}}
{% endif %}
{% endif %}
@@ -6,4 +6,4 @@
</localfile>
{% else %}
<!-- disabled -->
{% endif %}
{% endif %}
@@ -24,4 +24,4 @@ log {
filter(f_local_wazuhagent);
destination(d_local_wazuhagent);
};
{% endif %}
{% endif %}