Installing dependencies
Note
The Azure monitoring module can be configured in the ThreatLockDown manager (which also behaves as an agent) or directly in a ThreatLockDown agent.
Warning
The ThreatLockDown manager includes all dependencies installed, these steps are only necessary when configuring the integration in a ThreatLockDown agent.
Python
The Azure module requires Python 3. Specifically, it's compatible with Python 3.7–3.11. While later Python versions should work as well, we can't assure they are compatible.
# yum update && yum install python3
# apt-get update && apt-get install python3
The required modules can be installed with Pip, the Python package manager. Most of UNIX distributions have this tool available in their software repositories:
# yum update && yum install python3-pip
# apt-get update && apt-get install python3-pip
It is recommended to use a pip version greater than or equal to 19.3 to ease the installation of the required dependencies.
# pip3 install --upgrade pip
# pip3 install --upgrade pip --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 azure-logs
script shebang with your virtual environment interpreter, for example, #!/path/to/your/virtual/environment/bin/python3
.
Azure Storage client library for Python
Azure Storage Blobs client library is the official Python library for Microsoft's Azure Blob storage.
To install the dependencies, execute the following command:
# pip3 install azure-storage-blob==2.1.0 azure-storage-common==2.1.0 azure-common==1.1.25 cryptography==3.3.2 cffi==1.14.4 pycparser==2.20 six==1.14.0 python-dateutil==2.8.1 requests==2.25.1 certifi==2022.12.07 chardet==3.0.4 idna==2.9 urllib3==1.26.18 SQLAlchemy==2.0.23 pytz==2020.1
# pip3 install --break-system-packages azure-storage-blob==2.1.0 azure-storage-common==2.1.0 azure-common==1.1.25 cryptography==3.3.2 cffi==1.14.4 pycparser==2.20 six==1.14.0 python-dateutil==2.8.1 requests==2.25.1 certifi==2022.12.07 chardet==3.0.4 idna==2.9 urllib3==1.26.18 SQLAlchemy==2.0.23 pytz==2020.1
Note
If you're using a virtual environment, remove the --break-system-packages
parameter from the command above.