From 3080b37c82adde295c581a890a72c781908ff5ae Mon Sep 17 00:00:00 2001 From: GGP1 Date: Wed, 26 Jun 2024 13:10:11 -0300 Subject: [PATCH 1/2] Upgrade docker and urrlib packages --- .../monitoring-docker.rst | 23 ++++++++++++++++--- .../container-security/monitoring-docker.rst | 20 ++++++++++++++-- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/source/proof-of-concept-guide/monitoring-docker.rst b/source/proof-of-concept-guide/monitoring-docker.rst index bbac509bc9..e3b5ff8083 100644 --- a/source/proof-of-concept-guide/monitoring-docker.rst +++ b/source/proof-of-concept-guide/monitoring-docker.rst @@ -38,10 +38,27 @@ Perform the following steps to install Docker on the Ubuntu endpoint and configu #. Install Docker and Python Docker Library: - .. code-block:: console +.. tabs:: + + .. group-tab:: Python 3.7–3.10 + + .. code-block:: console + + $ curl -sSL https://get.docker.com/ | sh + $ sudo pip3 install docker==7.1.0 urllib3==2.2.2 requests==2.32.2 + + .. group-tab:: Python 3.11 + + .. code-block:: console + + $ curl -sSL https://get.docker.com/ | sh + $ sudo pip3 install docker==7.1.0 urllib3==2.2.2 requests==2.32.2 --break-system-packages + + .. note:: - $ curl -sSL https://get.docker.com/ | sh - $ sudo pip3 install docker==6.0.0 urllib3==1.26.18 + This command modifies the default externally managed Python environment. See the `PEP 668 `__ description for more information. + + To prevent the modification, you can run ``pip3 install --upgrade pip`` within a virtual environment. You must update the docker ``/var/ossec/wodles/docker/DockerListener`` script shebang with your virtual environment interpreter. For example: ``#!/bin/python3``. #. Edit the Wazuh agent configuration file ``/var/ossec/etc/ossec.conf`` and add this block to enable the ``docker-listener`` module: diff --git a/source/user-manual/capabilities/container-security/monitoring-docker.rst b/source/user-manual/capabilities/container-security/monitoring-docker.rst index 0ab4d0be3d..5fa40103ca 100644 --- a/source/user-manual/capabilities/container-security/monitoring-docker.rst +++ b/source/user-manual/capabilities/container-security/monitoring-docker.rst @@ -39,9 +39,25 @@ Docker library for Python `Python Docker library `_ is the official Python library for the Docker Engine API. The Wazuh docker integration requires ``docker 6.0.0``. -.. code-block:: console +.. tabs:: - # pip3 install docker==6.0.0 urllib3==1.26.18 + .. group-tab:: Python 3.7–3.10 + + .. code-block:: console + + $ pip3 install docker==7.1.0 urllib3==2.2.2 requests==2.32.2 + + .. group-tab:: Python 3.11 + + .. code-block:: console + + $ pip3 install docker==7.1.0 urllib3==2.2.2 requests==2.32.2 --break-system-packages + + .. note:: + + This command modifies the default externally managed Python environment. See the `PEP 668 `__ description for more information. + + To prevent the modification, you can run ``pip3 install --upgrade pip`` within a virtual environment. You must update the docker ``/var/ossec/wodles/docker/DockerListener`` script shebang with your virtual environment interpreter. For example: ``#!/bin/python3``. Configure the Wazuh agent ^^^^^^^^^^^^^^^^^^^^^^^^^ From a74784ca0acf7697664eec740dfe4181117b287c Mon Sep 17 00:00:00 2001 From: Javier Medeot Date: Fri, 28 Jun 2024 12:12:57 -0300 Subject: [PATCH 2/2] Add changes from review --- .../monitoring-docker.rst | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/source/proof-of-concept-guide/monitoring-docker.rst b/source/proof-of-concept-guide/monitoring-docker.rst index e3b5ff8083..753bf77b35 100644 --- a/source/proof-of-concept-guide/monitoring-docker.rst +++ b/source/proof-of-concept-guide/monitoring-docker.rst @@ -38,27 +38,27 @@ Perform the following steps to install Docker on the Ubuntu endpoint and configu #. Install Docker and Python Docker Library: -.. tabs:: + .. tabs:: - .. group-tab:: Python 3.7–3.10 + .. group-tab:: Python 3.7–3.10 - .. code-block:: console + .. code-block:: console - $ curl -sSL https://get.docker.com/ | sh - $ sudo pip3 install docker==7.1.0 urllib3==2.2.2 requests==2.32.2 + $ curl -sSL https://get.docker.com/ | sh + $ sudo pip3 install docker==7.1.0 urllib3==2.2.2 requests==2.32.2 - .. group-tab:: Python 3.11 + .. group-tab:: Python 3.11 - .. code-block:: console + .. code-block:: console - $ curl -sSL https://get.docker.com/ | sh - $ sudo pip3 install docker==7.1.0 urllib3==2.2.2 requests==2.32.2 --break-system-packages + $ curl -sSL https://get.docker.com/ | sh + $ sudo pip3 install docker==7.1.0 urllib3==2.2.2 requests==2.32.2 --break-system-packages - .. note:: + .. note:: - This command modifies the default externally managed Python environment. See the `PEP 668 `__ description for more information. + This command modifies the default externally managed Python environment. See the `PEP 668 `__ description for more information. - To prevent the modification, you can run ``pip3 install --upgrade pip`` within a virtual environment. You must update the docker ``/var/ossec/wodles/docker/DockerListener`` script shebang with your virtual environment interpreter. For example: ``#!/bin/python3``. + To prevent the modification, you can run ``pip3 install --upgrade pip`` within a virtual environment. You must update the docker ``/var/ossec/wodles/docker/DockerListener`` script shebang with your virtual environment interpreter. For example: ``#!/bin/python3``. #. Edit the Wazuh agent configuration file ``/var/ossec/etc/ossec.conf`` and add this block to enable the ``docker-listener`` module: