Skip to content

Wazuh dashboard certificate configuration triggers "Not Replacing" message #8996

@rauldpm

Description

@rauldpm

The Wazuh dashboard certificate configuration instructs users to move the dashboard.pem and dashboard-key.pem files using the following commands:

mv -n /etc/wazuh-dashboard/certs/$NODE_NAME.pem /etc/wazuh-dashboard/certs/dashboard.pem
mv -n /etc/wazuh-dashboard/certs/$NODE_NAME-key.pem /etc/wazuh-dashboard/certs/dashboard-key.pem

By default, the config.yml file downloaded and used to create certificates uses the dashboard name reference as the NODE_NAME. This results in a mv command from dashboard.pem to dashboard.pem, which triggers a message indicating that the certificate was not replaced, since the certificate had already been extracted with that name.

root@ip-172-31-4-122:/home/ubuntu# NODE_NAME=dashboard
root@ip-172-31-4-122:/home/ubuntu# mkdir /etc/wazuh-dashboard/certs
tar -xf ./wazuh-certificates.tar -C /etc/wazuh-dashboard/certs/ ./$NODE_NAME.pem ./$NODE_NAME-key.pem ./root-ca.pem
mv -n /etc/wazuh-dashboard/certs/$NODE_NAME.pem /etc/wazuh-dashboard/certs/dashboard.pem
mv -n /etc/wazuh-dashboard/certs/$NODE_NAME-key.pem /etc/wazuh-dashboard/certs/dashboard-key.pem
chmod 500 /etc/wazuh-dashboard/certs
chmod 400 /etc/wazuh-dashboard/certs/*
chown -R wazuh-dashboard:wazuh-dashboard /etc/wazuh-dashboard/certs
mv: not replacing '/etc/wazuh-dashboard/certs/dashboard.pem'
mv: not replacing '/etc/wazuh-dashboard/certs/dashboard-key.pem'

https://documentation-dev.wazuh.com/v4.14.0-rc2/installation-guide/wazuh-dashboard/step-by-step.html

We should review this behavior to determine whether the message can be avoided, or at least add a note to clarify it so that users do not mistake it for an error.

Related: wazuh/wazuh#32715 (comment) (dashboard install)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions