merge 4.8.0 into 4.9.0

This commit is contained in:
vcerenu
2024-05-31 11:00:50 -03:00
13 changed files with 52 additions and 33 deletions

6
.env
View File

@@ -1,6 +1,6 @@
WAZUH_VERSION=4.8.0 WAZUH_VERSION=4.9.0
WAZUH_IMAGE_VERSION=4.8.0 WAZUH_IMAGE_VERSION=4.9.0
WAZUH_TAG_REVISION=1 WAZUH_TAG_REVISION=1
FILEBEAT_TEMPLATE_BRANCH=4.8.0 FILEBEAT_TEMPLATE_BRANCH=4.9.0
WAZUH_FILEBEAT_MODULE=wazuh-filebeat-0.4.tar.gz WAZUH_FILEBEAT_MODULE=wazuh-filebeat-0.4.tar.gz
WAZUH_UI_REVISION=1 WAZUH_UI_REVISION=1

2
.github/.goss.yaml vendored
View File

@@ -56,7 +56,7 @@ package:
wazuh-manager: wazuh-manager:
installed: true installed: true
versions: versions:
- 4.8.0-1 - 4.9.0-1
port: port:
tcp:1514: tcp:1514:
listening: true listening: true

View File

@@ -1,6 +1,21 @@
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## Wazuh Docker v4.9.0
### Added
- Update Wazuh to version [4.9.0](https://github.com/wazuh/wazuh/blob/v4.9.0/CHANGELOG.md#v490)
## Wazuh Docker v4.8.2
### Added
- Update Wazuh to version [4.8.2](https://github.com/wazuh/wazuh/blob/v4.8.2/CHANGELOG.md#v482)
## Wazuh Docker v4.8.1
### Added
- Update Wazuh to version [4.8.1](https://github.com/wazuh/wazuh/blob/v4.8.1/CHANGELOG.md#v481)
## Wazuh Docker v4.8.0 ## Wazuh Docker v4.8.0
### Added ### Added

View File

@@ -8,19 +8,19 @@
In this repository you will find the containers to run: In this repository you will find the containers to run:
* Wazuh manager: it runs the Wazuh manager, Wazuh API and Filebeat OSS * Wazuh manager: it runs the Wazuh manager, Wazuh API and Filebeat OSS
* Wazuh dashboard: provides a web user interface to browse through alerts data and allows you to visualize agents configuration and status. * Wazuh dashboard: provides a web user interface to browse through alert data and allows you to visualize the agents configuration and status.
* Wazuh indexer: Wazuh indexer container (working as a single-node cluster or as a multi-node cluster). **Be aware to increase the `vm.max_map_count` setting, as it's detailed in the [Wazuh documentation](https://documentation.wazuh.com/current/docker/wazuh-container.html#increase-max-map-count-on-your-host-linux).** * Wazuh indexer: Wazuh indexer container (working as a single-node cluster or as a multi-node cluster). **Be aware to increase the `vm.max_map_count` setting, as it's detailed in the [Wazuh documentation](https://documentation.wazuh.com/current/docker/wazuh-container.html#increase-max-map-count-on-your-host-linux).**
The folder `build-docker-images` contains a README explaining how to build the Wazuh images and the necessary assets. The folder `build-docker-images` contains a README explaining how to build the Wazuh images and the necessary assets.
The folder `indexer-certs-creator` contains a README explaining how to create the certificates creator tool and the necessary assets. The folder `indexer-certs-creator` contains a README explaining how to create the certificates creator tool and the necessary assets.
The folder `single-node` contains a README explaining how to run a Wazuh environment with one Wazuh manager, one Wazuh indexer, and one Wazuh dashboard. The folder `single-node` contains a README explaining how to run a Wazuh environment with one Wazuh manager, one Wazuh indexer, and one Wazuh dashboard.
The folder `multi-node` contains a README explaining how to run a Wazuh environment with two Wazuh managers, three Wazuh indexer, and one Wazuh dashboard. The folder `multi-node` contains a README explaining how to run a Wazuh environment with two Wazuh managers, three Wazuh indexers, and one Wazuh dashboard.
## Documentation ## Documentation
* [Wazuh full documentation](http://documentation.wazuh.com) * [Wazuh full documentation](http://documentation.wazuh.com)
* [Wazuh documentation for Docker](https://documentation.wazuh.com/current/docker/index.html) * [Wazuh documentation for Docker](https://documentation.wazuh.com/current/docker/index.html)
* [Docker hub](https://hub.docker.com/u/wazuh) * [Docker Hub](https://hub.docker.com/u/wazuh)
### Setup SSL certificate ### Setup SSL certificate
@@ -38,7 +38,7 @@ Default values are included when available.
``` ```
API_USERNAME="wazuh-wui" # Wazuh API username API_USERNAME="wazuh-wui" # Wazuh API username
API_PASSWORD="MyS3cr37P450r.*-" # Wazuh API password - Must comply with requirements API_PASSWORD="MyS3cr37P450r.*-" # Wazuh API password - Must comply with requirements
# (8+ length, uppercase, lowercase, specials chars) # (8+ length, uppercase, lowercase, special chars)
INDEXER_URL=https://wazuh.indexer:9200 # Wazuh indexer URL INDEXER_URL=https://wazuh.indexer:9200 # Wazuh indexer URL
INDEXER_USERNAME=admin # Wazuh indexer Username INDEXER_USERNAME=admin # Wazuh indexer Username
@@ -53,8 +53,8 @@ SSL_KEY="" # Path of Filebeat SSL Key
``` ```
PATTERN="wazuh-alerts-*" # Default index pattern to use PATTERN="wazuh-alerts-*" # Default index pattern to use
CHECKS_PATTERN=true # Defines which checks must to be consider by the healthcheck CHECKS_PATTERN=true # Defines which checks must be considered by the healthcheck
CHECKS_TEMPLATE=true # step once the Wazuh app starts. Values must to be true or false CHECKS_TEMPLATE=true # step once the Wazuh app starts. Values must be true or false
CHECKS_API=true CHECKS_API=true
CHECKS_SETUP=true CHECKS_SETUP=true
@@ -190,12 +190,15 @@ WAZUH_MONITORING_REPLICAS=0 ##
## Branches ## Branches
* `master` branch contains the latest code, be aware of possible bugs on this branch. * `master` branch contains the latest code, be aware of possible bugs on this branch.
* `stable` branch on correspond to the last Wazuh stable version. * `stable` branch corresponds to the last Wazuh stable version.
## Compatibility Matrix ## Compatibility Matrix
| Wazuh version | ODFE | XPACK | | Wazuh version | ODFE | XPACK |
|---------------|---------|--------| |---------------|---------|--------|
| v4.9.0 | | |
| v4.8.2 | | |
| v4.8.1 | | |
| v4.8.0 | | | | v4.8.0 | | |
| v4.7.5 | | | | v4.7.5 | | |
| v4.7.4 | | | | v4.7.4 | | |
@@ -254,7 +257,7 @@ These Docker containers are based on:
* "deviantony" dockerfiles which can be found at [https://github.com/deviantony/docker-elk](https://github.com/deviantony/docker-elk) * "deviantony" dockerfiles which can be found at [https://github.com/deviantony/docker-elk](https://github.com/deviantony/docker-elk)
* "xetus-oss" dockerfiles, which can be found at [https://github.com/xetus-oss/docker-ossec-server](https://github.com/xetus-oss/docker-ossec-server) * "xetus-oss" dockerfiles, which can be found at [https://github.com/xetus-oss/docker-ossec-server](https://github.com/xetus-oss/docker-ossec-server)
We thank you them and everyone else who has contributed to this project. We thank them and everyone else who has contributed to this project.
## License and copyright ## License and copyright

View File

@@ -1,2 +1,2 @@
WAZUH-DOCKER_VERSION="4.8.0" WAZUH-DOCKER_VERSION="4.9.0"
REVISION="40811" REVISION="40900"

View File

@@ -13,7 +13,7 @@ This script initializes the environment variables needed to build each of the im
The script allows you to build images from other versions of Wazuh, to do this you must use the -v or --version argument: The script allows you to build images from other versions of Wazuh, to do this you must use the -v or --version argument:
``` ```
$ build-docker-images/build-images.sh -v 4.8.0 $ build-docker-images/build-images.sh -v 4.9.0
``` ```
To get all the available script options use the -h or --help option: To get all the available script options use the -h or --help option:
@@ -26,7 +26,7 @@ Usage: build-docker-images/build-images.sh [OPTIONS]
-d, --dev <ref> [Optional] Set the development stage you want to build, example rc1 or beta1, not used by default. -d, --dev <ref> [Optional] Set the development stage you want to build, example rc1 or beta1, not used by default.
-f, --filebeat-module <ref> [Optional] Set Filebeat module version. By default 0.4. -f, --filebeat-module <ref> [Optional] Set Filebeat module version. By default 0.4.
-r, --revision <rev> [Optional] Package revision. By default 1 -r, --revision <rev> [Optional] Package revision. By default 1
-v, --version <ver> [Optional] Set the Wazuh version should be builded. By default, 4.8.0. -v, --version <ver> [Optional] Set the Wazuh version should be builded. By default, 4.9.0.
-h, --help Show this help. -h, --help Show this help.
``` ```

View File

@@ -1,4 +1,4 @@
WAZUH_IMAGE_VERSION=4.8.0 WAZUH_IMAGE_VERSION=4.9.0
WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g') WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g')
WAZUH_TAG_REVISION=1 WAZUH_TAG_REVISION=1
WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '["]tag_name["]:' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '["]tag_name["]:' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g')
@@ -12,7 +12,7 @@ IMAGE_VERSION=${WAZUH_IMAGE_VERSION}
# License (version 2) as published by the FSF - Free Software # License (version 2) as published by the FSF - Free Software
# Foundation. # Foundation.
WAZUH_IMAGE_VERSION="4.8.0" WAZUH_IMAGE_VERSION="4.9.0"
WAZUH_TAG_REVISION="1" WAZUH_TAG_REVISION="1"
WAZUH_DEV_STAGE="" WAZUH_DEV_STAGE=""
FILEBEAT_MODULE_VERSION="0.4" FILEBEAT_MODULE_VERSION="0.4"

View File

@@ -9,8 +9,8 @@ export CONFIG_DIR=${INSTALLATION_DIR}/config
## Variables ## Variables
CERT_TOOL=wazuh-certs-tool.sh CERT_TOOL=wazuh-certs-tool.sh
PACKAGES_URL=https://packages.wazuh.com/4.8/ PACKAGES_URL=https://packages.wazuh.com/4.9/
PACKAGES_DEV_URL=https://packages-dev.wazuh.com/4.8/ PACKAGES_DEV_URL=https://packages-dev.wazuh.com/4.9/
## Check if the cert tool exists in S3 buckets ## Check if the cert tool exists in S3 buckets
CERT_TOOL_PACKAGES=$(curl --silent -I $PACKAGES_URL$CERT_TOOL | grep -E "^HTTP" | awk '{print $2}') CERT_TOOL_PACKAGES=$(curl --silent -I $PACKAGES_URL$CERT_TOOL | grep -E "^HTTP" | awk '{print $2}')

View File

@@ -53,8 +53,8 @@ tar -xf ${INDEXER_FILE}
## Variables ## Variables
CERT_TOOL=wazuh-certs-tool.sh CERT_TOOL=wazuh-certs-tool.sh
PASSWORD_TOOL=wazuh-passwords-tool.sh PASSWORD_TOOL=wazuh-passwords-tool.sh
PACKAGES_URL=https://packages.wazuh.com/4.8/ PACKAGES_URL=https://packages.wazuh.com/4.9/
PACKAGES_DEV_URL=https://packages-dev.wazuh.com/4.8/ PACKAGES_DEV_URL=https://packages-dev.wazuh.com/4.9/
## Check if the cert tool exists in S3 buckets ## Check if the cert tool exists in S3 buckets
CERT_TOOL_PACKAGES=$(curl --silent -I $PACKAGES_URL$CERT_TOOL | grep -E "^HTTP" | awk '{print $2}') CERT_TOOL_PACKAGES=$(curl --silent -I $PACKAGES_URL$CERT_TOOL | grep -E "^HTTP" | awk '{print $2}')

View File

@@ -93,6 +93,7 @@ EOF
if /var/ossec/framework/python/bin/python3 /var/ossec/framework/scripts/create_user.py; then if /var/ossec/framework/python/bin/python3 /var/ossec/framework/scripts/create_user.py; then
# remove json if exit code is 0 # remove json if exit code is 0
rm /var/ossec/api/configuration/admin.json rm /var/ossec/api/configuration/admin.json
rm /var/ossec/framework/scripts/create_user.py
else else
echored "There was an error configuring the API user" echored "There was an error configuring the API user"
# terminate container to avoid unpredictable behavior # terminate container to avoid unpredictable behavior

View File

@@ -8,8 +8,8 @@
## Variables ## Variables
CERT_TOOL=wazuh-certs-tool.sh CERT_TOOL=wazuh-certs-tool.sh
PASSWORD_TOOL=wazuh-passwords-tool.sh PASSWORD_TOOL=wazuh-passwords-tool.sh
PACKAGES_URL=https://packages.wazuh.com/4.8/ PACKAGES_URL=https://packages.wazuh.com/4.9/
PACKAGES_DEV_URL=https://packages-dev.wazuh.com/4.8/ PACKAGES_DEV_URL=https://packages-dev.wazuh.com/4.9/
## Check if the cert tool exists in S3 buckets ## Check if the cert tool exists in S3 buckets
CERT_TOOL_PACKAGES=$(curl --silent -I $PACKAGES_URL$CERT_TOOL | grep -E "^HTTP" | awk '{print $2}') CERT_TOOL_PACKAGES=$(curl --silent -I $PACKAGES_URL$CERT_TOOL | grep -E "^HTTP" | awk '{print $2}')

View File

@@ -3,7 +3,7 @@ version: '3.7'
services: services:
wazuh.master: wazuh.master:
image: wazuh/wazuh-manager:4.8.0 image: wazuh/wazuh-manager:4.9.0
hostname: wazuh.master hostname: wazuh.master
restart: always restart: always
ulimits: ulimits:
@@ -45,7 +45,7 @@ services:
- ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf - ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf
wazuh.worker: wazuh.worker:
image: wazuh/wazuh-manager:4.8.0 image: wazuh/wazuh-manager:4.9.0
hostname: wazuh.worker hostname: wazuh.worker
restart: always restart: always
ulimits: ulimits:
@@ -81,7 +81,7 @@ services:
- ./config/wazuh_cluster/wazuh_worker.conf:/wazuh-config-mount/etc/ossec.conf - ./config/wazuh_cluster/wazuh_worker.conf:/wazuh-config-mount/etc/ossec.conf
wazuh1.indexer: wazuh1.indexer:
image: wazuh/wazuh-indexer:4.8.0 image: wazuh/wazuh-indexer:4.9.0
hostname: wazuh1.indexer hostname: wazuh1.indexer
restart: always restart: always
ports: ports:
@@ -107,7 +107,7 @@ services:
- ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/opensearch-security/internal_users.yml - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/opensearch-security/internal_users.yml
wazuh2.indexer: wazuh2.indexer:
image: wazuh/wazuh-indexer:4.8.0 image: wazuh/wazuh-indexer:4.9.0
hostname: wazuh2.indexer hostname: wazuh2.indexer
restart: always restart: always
environment: environment:
@@ -129,7 +129,7 @@ services:
- ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/opensearch-security/internal_users.yml - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/opensearch-security/internal_users.yml
wazuh3.indexer: wazuh3.indexer:
image: wazuh/wazuh-indexer:4.8.0 image: wazuh/wazuh-indexer:4.9.0
hostname: wazuh3.indexer hostname: wazuh3.indexer
restart: always restart: always
environment: environment:
@@ -151,7 +151,7 @@ services:
- ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/opensearch-security/internal_users.yml - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/opensearch-security/internal_users.yml
wazuh.dashboard: wazuh.dashboard:
image: wazuh/wazuh-dashboard:4.8.0 image: wazuh/wazuh-dashboard:4.9.0
hostname: wazuh.dashboard hostname: wazuh.dashboard
restart: always restart: always
ports: ports:

View File

@@ -3,7 +3,7 @@ version: '3.7'
services: services:
wazuh.manager: wazuh.manager:
image: wazuh/wazuh-manager:4.8.0 image: wazuh/wazuh-manager:4.9.0
hostname: wazuh.manager hostname: wazuh.manager
restart: always restart: always
ulimits: ulimits:
@@ -46,7 +46,7 @@ services:
- ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf - ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf
wazuh.indexer: wazuh.indexer:
image: wazuh/wazuh-indexer:4.8.0 image: wazuh/wazuh-indexer:4.9.0
hostname: wazuh.indexer hostname: wazuh.indexer
restart: always restart: always
ports: ports:
@@ -71,7 +71,7 @@ services:
- ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/opensearch-security/internal_users.yml - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/opensearch-security/internal_users.yml
wazuh.dashboard: wazuh.dashboard:
image: wazuh/wazuh-dashboard:4.8.0 image: wazuh/wazuh-dashboard:4.9.0
hostname: wazuh.dashboard hostname: wazuh.dashboard
restart: always restart: always
ports: ports: