resolve-credentials
The resolve-credentials tool sets up the passwords, the certificate authority (CA), and the certificates that the Wazuh dashboard uses, and checks them before every start. It's located at /usr/share/wazuh-dashboard/bin/resolve-credentials. The package installation and the wazuh-dashboard service run it for you. Run it yourself to issue the certificate again or to clear the credentials from a container image.
It handles:
The password of the
kibanaserveruser on the Wazuh indexer, and the password ofwazuh-internal-clienton the Wazuh manager API. It stores them in the keystore,/etc/wazuh-dashboard/opensearch_dashboards.keystore. A password that is already in the keystore or inopensearch_dashboards.ymlis never replaced.The Wazuh dashboard CA in
/etc/wazuh-dashboard/ca, published as/etc/wazuh-dashboard/export/ca.pem, and the certificate paircerts/dashboard.pemandcerts/dashboard-key.pem. A pair you staged is left as it is.The CAs of the Wazuh indexer and the Wazuh manager:
certs/indexer-ca.pemandcerts/manager-ca.pem. A file you staged is used as it is and never replaced. Otherwise, the tool copies/etc/wazuh-indexer/export/ca.pemor/etc/wazuh-manager/export/ca.pemfrom the same host whenever that file changes.
Every file it reads must be a regular file, not a link, owned by root, and not writable by its group or by others. Any other file is reported as UNSAFE and not used.
resolve-credentials [--install|--upgrade|--prestart|--clear] [-H <config-dir>]
Modes
Mode |
Description |
|---|---|
|
Run by the package installation. Stores the passwords, creates the CA when there is none,
issues the certificate pair when there is none, and imports the CAs of the Wazuh indexer and
the Wazuh manager. Always exits with |
|
Run by the package upgrade. Completes the keystore and the passwords only. Always exits with
|
|
The default. Run by the |
|
For container image builds. Removes the keystore entries, the certificate pair, the imported
CAs, the CA it created, and |
Options
Option |
Description |
|---|---|
|
Non-default Wazuh dashboard configuration directory. The default is
|
|
Prints the usage. |
Run the tool as root. Exit status 2 means an unknown option. Set WAZUH_DASHBOARD_VERBOSE=1 to print detail lines. Each problem is one line on standard error that starts with MISSING, INVALID or UNSAFE and names the file or key, never a password.
Values you supply
Put the values in /etc/wazuh-dashboard/local.env, owned by root:root with mode 0600, as NAME=value lines. For each key, the first value found wins: the environment of the command, then local.env, then the export/credentials.env file of the Wazuh indexer or the Wazuh manager on the same host. systemd starts the Wazuh dashboard with a clean environment, so a value needed at start belongs in local.env.
Key |
Purpose |
When it is not set |
|---|---|---|
|
Password of the |
Read from
|
|
Password of |
Read from
|
|
Subject alternative names of the certificate pair, as
|
The host name, the FQDN, and every global
address of the host. |
Examples
Issue the certificate pair again, for example after you change WAZUH_DASHBOARD_CERT_SANS. The CA in /etc/wazuh-dashboard/ca is kept, so browsers keep trusting export/ca.pem:
# rm /etc/wazuh-dashboard/certs/dashboard.pem /etc/wazuh-dashboard/certs/dashboard-key.pem
# /usr/share/wazuh-dashboard/bin/resolve-credentials --install
# systemctl restart wazuh-dashboard