Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to wazuh.yml file and adapt to the new configuration system #7050

Closed
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d5c8c97
feat(dashboard-configuration): adapt the user manual configuration se…
Desvelao Feb 21, 2024
54141af
fix: grammar
Desvelao Feb 21, 2024
a98b178
feat: remove reference to wazuh.yml
Desvelao Feb 21, 2024
f7a417a
feat: replace the references to configure server API hosts or plugins…
Desvelao Feb 21, 2024
9f1aa5c
fix(wazuh-dashboard): wrong button label
Desvelao Feb 21, 2024
5ff36e0
feat(wazuh-dashboard): add documentation to setup the configuration u…
Desvelao Feb 21, 2024
12bc130
fix(wazuh-dashboard): replace reference to button
Desvelao Feb 27, 2024
c376d63
feat(wazuh-dashboard): enhance the configuration section
Desvelao Mar 4, 2024
d0c665d
feat(wazuh-configuration): enhance documenation about shareing config…
Desvelao Mar 4, 2024
6c6a752
fix(wazuh-dashboard): fix url to import configuration file
Desvelao Mar 4, 2024
a135015
fix(wazuh-dashboard): fix method to import configuration file
Desvelao Mar 4, 2024
5486111
fix(wazuh-dashboard): command to import configuration from file
Desvelao Mar 12, 2024
66a0a03
Add changes from review
javimed Mar 12, 2024
cc7ec0b
Apply suggestions from code review
Desvelao Mar 14, 2024
7211ef3
fix: apply suggestions of code review
Desvelao Mar 14, 2024
8ba133b
remove: references to wazuh.yml
Desvelao Mar 14, 2024
e1b2eff
fix(wazuh-dashboard): rename reference to configuration file
Desvelao Mar 14, 2024
bb5482f
remove(wazuh-dashboard): remove troubleshooting entry because it does…
Desvelao Mar 14, 2024
48eca6a
feat(wazuh-dashboard): add screenshot to check the API connection run_as
Desvelao Mar 14, 2024
0ff1767
feat(wazuh-dashboard): add image to the referentces to check the valu…
Desvelao Mar 14, 2024
d96b819
fix(wazuh-dashboard): undone change related to API connection Run as …
Desvelao Mar 14, 2024
9d465bc
feat(wazuh-dashboard): add screenshots related to editing or adding a…
Desvelao Mar 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 14 additions & 27 deletions source/deployment-options/offline-installation/step-by-step.rst
Expand Up @@ -377,19 +377,6 @@ Installing the Wazuh dashboard

.. include:: /_templates/installations/dashboard/enable_dashboard.rst

#. **Only for distributed deployments**: Edit the file ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` and replace the ``url`` value with the IP address or hostname of the Wazuh server master node.

.. code-block:: yaml
:emphasize-lines: 3

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: wazuh-wui
run_as: false

#. Run the following command to verify the Wazuh dashboard service is active.

.. include:: /_templates/installations/wazuh/common/check_wazuh_dashboard.rst
Expand All @@ -400,7 +387,19 @@ Installing the Wazuh dashboard
- **Username**: admin
- **Password**: admin

Upon the first access to the Wazuh dashboard, the browser shows a warning message stating that the certificate was not issued by a trusted authority. An exception can be added in the advanced options of the web browser or, for increased security, the ``root-ca.pem`` file previously generated can be imported to the certificate manager of the browser. Alternatively, a certificate from a trusted authority can be configured.
.. note::
:class: not-long

Upon the first access to the Wazuh dashboard, the browser shows a warning message stating that the certificate was not issued by a trusted authority. An exception can be added in the advanced options of the web browser or, for increased security, the ``root-ca.pem`` file previously generated can be imported to the certificate manager of the browser. Alternatively, a certificate from a trusted authority can be configured.

#. Go to **Dashboard management** > **Server APIs** to add a new server API connection. Click on **Add API connection** button and fill the form with the following values.

- **ID**: ``default``
- **URL**: IP address or hostname of the Wazuh server master node
- **Port**: ``55000``
- **Username**: ``wazuh-wui``
- **Password**: ``wazuh-wui``
- **Run as**: ``false``

Securing your Wazuh installation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -518,23 +517,11 @@ Select your deployment type and follow the instructions to change the default pa

# echo <kibanaserver-password> | /usr/share/wazuh-dashboard/bin/opensearch-dashboards-keystore --allow-root add -f --stdin opensearch.password

#. Update the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file with the new `wazuh-wui` password generated in the second step.

.. code-block:: yaml
:emphasize-lines: 6

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: "<wazuh-wui-password>"
run_as: false

#. Restart the Wazuh dashboard to apply the changes.

.. include:: /_templates/common/restart_dashboard.rst

#. On the Wazuh dashboard, go to **Dashboard management** > **Server APIs** to update the API host password. Click on the edit button of the secured server API entry and replace the **Password** field. Then click on the **Apply** button to save.

Next steps
^^^^^^^^^^
Expand Down
44 changes: 14 additions & 30 deletions source/installation-guide/wazuh-dashboard/step-by-step.rst
Expand Up @@ -98,31 +98,27 @@ Starting the Wazuh dashboard service

.. include:: /_templates/installations/dashboard/enable_dashboard.rst


**Only for distributed deployments**

Edit the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` file and replace the ``url`` value with the IP address or hostname of the Wazuh server master node.

.. code-block:: yaml
:emphasize-lines: 3

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: wazuh-wui
run_as: false


#. Access the Wazuh web interface with your credentials.

- URL: *https://<wazuh-dashboard-ip>*
- **Username**: *admin*
- **Password**: *admin*

When you access the Wazuh dashboard for the first time, the browser shows a warning message stating that the certificate was not issued by a trusted authority. An exception can be added in the advanced options of the web browser. For increased security, the ``root-ca.pem`` file previously generated can be imported to the certificate manager of the browser. Alternatively, a certificate from a trusted authority can be configured.
.. note::
:class: not-long


When you access the Wazuh dashboard for the first time, the browser shows a warning message stating that the certificate was not issued by a trusted authority. An exception can be added in the advanced options of the web browser. For increased security, the ``root-ca.pem`` file previously generated can be imported to the certificate manager of the browser. Alternatively, a certificate from a trusted authority can be configured.

#. Go to **Dashboard management** > **Server APIs** to add a new server API connection. Click on **Add API connection** button and fill the form with the following values.

- **ID**: ``default``
- **URL**: IP address or hostname of the Wazuh server master node
- **Port**: ``55000``
- **Username**: ``wazuh-wui``
- **Password**: ``wazuh-wui``
- **Run as**: ``false``

Securing your Wazuh installation
--------------------------------
Expand Down Expand Up @@ -209,23 +205,11 @@ Select your deployment type and follow the instructions to change the default pa

# echo <kibanaserver-password> | /usr/share/wazuh-dashboard/bin/opensearch-dashboards-keystore --allow-root add -f --stdin opensearch.password

#. Update the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file with the new `wazuh-wui` password generated in the second step.

.. code-block:: yaml
:emphasize-lines: 6

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: "<wazuh-wui-password>"
run_as: false

#. Restart the Wazuh dashboard to apply the changes.

.. include:: /_templates/common/restart_dashboard.rst

#. On Wazuh dashboard, go to **Dashboard management** > **Server APIs** to update the API host password. Click on the edit button of the secured server API entry and replace the **Password** field. Then, click on the **Apply** button to save.

Next steps
----------
Expand Down
3 changes: 2 additions & 1 deletion source/user-manual/api/securing-api.rst
Expand Up @@ -54,7 +54,8 @@ Recommended changes to secure the Wazuh API
After changing the password, there is no need to restart the Wazuh API but a new :api-ref:`authentication <operation/api.controllers.security_controller.login_user>` will be required for the affected users.

.. warning::
Changing the **wazuh-wui** user password will affect the Wazuh UI. You will have to update the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file accordingly with the new credentials. To learn more, see the :doc:`Wazuh dashboard configuration file </user-manual/wazuh-dashboard/config-file>` document.

Changing the ``wazuh-wui`` user password affects the Wazuh UI. You need to update the API host entry with the new credentials accordingly. To learn more, see the :doc:`Wazuh dashboard API host configuration </user-manual/wazuh-dashboard/config-file>` section.

#. Change the default host and port:

Expand Down
Expand Up @@ -115,8 +115,7 @@ Backing up the Wazuh indexer and dashboard
# rsync -aREz \
/etc/wazuh-dashboard/certs/ \
/etc/wazuh-dashboard/opensearch_dashboards.yml \
/usr/share/wazuh-dashboard/config/opensearch_dashboards.keystore \
/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml $bkp_folder
/usr/share/wazuh-dashboard/config/opensearch_dashboards.keystore $bkp_folder

#. If present, back up your downloads and custom images.

Expand Down
32 changes: 3 additions & 29 deletions source/user-manual/user-administration/ldap.rst
Expand Up @@ -233,20 +233,7 @@ Follow these steps to create a new role mapping and grant administrator permissi
Done with success
SUCC: Expected 1 config types for node {"updated_config_types":["rolesmapping"],"updated_config_size":1,"message":null} is 1 (["rolesmapping"]) due to: null

#. Check the value of ``run_as`` in the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file. If ``run_as`` is set to ``false``, proceed to the next step.

.. code-block:: yaml
:emphasize-lines: 7

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: "<wazuh-wui-password>"
run_as: false

If ``run_as`` is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:
#. Check the value of **Run as** in the API host entry configuration on **Dashboard management** > **Server APIs**. If **Run as** is set to ``false``, proceed to the next step. If **Run as** is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:

#. Click **☰** to open the menu on the Wazuh dashboard, go to **Server management** > **Security**, and then **Roles mapping** to open the page.

Expand Down Expand Up @@ -299,21 +286,8 @@ Setup read-only role
#. Select the **Mapped users** tab and click **Manage mapping**.
#. Under **Backend roles**, assign the name of the read-only role you have in your LDAP server and click on **Map** to confirm the action. In our case, the backend role (CN) is ``readonly``.

#. Check the value of ``run_as`` in the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file. If ``run_as`` is set to ``false``, proceed to the next step.

.. code-block:: yaml
:emphasize-lines: 7

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: "<wazuh-wui-password>"
run_as: false

If ``run_as`` is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:

#. Check the value of **Run as** in the API host entry configuration on **Dashboard management** > **Server APIs**. If **Run as** is set to ``false``, proceed to the next step. If **Run as** is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:

#. Click the upper-left menu icon **☰** to open the menu on the Wazuh dashboard, go to **Server management** > **Security**, and then **Roles mapping** to open the page.

.. thumbnail:: /images/manual/user-administration/ldap/select-roles-mapping.gif
Expand Down
17 changes: 3 additions & 14 deletions source/user-manual/user-administration/password-management.rst
Expand Up @@ -233,19 +233,8 @@ Follow the instructions below to change the passwords for all the Wazuh indexer

# echo <kibanaserver-password> | /usr/share/wazuh-dashboard/bin/opensearch-dashboards-keystore --allow-root add -f --stdin opensearch.password

#. Update the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file with the new `wazuh-wui` password generated in the second step.

.. code-block:: yaml
:emphasize-lines: 6

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: "<wazuh-wui-password>"
run_as: false

#. Restart the Wazuh dashboard to apply the changes.

.. include:: /_templates/common/restart_dashboard.rst
.. include:: /_templates/common/restart_dashboard.rst

#. Go to **Dashboard management** > **Server APIs** to update the password of the API host entry with the new `wazuh-wui` password generated in the second step. Click on the edit button of the related API host. Change the **Password** and then click on **Apply** to save the changes.
8 changes: 4 additions & 4 deletions source/user-manual/user-administration/rbac.rst
Expand Up @@ -69,7 +69,7 @@ Follow these steps to create an internal user, create a new role mapping, and gi

#. Click **Save role mapping** to save and map the user with Wazuh as *administrator*.

For the role mapping to take effect, make sure that ``run_as`` is set to ``true`` in the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file. Restart the Wazuh dashboard service and clear your browser cache and cookies.
For the role mapping to take effect, make sure that **Run as** is set to ``true`` in the API host entry configuration on **Dashboard management** > **Server APIs**. Restart the Wazuh dashboard service and clear your browser cache and cookies.

Creating and setting a Wazuh read-only user
-------------------------------------------
Expand Down Expand Up @@ -126,7 +126,7 @@ Follow these steps to create an internal user, create a new role mapping, and gi

#. Click **Save role mapping** to save and map the user with Wazuh as *read-only*.

For the role mapping to take effect, make sure that ``run_as`` is set to ``true`` in the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file. Restart the Wazuh dashboard service and clear your browser cache and cookies.
For the role mapping to take effect, make sure that **Run as** is set to ``true`` in the API host entry configuration on **Dashboard management** > **Server APIs**. Restart the Wazuh dashboard service and clear your browser cache and cookies.


Creating an internal user and mapping it to Wazuh
Expand Down Expand Up @@ -172,7 +172,7 @@ Follow these steps to create an internal user and map it to a role of your choic

#. Click **Save role mapping** to save and map the user with Wazuh.

For the role mapping to take effect, make sure that ``run_as`` is set to ``true`` in the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file. Restart the Wazuh dashboard service and clear your browser cache and cookies.
For the role mapping to take effect, make sure that **Run as** is set to ``true`` in the API host entry configuration on **Dashboard management** > **Server APIs**. Restart the Wazuh dashboard service and clear your browser cache and cookies.


.. _wazuh-rbac-use-case-agents-group:
Expand Down Expand Up @@ -345,7 +345,7 @@ To map the user with Wazuh, follow these steps:

#. Click **Save role mapping** to finish the action.

For the role mapping to take effect, make sure that ``run_as`` is set to ``true`` in the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file. Restart the Wazuh dashboard service and clear your browser cache and cookies.
For the role mapping to take effect, make sure that **Run as** is set to ``true`` in the API host entry configuration on **Dashboard management** > **Server APIs**. Restart the Wazuh dashboard service and clear your browser cache and cookies.

You have now created a new internal user and mapped it to manage a Wazuh agents' group. Authenticate with the new user and open the Wazuh dashboard, see that only ``Team_A`` agents' alerts and information are displayed.

Expand Down
Expand Up @@ -243,20 +243,7 @@ Edit the Wazuh indexer security configuration files. We recommend that you back
Wazuh dashboard configuration
-----------------------------

#. Check the value of ``run_as`` in the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file. If ``run_as`` is set to ``false``, proceed to the next step.

.. code-block:: yaml
:emphasize-lines: 7

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: "<wazuh-wui-password>"
run_as: false

If ``run_as`` is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:
#. Check the value of **Run as** in the API host entry configuration on **Dashboard management** > **Server APIs**. If **Run as** is set to ``false``, proceed to the next step. If **Run as** is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:

#. Click **☰** to open the menu on the Wazuh dashboard, go to **Server management** > **Security**, and then **Roles mapping** to open the page.

Expand Down
Expand Up @@ -279,20 +279,7 @@ Edit the Wazuh indexer security configuration files. We recommend that you back
Wazuh dashboard configuration
-----------------------------

#. Check the value of ``run_as`` in the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file. If ``run_as`` is set to ``false``, proceed to the next step.

.. code-block:: yaml
:emphasize-lines: 7

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: "<wazuh-wui-password>"
run_as: false

If ``run_as`` is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:
#. Check the value of **Run as** in the API host entry configuration on **Dashboard management** > **Server APIs**. If **Run as** is set to ``false``, proceed to the next step. If **Run as** is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:

#. Click **☰** to open the menu on the Wazuh dashboard, go to **Server management** > **Security**, and then **Roles mapping** to open the page.

Expand Down
Expand Up @@ -353,20 +353,7 @@ The command output must be similar to the following:
Wazuh dashboard configuration
-----------------------------

#. Check the value of ``run_as`` in the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file. If ``run_as`` is set to ``false``, proceed to the next step.

.. code-block:: yaml
:emphasize-lines: 7

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: "<wazuh-wui-password>"
run_as: false

If ``run_as`` is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:
#. Check the value of **Run as** in the API host entry configuration on **Dashboard management** > **Server APIs**. If **Run as** is set to ``false``, proceed to the next step. If **Run as** is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:

#. Click **☰** to open the menu on the Wazuh dashboard, go to **Server management** > **Security**, and then **Roles mapping** to open the page.

Expand Down
Expand Up @@ -276,20 +276,7 @@ Edit the Wazuh indexer security configuration files. We recommend that you back
Wazuh dashboard configuration
-----------------------------

#. Check the value of ``run_as`` in the ``/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml`` configuration file. If ``run_as`` is set to ``false``, proceed to the next step.

.. code-block:: yaml
:emphasize-lines: 7

hosts:
- default:
url: https://localhost
port: 55000
username: wazuh-wui
password: "<wazuh-wui-password>"
run_as: false

If ``run_as`` is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:
#. Check the value of **Run as** in the API host entry configuration on **Dashboard management** > **Server APIs**. If **Run as** is set to ``false``, proceed to the next step. If **Run as** is set to ``true``, you need to add a role mapping on the Wazuh dashboard. To map the backend role to Wazuh, follow these steps:

#. Click **☰** to open the menu on the Wazuh dashboard, go to **Server management** > **Security**, and then **Roles mapping** to open the page.

Expand Down