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

Update API host default value #7933

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -732,9 +732,9 @@ Wazuh API variables
$wazuh_api_host
IP address or hostname of the Wazuh manager where the Wazuh API is running.

`Default 0.0.0.0`
`Default ['0.0.0.0', '::']`

`Type String`
`Type List`

$wazuh_api_port
Port where the Wazuh API will listen.
Expand Down
4 changes: 2 additions & 2 deletions source/development/rbac-database-integrity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ After upgrading from a Wazuh version with RBAC database version 0 to 1, ``WAZUH_
2022/06/17 09:44:04 INFO: RBAC database migration required. Current version is 0 but it should be 1. Upgrading RBAC database to version 1
2022/06/17 09:44:09 INFO: /var/ossec/api/configuration/security/rbac.db database upgraded successfully
2022/06/17 09:44:09 INFO: RBAC database integrity check finished successfully
2022/06/17 09:44:12 INFO: Listening on 0.0.0.0:55000..
2022/06/17 09:44:12 INFO: Listening on ['0.0.0.0', '::']:55000..

After upgrading from a Wazuh version with RBAC database version 0 to 1, with the old DB having a user that is a default user in the new version:

Expand All @@ -72,7 +72,7 @@ After upgrading from a Wazuh version with RBAC database version 0 to 1, with the
2022/06/17 10:00:25 WARNING: User 100 (example) is part of the new default users. Renaming it to 'example_user'
2022/06/17 10:00:26 INFO: /var/ossec/api/configuration/security/rbac.db database upgraded successfully
2022/06/17 10:00:26 INFO: RBAC database integrity check finished successfully
2022/06/17 10:00:29 INFO: Listening on 0.0.0.0:55000..
2022/06/17 10:00:29 INFO: Listening on ['0.0.0.0', '::']:55000..

``GET /security/users`` response:

Expand Down
12 changes: 6 additions & 6 deletions source/user-manual/api/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Here are all the available settings for the ``/var/ossec/api/configuration/api.y

.. code-block:: yaml

host: 0.0.0.0
host: ['0.0.0.0', '::']
port: 55000

drop_privileges: yes
Expand Down Expand Up @@ -96,11 +96,11 @@ API configuration options
host
^^^^

+----------------------------------+---------------+--------------------------------------------------------------------------------------+
| Allowed values | Default value | Description |
+==================================+===============+======================================================================================+
| Any valid IP address or hostname | 0.0.0.0 | IP address or hostname of the Wazuh manager where the Wazuh server API is running. |
+----------------------------------+---------------+--------------------------------------------------------------------------------------+
+-------------------------------------------+---------------------+------------------------------------------------------------------------------------------+
| Allowed values | Default value | Description |
+===========================================+=====================+==========================================================================================+
| A list of valid IP addresses or hostnames | ['0.0.0.0', '::'] | IP addresses or hostnames of the Wazuh manager where the Wazuh server API is running. |
+-------------------------------------------+---------------------+------------------------------------------------------------------------------------------+

port
^^^^
Expand Down
6 changes: 3 additions & 3 deletions source/user-manual/api/securing-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ You can change the default password for the administrative users ``wazuh`` and
3. Change the default host and port
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

By default, the ``host`` is set to ``0.0.0.0``, allowing the Wazuh server API to accept incoming connections on all available network interfaces. To restrict access, edit the Wazuh server API configuration in ``/var/ossec/api/configuration/api.yaml``:
By default, the ``host`` is set to ``['0.0.0.0', '::']``, allowing the Wazuh server API to accept incoming connections on all available network interfaces. To restrict access, edit the Wazuh server API configuration in ``/var/ossec/api/configuration/api.yaml``:

.. code-block:: yaml

host: 0.0.0.0
host: ['0.0.0.0', '::']

You can also change the default port:

Expand Down Expand Up @@ -120,4 +120,4 @@ To protect against brute force attacks, you can limit login attempts from the sa

By default, you're allowed 50 login attempts per 300-second period. To adjust these limits, edit the ``max_login_attempts`` and/or ``block_time`` settings in ``/var/ossec/api/configuration/api.yaml``.

You can find a complete Wazuh server API configuration guide :doc:`here <configuration>`.
You can find a complete Wazuh server API configuration guide :doc:`here <configuration>`.