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

Backport: Updating with new parameters of Wazuh Keystore #7593

Merged
merged 7 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ Installing the Wazuh manager

.. code-block:: console

# /var/ossec/bin/wazuh-keystore -f indexer -k username -v <INDEXER_USERNAME>
# /var/ossec/bin/wazuh-keystore -f indexer -k password -v <INDEXER_PASSWORD>
# echo '<INDEXER_USERNAME>' | /var/ossec/bin/wazuh-keystore -f indexer -k username
# echo '<INDEXER_PASSWORD>' | /var/ossec/bin/wazuh-keystore -f indexer -k password

.. note:: The default offline-installation credentials are ``admin``:``admin``

Expand Down Expand Up @@ -541,4 +541,4 @@ Next steps

Once the Wazuh environment is ready, Wazuh agents can be installed on every endpoint to be monitored. To install the Wazuh agents and start monitoring the endpoints, see the :doc:`Wazuh agent </installation-guide/wazuh-agent/index>` installation section. If you need to install them offline, you can check the appropriate agent package to download for your monitored system in the :ref:`Wazuh agent packages list <wazuh_agent_packages_list>` section.

To uninstall all the Wazuh central components, see the :doc:`/installation-guide/uninstalling-wazuh/central-components` section.
To uninstall all the Wazuh central components, see the :doc:`/installation-guide/uninstalling-wazuh/central-components` section.
4 changes: 2 additions & 2 deletions source/installation-guide/wazuh-server/step-by-step.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ Configuring the Wazuh indexer connection

.. code-block:: console

# /var/ossec/bin/wazuh-keystore -f indexer -k username -v <INDEXER_USERNAME>
# /var/ossec/bin/wazuh-keystore -f indexer -k password -v <INDEXER_PASSWORD>
# echo '<INDEXER_USERNAME>' | /var/ossec/bin/wazuh-keystore -f indexer -k username
# echo '<INDEXER_PASSWORD>' | /var/ossec/bin/wazuh-keystore -f indexer -k password

.. note::

Expand Down
4 changes: 2 additions & 2 deletions source/upgrade-guide/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ To ensure that alerts and vulnerabilities detected by the Wazuh Vulnerability De

.. code-block:: console

# /var/ossec/bin/wazuh-keystore -f indexer -k username -v <INDEXER_USERNAME>
# /var/ossec/bin/wazuh-keystore -f indexer -k password -v <INDEXER_PASSWORD>
# echo '<INDEXER_USERNAME>' | /var/ossec/bin/wazuh-keystore -f indexer -k username
# echo '<INDEXER_PASSWORD>' | /var/ossec/bin/wazuh-keystore -f indexer -k password

IndexerConnector initialization failed
--------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions source/upgrade-guide/upgrading-central-components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ If upgrading from version 4.7 and earlier, edit ``/var/ossec/etc/ossec.conf`` to
#. Save the Wazuh indexer username and password into the Wazuh manager keystore using the :doc:`Wazuh-keystore </user-manual/reference/tools/wazuh-keystore>` tool.

.. code-block:: console
# /var/ossec/bin/wazuh-keystore -f indexer -k username -v <INDEXER_USERNAME>
# /var/ossec/bin/wazuh-keystore -f indexer -k password -v <INDEXER_PASSWORD>

# echo '<INDEXER_USERNAME>' | /var/ossec/bin/wazuh-keystore -f indexer -k username
# echo '<INDEXER_PASSWORD>' | /var/ossec/bin/wazuh-keystore -f indexer -k password

.. note::

In case you've forgotten your Wazuh indexer password, follow the :doc:`password management </user-manual/user-administration/password-management>` guide to reset the password.
Expand Down Expand Up @@ -267,7 +267,7 @@ Configuration options might differ across versions. Follow these steps to ensure
.. note::

When prompted, choose to replace the ``/etc/wazuh-dashboard/opensearch_dashboards.yml`` file with the updated version.

#. Manually reapply any settings changes to the ``/etc/wazuh-dashboard/opensearch_dashboards.yml`` file.
#. Restart the Wazuh dashboard:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The following configuration block shows a configuration example for Syscollector
<hotfixes>yes</hotfixes>
<ports all="no">yes</ports>
<processes>yes</processes>

<!-- Database synchronization settings -->
<synchronization>
<max_eps>10</max_eps>
Expand All @@ -58,9 +58,9 @@ The following configuration block shows a configuration example for Syscollector
You must save the Wazuh indexer username and password into the Wazuh manager keystore using the Wazuh-keystore tool.

.. code-block:: console
# /var/ossec/bin/wazuh-keystore -f indexer -k username -v <INDEXER_USERNAME>
# /var/ossec/bin/wazuh-keystore -f indexer -k password -v <INDEXER_PASSWORD>

# echo '<INDEXER_USERNAME>' | /var/ossec/bin/wazuh-keystore -f indexer -k username
# echo '<INDEXER_PASSWORD>' | /var/ossec/bin/wazuh-keystore -f indexer -k password

The Vulnerability Detection module generates logs in the Wazuh server that trigger alerts. Every alert contains the following fields:

Expand Down Expand Up @@ -195,4 +195,3 @@ Here you can see what certain fields of the alert look like on the dashboard:
:title: Fields in vulnerability alert
:align: center
:width: 80%

19 changes: 16 additions & 3 deletions source/user-manual/reference/tools/wazuh-keystore.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. Copyright (C) 2015, Wazuh, Inc.

.. meta::
:description: Tool where sensitive configuration data can be securely stored, including any information that the Wazuh manager daemons/tools need for their work.
:description: Tool where sensitive configuration data can be securely stored, including any information that the Wazuh manager daemons/tools need for their work.

.. _wazuh-keystore:

Expand All @@ -22,12 +22,25 @@ wazuh-keystore options
+------------------------+---------------------------------------------------------+
| **-v <VALUE>** | Specifies the value associated with the key. |
+------------------------+---------------------------------------------------------+
| **-vp <VALUE>** | Specifies the path to a single-line file with the value.|
+------------------------+---------------------------------------------------------+

You can use only one of the options ``-v`` or ``-vp`` at a time. If neither is specified, the tool reads the value from standard input.

When using ``-vp``, the file must contain a single line with the value.

Example
-------
* Set indexer's username and password:

.. code-block:: console

# /var/ossec/bin/wazuh-keystore -f indexer -k username -v admin
# /var/ossec/bin/wazuh-keystore -f indexer -k password -v admin
# echo 'admin' | /var/ossec/bin/wazuh-keystore -f indexer -k username
# echo 'admin' | /var/ossec/bin/wazuh-keystore -f indexer -k password

- Alternate methods to set values:

.. code-block:: console

# /var/ossec/bin/wazuh-keystore -f indexer -k username -v admin
# /var/ossec/bin/wazuh-keystore -f indexer -k password -vp /file/with/password