wazuh / wazuh-packages

Wazuh - Tools for packages creation
https://wazuh.com
GNU General Public License v2.0
99 stars 90 forks source link

WIA uses `127.0.0.1` instead of `localhost` in dashboard configuration #2797

Closed davidcr01 closed 5 months ago

davidcr01 commented 6 months ago
Related issue
https://github.com/wazuh/wazuh-packages/issues/2771

Description

The aim of this PR is to revert the changes of the following PR: https://github.com/wazuh/wazuh-packages/pull/2422

Besides, this PR makes the /usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml file point to 127.0.0.1 IP address instead of localhost when an AIO installation is performed using the WIA.

This fix avoids:

Logs example

hosts:
  - default:
      url: https://127.0.0.1
      port: 55000
      username: wazuh-wui
      password: "TCHJrSVBdonZpe7DXL+N4lzv*kzZMHWr"
      run_as: false

image

Tests

Manual testing in RHEL9 (system which generated the error) was done here: https://github.com/wazuh/wazuh-packages/issues/2771#issuecomment-1909815151

:green_circle: CentOS 7: https://ci.wazuh.info/job/Test_unattended/5160/ :green_circle: Ubuntu Bionic: https://ci.wazuh.info/job/Test_unattended/5162/ :green_circle: Ubuntu Xenial: https://ci.wazuh.info/job/Test_unattended/5163/ :green_circle: AL2: https://ci.wazuh.info/job/Test_unattended/5165/ :green_circle: RHEL7: https://ci.wazuh.info/job/Test_unattended/5166/ :green_circle: RHEL8: https://ci.wazuh.info/job/Test_unattended/5168/ :green_circle: Ubuntu Focal: https://ci.wazuh.info/job/Test_unattended/5169/console :green_circle: CentOS 8: https://ci.wazuh.info/job/Test_unattended/5170/console

After ingressing a Wazuh dashboard instance of the Test unattended distributed, the health check was completely successful: image

The unattended distributed failed because of other errors: https://ci.wazuh.info/job/Test_unattended_distributed/629/consoleFull To check if these errors are generated by this change or not, another distributed test has been performed and it generates the same errors, so they are not related to this development: https://ci.wazuh.info/job/Test_unattended_distributed/631/consoleFull