Compare commits

..
Author SHA1 Message Date
Manuel J. Bernal 320061f022 Merge pull request #313 from wazuh/release-wazuh_3.11.4_7.6.1
Release wazuh 3.11.4 7.6.1
2020-03-06 17:41:57 +01:00
Manuel GutierrezandManuel J. Bernal 125f83e6df Update CHANGELOG.md
Co-Authored-By: Manuel J. Bernal <manuel.jimenez@wazuh.com>
2020-03-06 17:40:27 +01:00
Manuel Gutierrez 707fe87804 Fix typo 2020-03-06 17:34:25 +01:00
Manuel Gutierrez c9a43bd5ff Install Wazuh plugin from kibana folder 2020-03-06 16:43:02 +01:00
Manuel Gutierrez 26679d46f6 Increase max old space size for kibana optimize 2020-03-06 15:34:37 +01:00
Manuel Gutierrez 627e9517d8 Update changelog 2020-03-05 19:28:55 +01:00
Manuel Gutierrez ced83faef0 Bump docker-compose 2020-03-05 19:16:33 +01:00
Manuel Gutierrez 3b1814ec7b Bump versions to 3.11.4_7.6.1 2020-03-05 19:15:50 +01:00
Manuel J. Bernal 26d381b403 Merge pull request #308 from wazuh/fix-307-enable-http2
Enable HTTP2 protocol
2020-02-05 15:57:59 +01:00
Manuel J. Bernal 79f402ca2f Merge pull request #306 from wazuh/fix-305-htpasswd-batch-mode
Use batch mode on htpasswd
2020-02-05 15:56:10 +01:00
Manuel J. Bernal d0ba0465fe Merge pull request #304 from wazuh/fix-302-nginx-pid1
Fix 302 Execute nginx as PID 1
2020-02-05 15:53:29 +01:00
Manuel J. Bernal 5dbfa958b7 Merge pull request #303 from wazuh/fix-301-update-config-format
Update Nginx config syntax
2020-02-05 15:43:50 +01:00
Manuel Gutierrez c13680e084 Enable HTTP v2 2020-02-05 12:31:22 +01:00
Manuel Gutierrez e2559957da Use batch mode on htpasswd 2020-02-04 12:39:22 +01:00
Manuel Gutierrez 6afb9d0779 Exec nginx as PID 1 2020-02-03 17:08:03 +01:00
Manuel Gutierrez 6412cb90f9 Switch entrypoint to json format 2020-02-03 17:07:58 +01:00
Manuel Gutierrez bde4351a2a Update Nginx config syntax 2020-02-03 14:44:19 +01:00
Manuel Gutierrez 4f7ae19d81 Merge pull request #300 from wazuh/release-wazuh_3.11.3_7.5.2
Release wazuh 3.11.3 7.5.2
2020-01-28 19:08:12 +01:00
Manuel Gutierrez d1f1e401b1 Fix typo in CHANGELOG 2020-01-28 18:23:54 +01:00
Manuel Gutierrez ea27c239b2 Update Changelog 2020-01-28 12:36:06 +01:00
Manuel Gutierrez e437c1a4ec Update VERSION file 2020-01-28 12:35:51 +01:00
Manuel Gutierrez 1f57ad6619 Bump versions to 3.11.3_7.5.2 2020-01-28 12:35:24 +01:00
14 changed files with 154 additions and 33 deletions
+19
View File
@@ -1,6 +1,25 @@
# Change Log
All notable changes to this project will be documented in this file.
## Wazuh Docker v3.11.4_7.6.1
### Added
- Update to Wazuh version 3.11.4_7.6.1
- Enable HTTP v2 on nginx ([@xr09](https://github.com/xr09)) [#308](https://github.com/wazuh/wazuh-docker/pull/308)
### Fixed
- Updated NGINX config syntax ([@xr09](https://github.com/xr09)) [#303](https://github.com/wazuh/wazuh-docker/pull/303)
## Wazuh Docker v3.11.3_7.5.2
### Added
- Update to Wazuh version 3.11.3_7.5.2
## Wazuh Docker v3.11.2_7.5.1
### Added
+2 -2
View File
@@ -1,2 +1,2 @@
WAZUH-DOCKER_VERSION="3.11.2_7.5.1"
REVISION="31120"
WAZUH-DOCKER_VERSION="3.11.4_7.6.1"
REVISION="31140"
+5 -4
View File
@@ -3,7 +3,7 @@ version: '2'
services:
wazuh:
image: wazuh/wazuh:3.11.2_7.5.1-oss
image: wazuh/wazuh:3.11.4_7.6.1
hostname: wazuh-manager
restart: always
ports:
@@ -13,7 +13,7 @@ services:
- "55000:55000"
elasticsearch:
image: wazuh/wazuh-elasticsearch:3.11.2_7.5.1-oss
image: wazuh/wazuh-elasticsearch:3.11.4_7.6.1
hostname: elasticsearch
restart: always
ports:
@@ -30,7 +30,7 @@ services:
mem_limit: 2g
kibana:
image: wazuh/wazuh-kibana:3.11.2_7.5.1-oss
image: wazuh/wazuh-kibana:3.11.4_7.6.1
hostname: kibana
restart: always
depends_on:
@@ -38,8 +38,9 @@ services:
links:
- elasticsearch:elasticsearch
- wazuh:wazuh
nginx:
image: wazuh/wazuh-nginx:3.11.2_7.5.1
image: wazuh/wazuh-nginx:3.11.4_7.6.1
hostname: nginx
restart: always
environment:
+5 -3
View File
@@ -1,6 +1,6 @@
# Wazuh Docker Copyright (C) 2019 Wazuh Inc. (License GPLv2)
ARG ELASTIC_VERSION=7.5.1
FROM docker.elastic.co/elasticsearch/elasticsearch-oss:${ELASTIC_VERSION}
ARG ELASTIC_VERSION=7.6.1
FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
ARG ELASTIC_VERSION
ARG S3_PLUGIN_URL="https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-s3/repository-s3-${ELASTIC_VERSION}.zip"
@@ -12,9 +12,11 @@ ENV ALERTS_SHARDS="1" \
ENV API_USER="foo" \
API_PASS="bar"
ENV XPACK_ML="true"
ENV ENABLE_CONFIGURE_S3="false"
ARG TEMPLATE_VERSION=v3.11.2
ARG TEMPLATE_VERSION=v3.11.4
# Elasticearch cluster configuration environment variables
# If ELASTIC_CLUSTER is set to "true" the following variables will be added to the Elasticsearch configuration
+21
View File
@@ -20,6 +20,27 @@ run_as_other_user_if_needed() {
}
#Disabling xpack features
elasticsearch_config_file="/usr/share/elasticsearch/config/elasticsearch.yml"
if grep -Fq "#xpack features" "$elasticsearch_config_file";
then
declare -A CONFIG_MAP=(
[xpack.ml.enabled]=$XPACK_ML
)
for i in "${!CONFIG_MAP[@]}"
do
if [ "${CONFIG_MAP[$i]}" != "" ]; then
sed -i 's/.'"$i"'.*/'"$i"': '"${CONFIG_MAP[$i]}"'/' $elasticsearch_config_file
fi
done
else
echo "
#xpack features
xpack.ml.enabled: $XPACK_ML
" >> $elasticsearch_config_file
fi
# Run load settings script.
./config_cluster.sh
+16 -1
View File
@@ -6,7 +6,13 @@ set -e
el_url=${ELASTICSEARCH_URL}
until curl -XGET $el_url; do
if [[ ${ENABLED_XPACK} != "true" || "x${ELASTICSEARCH_USERNAME}" = "x" || "x${ELASTICSEARCH_PASSWORD}" = "x" ]]; then
auth=""
else
auth="--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}"
fi
until curl ${auth} -XGET $el_url; do
>&2 echo "Elastic is unavailable - sleeping"
sleep 5
done
@@ -33,6 +39,14 @@ if [ $ENABLE_CONFIGURE_S3 ]; then
fi
curl -XPUT "$el_url/_cluster/settings" ${auth} -H 'Content-Type: application/json' -d'
{
"persistent": {
"xpack.monitoring.collection.enabled": true
}
}
'
# Set cluster delayed timeout when node falls
curl -X PUT "$el_url/_all/_settings" -H 'Content-Type: application/json' -d'
{
@@ -42,4 +56,5 @@ curl -X PUT "$el_url/_all/_settings" -H 'Content-Type: application/json' -d'
}
'
echo "Elasticsearch is ready."
+22 -8
View File
@@ -1,15 +1,14 @@
# Wazuh Docker Copyright (C) 2019 Wazuh Inc. (License GPLv2)
FROM docker.elastic.co/kibana/kibana-oss:7.5.1
FROM docker.elastic.co/kibana/kibana:7.6.1
USER kibana
ARG ELASTIC_VERSION=7.5.1
ARG WAZUH_VERSION=3.11.2
ARG ELASTIC_VERSION=7.6.1
ARG WAZUH_VERSION=3.11.4
ARG WAZUH_APP_VERSION="${WAZUH_VERSION}_${ELASTIC_VERSION}"
#ADD https://packages.wazuh.com/wazuhapp/wazuhapp-${WAZUH_APP_VERSION}.zip /usr/share/kibana/
RUN /usr/share/kibana/bin/kibana-plugin install https://packages.wazuh.com/wazuhapp/wazuhapp-${WAZUH_APP_VERSION}.zip
# RUN rm -rf /tmp/wazuhapp-${WAZUH_APP_VERSION}.zip
WORKDIR /usr/share/kibana
RUN ./bin/kibana-plugin install https://packages.wazuh.com/wazuhapp/wazuhapp-${WAZUH_APP_VERSION}.zip
WORKDIR /
USER root
COPY config/entrypoint.sh ./entrypoint.sh
RUN chmod 755 ./entrypoint.sh
@@ -34,12 +33,21 @@ ENV PATTERN="" \
WAZUH_VERSION_REPLICAS="" \
IP_SELECTOR="" \
IP_IGNORE="" \
XPACK_RBAC_ENABLED="" \
WAZUH_MONITORING_ENABLED="" \
WAZUH_MONITORING_FREQUENCY="" \
WAZUH_MONITORING_SHARDS="" \
WAZUH_MONITORING_REPLICAS="" \
ADMIN_PRIVILEGES=""
ARG XPACK_CANVAS="true"
ARG XPACK_LOGS="true"
ARG XPACK_INFRA="true"
ARG XPACK_ML="true"
ARG XPACK_DEVTOOLS="true"
ARG XPACK_MONITORING="true"
ARG XPACK_APM="true"
ARG CHANGE_WELCOME="false"
COPY --chown=kibana:kibana ./config/wazuh_app_config.sh ./
@@ -50,12 +58,18 @@ COPY --chown=kibana:kibana ./config/kibana_settings.sh ./
RUN chmod +x ./kibana_settings.sh
COPY --chown=kibana:kibana ./config/xpack_config.sh ./
RUN chmod +x ./xpack_config.sh
RUN ./xpack_config.sh
COPY --chown=kibana:kibana ./config/welcome_wazuh.sh ./
RUN chmod +x ./welcome_wazuh.sh
RUN ./welcome_wazuh.sh
USER kibana
RUN /usr/local/bin/kibana-docker --optimize
RUN NODE_OPTIONS="--max-old-space-size=2048" /usr/local/bin/kibana-docker --optimize
ENTRYPOINT ./entrypoint.sh
+7 -1
View File
@@ -13,7 +13,13 @@ else
el_url="${ELASTICSEARCH_URL}"
fi
until curl -XGET $el_url; do
if [[ ${ENABLED_XPACK} != "true" || "x${ELASTICSEARCH_USERNAME}" = "x" || "x${ELASTICSEARCH_PASSWORD}" = "x" ]]; then
auth=""
else
auth="--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}"
fi
until curl -XGET $el_url ${auth}; do
>&2 echo "Elastic is unavailable - sleeping"
sleep 5
done
+8
View File
@@ -30,6 +30,14 @@ if [ "$KIBANA_INDEX" != "" ]; then
echo "kibana.index: $KIBANA_INDEX" >> /usr/share/kibana/config/kibana.yml
fi
# If XPACK_SECURITY_ENABLED was set, then change the xpack.security.enabled option from true (default) to false.
if [ "$XPACK_SECURITY_ENABLED" != "" ]; then
if grep -q 'xpack.security.enabled' /usr/share/kibana/config/kibana.yml; then
sed -i '/xpack.security.enabled/d' /usr/share/kibana/config/kibana.yml
fi
echo "xpack.security.enabled: $XPACK_SECURITY_ENABLED" >> /usr/share/kibana/config/kibana.yml
fi
if [ "$KIBANA_IP" != "" ]; then
kibana_ip="$KIBANA_IP"
else
+2 -1
View File
@@ -29,6 +29,7 @@ declare -A CONFIG_MAP=(
[wazuh-version.replicas]=$WAZUH_VERSION_REPLICAS
[ip.selector]=$IP_SELECTOR
[ip.ignore]=$IP_IGNORE
[xpack.rbac.enabled]=$XPACK_RBAC_ENABLED
[wazuh.monitoring.enabled]=$WAZUH_MONITORING_ENABLED
[wazuh.monitoring.frequency]=$WAZUH_MONITORING_FREQUENCY
[wazuh.monitoring.shards]=$WAZUH_MONITORING_SHARDS
@@ -46,7 +47,7 @@ done
# remove default API entry (new in 3.11.0_7.5.1)
sed -ie '/- default:/,+4d' $kibana_config_file
CONFIG_CODE=$(curl -s -o /dev/null -w "%{http_code}" -XGET $el_url/.wazuh/_doc/1513629884013)
CONFIG_CODE=$(curl -s -o /dev/null -w "%{http_code}" -XGET $el_url/.wazuh/_doc/1513629884013 ${auth})
grep -q 1513629884013 $kibana_config_file
_config_exists=$?
+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
# Wazuh Docker Copyright (C) 2019 Wazuh Inc. (License GPLv2)
kibana_config_file="/usr/share/kibana/config/kibana.yml"
if grep -Fq "#xpack features" "$kibana_config_file";
then
declare -A CONFIG_MAP=(
[xpack.apm.ui.enabled]=$XPACK_APM
[xpack.grokdebugger.enabled]=$XPACK_DEVTOOLS
[xpack.searchprofiler.enabled]=$XPACK_DEVTOOLS
[xpack.ml.enabled]=$XPACK_ML
[xpack.canvas.enabled]=$XPACK_CANVAS
[xpack.infra.enabled]=$XPACK_INFRA
[xpack.monitoring.enabled]=$XPACK_MONITORING
[console.enabled]=$XPACK_DEVTOOLS
)
for i in "${!CONFIG_MAP[@]}"
do
if [ "${CONFIG_MAP[$i]}" != "" ]; then
sed -i 's/.'"$i"'.*/'"$i"': '"${CONFIG_MAP[$i]}"'/' $kibana_config_file
fi
done
else
echo "
#xpack features
xpack.apm.ui.enabled: $XPACK_APM
xpack.grokdebugger.enabled: $XPACK_DEVTOOLS
xpack.searchprofiler.enabled: $XPACK_DEVTOOLS
xpack.ml.enabled: $XPACK_ML
xpack.canvas.enabled: $XPACK_CANVAS
xpack.infra.enabled: $XPACK_INFRA
xpack.monitoring.enabled: $XPACK_MONITORING
console.enabled: $XPACK_DEVTOOLS
" >> $kibana_config_file
fi
+1 -1
View File
@@ -16,4 +16,4 @@ VOLUME ["/etc/nginx/conf.d"]
ENV NGINX_NAME="foo" \
NGINX_PWD="bar"
ENTRYPOINT /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
+6 -7
View File
@@ -30,14 +30,14 @@ if [ ! -f /etc/nginx/conf.d/kibana.htpasswd ]; then
do
IFS=':' read -r -a credentials <<< "${users[index]}"
if [ $index -eq 0 ]; then
echo ${credentials[1]}|htpasswd -i -c /etc/nginx/conf.d/kibana.htpasswd ${credentials[0]} >/dev/null
htpasswd -b -c /etc/nginx/conf.d/kibana.htpasswd ${credentials[0]} ${credentials[1]} >/dev/null
else
echo ${credentials[1]}|htpasswd -i /etc/nginx/conf.d/kibana.htpasswd ${credentials[0]} >/dev/null
htpasswd -b /etc/nginx/conf.d/kibana.htpasswd ${credentials[0]} ${credentials[1]} >/dev/null
fi
done
else
# NGINX_PWD and NGINX_NAME are declared in nginx/Dockerfile
echo $NGINX_PWD|htpasswd -i -c /etc/nginx/conf.d/kibana.htpasswd $NGINX_NAME >/dev/null
htpasswd -b -c /etc/nginx/conf.d/kibana.htpasswd $NGINX_NAME $NGINX_PWD >/dev/null
fi
else
echo "Kibana credentials already configured"
@@ -60,9 +60,8 @@ server {
}
server {
listen ${NGINX_PORT} default_server;
listen [::]:${NGINX_PORT};
ssl on;
listen ${NGINX_PORT} default_server ssl http2;
listen [::]:${NGINX_PORT} ssl http2;
ssl_certificate /etc/nginx/conf.d/ssl/certs/kibana-access.pem;
ssl_certificate_key /etc/nginx/conf.d/ssl/private/kibana-access.key;
location / {
@@ -76,4 +75,4 @@ server {
}
EOF
nginx -g 'daemon off;'
exec nginx -g 'daemon off;'
+5 -5
View File
@@ -1,14 +1,14 @@
# Wazuh Docker Copyright (C) 2019 Wazuh Inc. (License GPLv2)
FROM phusion/baseimage:latest
ARG FILEBEAT_VERSION=7.5.1
ARG FILEBEAT_VERSION=7.6.1
ARG WAZUH_VERSION=3.11.2-1
ARG WAZUH_VERSION=3.11.4-1
ENV API_USER="foo" \
API_PASS="bar"
ARG TEMPLATE_VERSION="v3.11.2"
ARG TEMPLATE_VERSION="v3.11.4"
# Set repositories.
RUN set -x && echo "deb https://packages.wazuh.com/3.x/apt/ stable main" | tee /etc/apt/sources.list.d/wazuh.list && \
@@ -38,8 +38,8 @@ COPY config/01-config_filebeat.sh /entrypoint-scripts/01-config_filebeat.sh
RUN chmod 755 /init.bash && \
sync && /init.bash && \
sync && rm /init.bash && \
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-oss-${FILEBEAT_VERSION}-amd64.deb &&\
dpkg -i filebeat-oss-${FILEBEAT_VERSION}-amd64.deb && rm -f filebeat-oss-${FILEBEAT_VERSION}-amd64.deb && \
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${FILEBEAT_VERSION}-amd64.deb &&\
dpkg -i filebeat-${FILEBEAT_VERSION}-amd64.deb && rm -f filebeat-${FILEBEAT_VERSION}-amd64.deb && \
chmod 755 /entrypoint.sh && \
chmod 755 /entrypoint-scripts/00-wazuh.sh && \
chmod 755 /entrypoint-scripts/01-config_filebeat.sh