Skip to content

Commit

Permalink
Merge pull request #442 from wazuh/release-wazuh_4.1.0
Browse files Browse the repository at this point in the history
Release wazuh 4.1.0
  • Loading branch information
xr09 authored Feb 17, 2021
2 parents e2e96c5 + 5da9c5d commit b36f24a
Show file tree
Hide file tree
Showing 23 changed files with 963 additions and 43 deletions.
8 changes: 4 additions & 4 deletions .goss.kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ file:
group: root
filetype: file
contains: []
/usr/share/kibana/optimize/bundles/light_theme.style.css:
/usr/share/kibana/src/core/server/core_app/assets/legacy_light_theme.css:
exists: true
mode: "0664"
owner: kibana
group: root
filetype: file
contains: []
/usr/share/kibana/optimize/bundles/wazuh_logo_circle.svg:
/usr/share/kibana/src/core/server/core_app/assets/wazuh_logo_circle.svg:
exists: true
mode: "0644"
owner: kibana
group: root
filetype: file
contains: []
/usr/share/kibana/optimize/bundles/wazuh_wazuh_bg.svg:
/usr/share/kibana/src/core/server/core_app/assets/wazuh_wazuh_bg.svg:
exists: true
mode: "0644"
owner: kibana
group: root
filetype: file
contains: []
/usr/share/kibana/optimize/wazuh/config/wazuh.yml:
/usr/share/kibana/data/wazuh/config/wazuh.yml:
exists: true
mode: "0644"
owner: kibana
Expand Down
4 changes: 2 additions & 2 deletions .goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ package:
filebeat:
installed: true
versions:
- 7.9.1
- 7.10.0
wazuh-manager:
installed: true
versions:
- 4.0.4
- 4.1.0
port:
tcp:1514:
listening: true
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log
All notable changes to this project will be documented in this file.
## Wazuh Docker v4.1.0
### Added

- Update Wazuh to version [4.1.0](https://github.com/wazuh/wazuh/blob/v4.1.0/CHANGELOG.md#v410)
- Update ODFE compatibility to version 1.12.0
- Add support for Elasticsearch (xpack) images once again (7.10.2) ([@xr09](https://github.com/xr09)) [#409](https://github.com/wazuh/wazuh-docker/pull/409)
- Re-enable entrypoint scripts ([@xr09](https://github.com/xr09)) [#435](https://github.com/wazuh/wazuh-docker/pull/435)
- Add Goss binary for healthchecks ([@xr09](https://github.com/xr09)) [$441](https://github.com/wazuh/wazuh-docker/pull/441)
- Update s6-overlay to latest version

## Wazuh Docker v4.0.4_1.11.0

Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,22 +148,24 @@ ADMIN_PRIVILEGES=true # App privileges

* `4.0` branch on correspond to the latest Wazuh-Docker stable version.
* `master` branch contains the latest code, be aware of possible bugs on this branch.
* `Wazuh.Version_ElasticStack.Version` (for example 3.13.1_7.8.0) branch. This branch contains the current release referenced in Docker Hub. The container images are installed under the current version of this branch.
* `Wazuh.Version` (for example 3.13.1_7.8.0 or 4.1.0) branch. This branch contains the current release referenced in Docker Hub. The container images are installed under the current version of this branch.


## Compatibility Matrix

| Wazuh version | ODFE |
|---------------|---------|
| v4.0.4 | 1.11.0 |
|---------------|---------|
| v4.0.3 | 1.11.0 |
|---------------|---------|
| v4.0.2 | 1.11.0 |
|---------------|---------|
| v4.0.1 | 1.11.0 |
|---------------|---------|
| v4.0.0 | 1.10.1 |
| Wazuh version | ODFE | XPACK |
|---------------|---------|--------|
| v4.1.0 | 1.12.0 | 7.10.2 |
|---------------|---------|--------|
| v4.0.4 | 1.11.0 | |
|---------------|---------|--------|
| v4.0.3 | 1.11.0 | |
|---------------|---------|--------|
| v4.0.2 | 1.11.0 | |
|---------------|---------|--------|
| v4.0.1 | 1.11.0 | |
|---------------|---------|--------|
| v4.0.0 | 1.10.1 | |

## Credits and Thank you

Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
WAZUH-DOCKER_VERSION="4.0.4_1.11.0"
REVISION="40400"
WAZUH-DOCKER_VERSION="4.1.0"
REVISION="41000"
2 changes: 1 addition & 1 deletion build-from-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
- filebeat_var:/var/lib/filebeat

elasticsearch:
image: amazon/opendistro-for-elasticsearch:1.11.0
image: amazon/opendistro-for-elasticsearch:1.12.0
hostname: elasticsearch
restart: always
ports:
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.7'

services:
wazuh:
image: wazuh/wazuh-odfe:4.0.4_1.11.0
image: wazuh/wazuh-odfe:4.1.0
hostname: wazuh-manager
restart: always
ports:
Expand All @@ -30,7 +30,7 @@ services:
- filebeat_var:/var/lib/filebeat

elasticsearch:
image: amazon/opendistro-for-elasticsearch:1.11.0
image: amazon/opendistro-for-elasticsearch:1.12.0
hostname: elasticsearch
restart: always
ports:
Expand All @@ -50,7 +50,7 @@ services:
hard: 65536

kibana:
image: wazuh/wazuh-kibana-odfe:4.0.4_1.11.0
image: wazuh/wazuh-kibana-odfe:4.1.0
hostname: kibana
restart: always
ports:
Expand Down
17 changes: 17 additions & 0 deletions generate-elasticsearch-certs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '2.2'

services:
generator:
container_name: generator
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
command: >
bash -c '
if [[ ! -f config/certificates/bundle.zip ]]; then
bin/elasticsearch-certutil cert --silent --pem --in config/certificates/instances.yml -out config/certificates/bundle.zip;
unzip config/certificates/bundle.zip -d config/certificates/;
fi;
chown -R 1000:0 /certs
'
user: "0"
working_dir: /usr/share/elasticsearch
volumes: ['./xpack:/usr/share/elasticsearch/config/certificates']
9 changes: 4 additions & 5 deletions kibana-odfe/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Wazuh Docker Copyright (C) 2021 Wazuh Inc. (License GPLv2)
FROM amazon/opendistro-for-elasticsearch-kibana:1.11.0
FROM amazon/opendistro-for-elasticsearch-kibana:1.12.0
USER kibana
ARG ELASTIC_VERSION=7.9.1
ARG WAZUH_VERSION=4.0.4
ARG ELASTIC_VERSION=7.10.0
ARG WAZUH_VERSION=4.1.0
ARG WAZUH_APP_VERSION="${WAZUH_VERSION}_${ELASTIC_VERSION}"

WORKDIR /usr/share/kibana
Expand Down Expand Up @@ -42,15 +42,14 @@ ENV PATTERN="" \
ADMIN_PRIVILEGES=""

USER kibana
RUN NODE_OPTIONS="--max-old-space-size=2048" /usr/local/bin/kibana-docker --optimize

COPY ./config/custom_welcome /tmp/custom_welcome
COPY --chown=kibana:kibana ./config/welcome_wazuh.sh ./
RUN chmod +x ./welcome_wazuh.sh
ARG CHANGE_WELCOME="true"
RUN ./welcome_wazuh.sh

COPY --chown=kibana:kibana ./config/wazuh.yml /usr/share/kibana/optimize/wazuh/config/wazuh.yml
COPY --chown=kibana:kibana ./config/wazuh.yml /usr/share/kibana/data/wazuh/config/wazuh.yml
COPY --chown=kibana:kibana ./config/wazuh_app_config.sh ./
RUN chmod +x ./wazuh_app_config.sh

Expand Down
2 changes: 1 addition & 1 deletion kibana-odfe/config/wazuh_app_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ wazuh_port="${API_PORT:-55000}"
api_username="${API_USERNAME:-wazuh-wui}"
api_password="${API_PASSWORD:-wazuh-wui}"

kibana_config_file="/usr/share/kibana/optimize/wazuh/config/wazuh.yml"
kibana_config_file="/usr/share/kibana/data/wazuh/config/wazuh.yml"

declare -A CONFIG_MAP=(
[pattern]=$PATTERN
Expand Down
4 changes: 2 additions & 2 deletions kibana-odfe/config/welcome_wazuh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ then

echo "Set custom welcome styles"
cp -f /tmp/custom_welcome/template.js.hbs /usr/share/kibana/src/legacy/ui/ui_render/bootstrap/template.js.hbs
cp -f /tmp/custom_welcome/light_theme.style.css /usr/share/kibana/optimize/bundles/light_theme.style.css
cp -f /tmp/custom_welcome/*svg /usr/share/kibana/optimize/bundles/
cp -f /tmp/custom_welcome/light_theme.style.css /usr/share/kibana/src/core/server/core_app/assets/legacy_light_theme.css
cp -f /tmp/custom_welcome/*svg /usr/share/kibana/src/core/server/core_app/assets/
fi

64 changes: 64 additions & 0 deletions kibana/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Wazuh Docker Copyright (C) 2021 Wazuh Inc. (License GPLv2)
FROM docker.elastic.co/kibana/kibana:7.10.2
USER kibana
ARG ELASTIC_VERSION=7.10.2
ARG WAZUH_VERSION=4.1.0
ARG WAZUH_APP_VERSION="${WAZUH_VERSION}_${ELASTIC_VERSION}"

WORKDIR /usr/share/kibana
RUN ./bin/kibana-plugin install https://packages.wazuh.com/4.x/ui/kibana/wazuh_kibana-${WAZUH_APP_VERSION}-1.zip

ENV PATTERN="" \
CHECKS_PATTERN="" \
CHECKS_TEMPLATE="" \
CHECKS_API="" \
CHECKS_SETUP="" \
EXTENSIONS_PCI="" \
EXTENSIONS_GDPR="" \
EXTENSIONS_HIPAA="" \
EXTENSIONS_NIST="" \
EXTENSIONS_TSC="" \
EXTENSIONS_AUDIT="" \
EXTENSIONS_OSCAP="" \
EXTENSIONS_CISCAT="" \
EXTENSIONS_AWS="" \
EXTENSIONS_GCP="" \
EXTENSIONS_VIRUSTOTAL="" \
EXTENSIONS_OSQUERY="" \
EXTENSIONS_DOCKER="" \
APP_TIMEOUT="" \
API_SELECTOR="" \
IP_SELECTOR="" \
IP_IGNORE="" \
WAZUH_MONITORING_ENABLED="" \
WAZUH_MONITORING_FREQUENCY="" \
WAZUH_MONITORING_SHARDS="" \
WAZUH_MONITORING_REPLICAS="" \
ADMIN_PRIVILEGES="" \
XPACK_CANVAS="true" \
XPACK_LOGS="true" \
XPACK_INFRA="true" \
XPACK_ML="true" \
XPACK_DEVTOOLS="true" \
XPACK_MONITORING="true" \
XPACK_APM="true"

WORKDIR /
USER kibana

COPY --chown=kibana:kibana config/entrypoint.sh ./entrypoint.sh
RUN chmod 755 ./entrypoint.sh

RUN printf "\nserver.defaultRoute: /app/wazuh\n" >> /usr/share/kibana/config/kibana.yml

COPY --chown=kibana:kibana ./config/wazuh.yml /usr/share/kibana/data/wazuh/config/wazuh.yml
COPY --chown=kibana:kibana ./config/wazuh_app_config.sh ./
RUN chmod +x ./wazuh_app_config.sh

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

ENTRYPOINT ./entrypoint.sh
60 changes: 60 additions & 0 deletions kibana/config/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash
# Wazuh Docker Copyright (C) 2021 Wazuh Inc. (License GPLv2)

set -e

##############################################################################
# Waiting for elasticsearch
##############################################################################

if [ "x${ELASTICSEARCH_URL}" = "x" ]; then
export el_url="http://elasticsearch:9200"
else
export el_url="${ELASTICSEARCH_URL}"
fi

if [[ ${ENABLED_SECURITY} == "false" || "x${ELASTICSEARCH_USERNAME}" = "x" || "x${ELASTICSEARCH_PASSWORD}" = "x" ]]; then
export auth=""
else
export auth="--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} -k"
fi

until curl -XGET $el_url ${auth}; do
>&2 echo "Elastic is unavailable - sleeping"
sleep 5
done

sleep 2

>&2 echo "Elasticsearch is up."


##############################################################################
# Waiting for wazuh alerts template
##############################################################################

strlen=0

while [[ $strlen -eq 0 ]]
do
template=$(curl ${auth} $el_url/_cat/templates/wazuh -s)
strlen=${#template}
>&2 echo "Wazuh alerts template not loaded - sleeping."
sleep 2
done

sleep 2

>&2 echo "Wazuh alerts template is loaded."

./xpack_config.sh

./wazuh_app_config.sh

sleep 5

./kibana_settings.sh &

sleep 2

/usr/local/bin/kibana-docker
Loading

0 comments on commit b36f24a

Please sign in to comment.