forked from wazuh/wazuh-docker
committed by
Jesús Linares
parent
086ba71c69
commit
fdb55e8ce1
+12
-5
@@ -2,14 +2,14 @@
|
||||
FROM phusion/baseimage:latest
|
||||
|
||||
# Arguments
|
||||
ARG FILEBEAT_VERSION=7.2.1
|
||||
ARG WAZUH_VERSION=3.9.5-1
|
||||
ARG FILEBEAT_VERSION=7.3.2
|
||||
ARG WAZUH_VERSION=3.10.2-1
|
||||
|
||||
# Environment variables
|
||||
ENV API_USER="foo" \
|
||||
API_PASS="bar"
|
||||
|
||||
ARG TEMPLATE_VERSION="v3.9.5"
|
||||
ARG TEMPLATE_VERSION="v3.10.2"
|
||||
|
||||
# Install packages
|
||||
RUN set -x && \
|
||||
@@ -92,10 +92,17 @@ VOLUME ["/var/lib/filebeat"]
|
||||
RUN mkdir /entrypoint-scripts
|
||||
|
||||
COPY config/entrypoint.sh /entrypoint.sh
|
||||
COPY config/00-decrypt_credentials.sh /entrypoint-scripts/00-decrypt_credentials.sh
|
||||
COPY config/01-wazuh.sh /entrypoint-scripts/01-wazuh.sh
|
||||
|
||||
COPY config/05-remove_credentials_file.sh /entrypoint-scripts/05-remove_credentials_file.sh
|
||||
COPY config/10-backups.sh /entrypoint-scripts/10-backups.sh
|
||||
COPY config/20-ossec-configuration.sh /entrypoint-scripts/20-ossec-configuration.sh
|
||||
RUN chmod 755 /entrypoint.sh && \
|
||||
chmod 755 /entrypoint-scripts/01-wazuh.sh
|
||||
chmod 755 /entrypoint-scripts/01-wazuh.sh && \
|
||||
chmod 755 /entrypoint-scripts/00-decrypt_credentials.sh && \
|
||||
chmod 755 /entrypoint-scripts/05-remove_credentials_file.sh && \
|
||||
chmod 755 /entrypoint-scripts/10-backups.sh && \
|
||||
chmod 755 /entrypoint-scripts/20-ossec-configuration.sh
|
||||
|
||||
# Workaround.
|
||||
# Issues: Wazuh-api
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Wazuh Docker Copyright (C) 2019 Wazuh Inc. (License GPLv2)
|
||||
|
||||
##############################################################################
|
||||
# Decrypt credentials.
|
||||
# If the credentials of the API user to be created are encrypted,
|
||||
# it must be decrypted for later use.
|
||||
##############################################################################
|
||||
|
||||
if [[ "x${SECURITY_CREDENTIALS_FILE}" == "x" ]]; then
|
||||
echo "CREDENTIALS - Security credentials file not used. Nothing to do."
|
||||
else
|
||||
echo "CREDENTIALS - TO DO"
|
||||
fi
|
||||
# TO DO
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# Wazuh Docker Copyright (C) 2019 Wazuh Inc. (License GPLv2)
|
||||
|
||||
##############################################################################
|
||||
# Decrypt credentials.
|
||||
# Remove the credentials file for security reasons.
|
||||
##############################################################################
|
||||
|
||||
if [[ "x${SECURITY_CREDENTIALS_FILE}" == "x" ]]; then
|
||||
echo "CREDENTIALS - Security credentials file not used. Nothing to do."
|
||||
else
|
||||
echo "CREDENTIALS - Remove credentiasl file."
|
||||
shred -zvu ${SECURITY_CREDENTIALS_FILE}
|
||||
fi
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# Wazuh Docker Copyright (C) 2019 Wazuh Inc. (License GPLv2)
|
||||
|
||||
##############################################################################
|
||||
# Enable Wazuh backups and store them in a repository.
|
||||
##############################################################################
|
||||
|
||||
|
||||
# TO DO
|
||||
echo "BACKUPS - TO DO"
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# Wazuh Docker Copyright (C) 2019 Wazuh Inc. (License GPLv2)
|
||||
|
||||
##############################################################################
|
||||
# Change Wazuh manager configuration.
|
||||
##############################################################################
|
||||
|
||||
# # Example:
|
||||
# # Change remote protocol from udp to tcp
|
||||
# PROTOCOL="tcp"
|
||||
# sed -i -e '/<remote>/,/<\/remote>/ s|<protocol>udp</protocol>|<protocol>'$PROTOCOL'</protocol>|g' /var/ossec/etc/ossec.conf
|
||||
# # It is necessary to restart the service in order to apply the new configuration.
|
||||
# service wazuh-manager restart
|
||||
Reference in New Issue
Block a user