Wazuh dashboard credentials
The Wazuh dashboard has no default passwords. It connects to the Wazuh indexer as the kibanaserver user and to the Wazuh manager API as the wazuh-internal-client user. The Wazuh indexer and the Wazuh manager own these accounts and publish their passwords. The Wazuh dashboard stores the passwords in its keystore, /etc/wazuh-dashboard/opensearch_dashboards.keystore.
The resolver, /usr/share/wazuh-dashboard/bin/resolve-credentials, finds these values at installation and every time the service starts. You run it by hand only to issue a new certificate or to prepare an image.
Value |
Published by |
Stored by the Wazuh dashboard as |
|---|---|---|
|
|
|
|
|
|
Wazuh indexer CA certificate |
|
|
Wazuh manager CA certificate |
|
|
You log in to the Wazuh dashboard as the admin user. Its password is WAZUH_INDEXER_ADMIN_PASSWORD in /etc/wazuh-indexer/export/credentials.env on a Wazuh indexer node.
How the Wazuh dashboard finds each password
For each of the two passwords, the Wazuh dashboard uses the first of these sources that has a value:
Its keystore.
/etc/wazuh-dashboard/opensearch_dashboards.yml. When this file sets the password, the Wazuh dashboard writes nothing to the keystore.The environment of the process, as
WAZUH_INDEXER_KIBANASERVER_PASSWORDorWAZUH_MANAGER_WUI_PASSWORD./etc/wazuh-dashboard/local.env.The
export/credentials.envfile of the Wazuh indexer or the Wazuh manager on the same host.
The Wazuh dashboard copies a value from sources 3 to 5 into its keystore. From then on, the keystore value wins. To change a password, see Unauthorized errors after a password change.
The local.env file
On a single host, the Wazuh dashboard reads everything from the export directories of the Wazuh indexer and the Wazuh manager. Create /etc/wazuh-dashboard/local.env on a Wazuh dashboard host without them, or to set the names in the Wazuh dashboard certificate. The file must be owned by root, with mode 0600. It holds one KEY=VALUE pair per line, and the Wazuh dashboard reads it as data, never as a script. It accepts these keys:
WAZUH_INDEXER_KIBANASERVER_PASSWORD: the password of thekibanaserveruser.WAZUH_MANAGER_WUI_PASSWORD: the password of thewazuh-internal-clientuser.WAZUH_DASHBOARD_CERT_SANS: the names and IP addresses of the Wazuh dashboard certificate. See Issuing a new Wazuh dashboard certificate.
A value in the environment takes precedence over local.env. sudo resets the environment by default, so an exported variable never reaches the package scripts. Use local.env instead.
Building images that contain the Wazuh dashboard
An image built by installing the Wazuh dashboard package keeps the keystore entries, the certificate, and the CA key of the build host. Every container started from that image shares them. Run this command at the end of the image build:
# /usr/share/wazuh-dashboard/bin/resolve-credentials --clear
Run this command in the container entrypoint, before the first start:
# /usr/share/wazuh-dashboard/bin/resolve-credentials --install