-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added auto adding agent to Wazuh group
- Loading branch information
Showing
13 changed files
with
269 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,8 @@ | ||
.idea/ | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
Makefile | ||
Dockerfile | ||
README.md | ||
docker-compose.yaml | ||
entrypoint.sh | ||
test.py | ||
register_agent.py__ | ||
wazuh-daemonset.yaml | ||
tmp/ | ||
.git/ | ||
.github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ src/ | |
register_agent.py__ | ||
test.py | ||
docker-compose.yaml | ||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
FROM bitnami/minideb:latest-amd64 as builder | ||
COPY requirements.txt /tmp | ||
RUN install_packages python3-pip python3-setuptools python3-dev gcc && \ | ||
python3 -m pip wheel -w /tmp/wheel -r /tmp/requirements.txt | ||
|
||
FROM bitnami/minideb:latest-amd64 | ||
LABEL maintainer="[email protected]" | ||
LABEL version="4.3.9" | ||
LABEL version="4.3.10" | ||
LABEL description="Wazuh Docker Agent" | ||
ARG AGENT_VERSION="4.3.10-1" | ||
ENV JOIN_MANAGER_MASTER_HOST="" | ||
ENV JOIN_MANAGER_WORKER_HOST="" | ||
ENV VIRUS_TOTAL_KEY="" | ||
ENV JOIN_MANAGER_PROTOCOL="https" | ||
ENV JOIN_MANAGER_USER = "" | ||
ENV JOIN_MANAGER_PASSWORD="" | ||
ENV JOIN_MANAGER_API_PORT="55000" | ||
ENV HEALTH_CHECK_PROCESSES="" | ||
ENV FLASK_APP="register_agent.py" | ||
ENV FLASK_ENV="development" | ||
ENV FLASK_DEBUG=0 | ||
ENV FLASK_BIND=0.0.0.0 | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV PYTHONUNBUFFERED=1 | ||
RUN install_packages \ | ||
procps curl apt-transport-https gnupg2 inotify-tools python3-docker python3-pip python3-setuptools python3-dev gcc && \ | ||
procps curl apt-transport-https gnupg2 inotify-tools python3-docker python3-setuptools python3-pip && \ | ||
curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | apt-key add - && \ | ||
echo "deb https://packages.wazuh.com/4.x/apt/ stable main" | tee /etc/apt/sources.list.d/wazuh.list && \ | ||
install_packages wazuh-agent && \ | ||
install_packages wazuh-agent=${AGENT_VERSION} && \ | ||
echo "deb http://security.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list && \ | ||
mkdir -p /usr/share/man/man1 && \ | ||
install_packages openjdk-8-jdk | ||
COPY . /var/ossec/ | ||
|
||
COPY *.py *.jinja2 /var/ossec/ | ||
WORKDIR /var/ossec/ | ||
RUN pip3 --no-cache-dir install -r /var/ossec/requirements.txt && \ | ||
rm -rf /var/ossec/requirements.txt && \ | ||
COPY --from=builder /tmp/wheel /tmp/wheel | ||
RUN pip3 install --no-index /tmp/wheel/*.whl && \ | ||
chmod +x /var/ossec/deregister_agent.py && \ | ||
chmod +x /var/ossec/register_agent.py && \ | ||
apt-get remove --purge -y python3-dev gcc && \ | ||
apt-get clean autoclean && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/{apt,dpkg,cache,log}/ && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.