Following the official documentation carefully, password changes fail due to the "config" directory being referred to when it appears to no longer exist.
Using the documented variable assignments below:
export INSTALLATION_DIR=/usr/share/wazuh-indexer
export CONFIG_DIR=$INSTALLATION_DIR/config
CACERT=$CONFIG_DIR/certs/root-ca.pem
KEY=$CONFIG_DIR/certs/admin-key.pem
CERT=$CONFIG_DIR/certs/admin.pem
export JAVA_HOME=/usr/share/wazuh-indexer/jdk
Results in the following error:
Security Admin v7
Will connect to localhost:9200 ... done
ERR: An unexpected IllegalArgumentException occured: Could not find certificate file /usr/share/wazuh-indexer/config/certs/root-ca.pem
Trace:
java.lang.IllegalArgumentException: Could not find certificate file /usr/share/wazuh-indexer/config/certs/root-ca.pem
at org.opensearch.security.tools.SecurityAdmin.sslContext(SecurityAdmin.java:1815)
at org.opensearch.security.tools.SecurityAdmin.execute(SecurityAdmin.java:559)
at org.opensearch.security.tools.SecurityAdmin.main(SecurityAdmin.java:162)
Caused by: java.io.FileNotFoundException: /usr/share/wazuh-indexer/config/certs/root-ca.pem (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:152)
at org.opensearch.security.tools.SecurityAdmin.sslContext(SecurityAdmin.java:1810)
... 2 more
On a fresh setup of Wazuh, the folder "config" does not exist at /user/share/wazuh-indexer within the container. Running with the following set of commands, however, results in successful password changes:
export INSTALLATION_DIR=/usr/share/wazuh-indexer
export CONFIG_DIR=$INSTALLATION_DIR
CACERT=$CONFIG_DIR/certs/root-ca.pem
KEY=$CONFIG_DIR/certs/admin-key.pem
CERT=$CONFIG_DIR/certs/admin.pem
export JAVA_HOME=/usr/share/wazuh-indexer/jdk
Since I am not familiar with the securityadmin.sh script itself, I just adjusted the assignment of CONFIG_DIR rather than removing it entirely.
Following the official documentation carefully, password changes fail due to the "config" directory being referred to when it appears to no longer exist.
Using the documented variable assignments below:
Results in the following error:
On a fresh setup of Wazuh, the folder "config" does not exist at
/user/share/wazuh-indexerwithin the container. Running with the following set of commands, however, results in successful password changes:Since I am not familiar with the
securityadmin.shscript itself, I just adjusted the assignment ofCONFIG_DIRrather than removing it entirely.