| 1 |
Wazuh |
| 2 |
===== |
| 3 |
|
| 4 |
|image0| |
| 5 |
|
| 6 |
Presentation |
| 7 |
------------ |
| 8 |
|
| 9 |
`Wazuh <https://wazuh.com/>`__ is an Open Source Security Information and Event Management (SIEM) and Extended Detection and Response (XDR) |
| 10 |
solution that supports the :doc:`SAML <../idpsaml>` protocol. |
| 11 |
|
| 12 |
Configuration |
| 13 |
-------------- |
| 14 |
|
| 15 |
LL::NG |
| 16 |
~~~~~~ |
| 17 |
|
| 18 |
This page assumes you already have configured the SAML Service in |
| 19 |
LemonLDAP::NG, if not please follow : |
| 20 |
:doc:`SAML service configuration<../samlservice>` |
| 21 |
|
| 22 |
|
| 23 |
LL::NG SAML Key & Certificate |
| 24 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 25 |
|
| 26 |
Wazuh requires a certificate in the published Identity Provider metadata (i.e. not a public key). Make sure you have generated a set of private key and public certificate in |
| 27 |
``SAML`` » ``Security`` » ``Keys``. |
| 28 |
|
| 29 |
LL::NG SAML Configuration |
| 30 |
^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 31 |
|
| 32 |
Use RSA-SHA256 for the IDP signature method. |
| 33 |
|
| 34 |
Now go in "Exported attributes" and add the 'groups' variables and put the name 'Roles' for the attribute name. The attribute name must match the |
| 35 |
'roles_key' configuration of the Wazuh indexer. |
| 36 |
|
| 37 |
You can generate the Service Provider xml using `SAMLTool <https://www.samltool.com/sp_metadata.php>`__. Indicate ``https://<WAZUH_DHASBOARD_DOMAIN>/_opendistro/_security/saml/acs`` as the Attribute Consume Service Endpoint and ``https://<WAZUH_DHASBOARD_DOMAIN>/`` as the Logout Service Endpoint. |
| 38 |
|
| 39 |
Wazuh |
| 40 |
~~~~~ |
| 41 |
|
| 42 |
Refer to the `Wazuh documentation |
| 43 |
<https://documentation.wazuh.com/current/user-manual/user-administration/single-sign-on/index.html>`__ to configure your Wazuh server and Wazuh Dashboard. |
| 44 |
|
| 45 |
Wazuh Indexer |
| 46 |
^^^^^^^^^^^^^ |
| 47 |
|
| 48 |
This configuration must be present in ``/usr/share/wazuh-indexer/opensearch-security/config.yml`` : |
| 49 |
|
| 50 |
:: |
| 51 |
|
| 52 |
saml_auth_domain: |
| 53 |
http_enabled: true |
| 54 |
transport_enabled: false |
| 55 |
order: 1 |
| 56 |
http_authenticator: |
| 57 |
type: saml |
| 58 |
challenge: true |
| 59 |
config: |
| 60 |
idp: |
| 61 |
# LLNG SAML metadata |
| 62 |
metadata_file: '/usr/share/wazuh-indexer/opensearch-security/idp.wazuh.xml' |
| 63 |
# URL of LLNG metadata |
| 64 |
entity_id: "https://LLNG_DOMAIN/saml/metadata" |
| 65 |
sp: |
| 66 |
entity_id: wazuh-saml |
| 67 |
# Wazuh SAML metadata |
| 68 |
metadata_file: /usr/share/wazuh-indexer/opensearch-security/sp.wazuh.xml |
| 69 |
kibana_url: https://WAZUH_DASHBOARD |
| 70 |
# Must match the groups exported attribute |
| 71 |
roles_key: Roles |
| 72 |
# Generate one with 'openssl rand -hex 32' |
| 73 |
exchange_key: 'key' |
| 74 |
|
| 75 |
Also add the required role mappings in ``/usr/share/wazuh-indexer/opensearch-security/roles_mapping.yml``. |
| 76 |
|
| 77 |
Note that the SAML authentication requires the following JVM policy in the Wazuh indexer start command: |
| 78 |
|
| 79 |
:: |
| 80 |
|
| 81 |
grant { |
| 82 |
permission java.util.PropertyPermission "*","read,write"; |
| 83 |
} |
| 84 |
|
| 85 |
Wazuh Dashboard |
| 86 |
^^^^^^^^^^^^^^^ |
| 87 |
|
| 88 |
Put the following configuration in ``/etc/wazuh-dashboard/opensearch_dashboards.yml``: |
| 89 |
|
| 90 |
:: |
| 91 |
|
| 92 |
opensearch_security.auth.type: "saml" |
| 93 |
server.xsrf.allowlist: ["/_opendistro/_security/saml/acs", "/_opendistro/_security/saml/logout", "/_opendistro/_security/saml/acs/idpinitiated"] |
| 94 |
opensearch_security.session.keepalive: false |
| 95 |
|
| 96 |
|
| 97 |
.. |image0| image:: /applications/wazuh-logo.png |
| 98 |
:class: align-center |
| 99 |
|