wazuh / wazuh-indexer

Wazuh indexer, the Wazuh search engine
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
11 stars 17 forks source link

Fix access denied error during log rotation #212

Closed AlexRuiz7 closed 5 months ago

AlexRuiz7 commented 5 months ago

Description

This PR adds a temporal solution (until OpenSearch provides a final solution) to the access denied error that raises during the daily log file rotation.

Issues Resolved

Closes #205

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

AlexRuiz7 commented 5 months ago

I downloaded the RPM package to check opensearch_security.policy file. This is its content:

grant {
    permission java.lang.management.ManagementPermission "control";
    permission java.net.SocketPermission "localhost:9600","connect,resolve";
    permission java.lang.RuntimePermission "getClassLoader";
};

grant codebase "file:${java.home}/../lib/tools.jar" {
  permission java.security.AllPermission;
};

grant codeBase "jrt:/jdk.attach" {
    permission java.security.AllPermission;
};

grant codeBase "jrt:/jdk.internal.jvmstat" {
    permission java.security.AllPermission;
};
grant {
  permission java.lang.RuntimePermission "accessUserInformation";
};