diff --git a/.github/actions/upgrade-indexer/common.sh b/.github/actions/upgrade-indexer/common.sh index 78f27904f3..e9be978e93 100644 --- a/.github/actions/upgrade-indexer/common.sh +++ b/.github/actions/upgrade-indexer/common.sh @@ -78,7 +78,7 @@ function read_files() { # Change only the old files if [ "${2}" == "old" ]; then - echo "# Adding a new line to force changed checksum" >> ${f} + echo "# Adding a new line to force changed checksum" >> ${file} echo "Changed file." fi checksum=`md5sum ${file} | cut -d " " -f1` diff --git a/CHANGELOG.md b/CHANGELOG.md index 1811e84b2e..052ab6e62e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file. ## [4.8.0] - https://github.com/wazuh/wazuh-packages/releases/tag/v4.8.0 +## [4.7.1] + +- https://github.com/wazuh/wazuh-packages/releases/tag/v4.7.1 ## [v4.7.0] diff --git a/README.md b/README.md index e959aa9cf3..dcae8bd2db 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,8 @@ The following table shows the references for the versions of each component. |-----------------|-----------------------| | 4.3.x | 1.2.0 | | 4.4.0 | 2.4.1 | -| 4.4.1 - 4.5.2 | 2.6.0 | -| 4.6.0 - | 2.8.0 | +| 4.4.1 - 4.5.x | 2.6.0 | +| 4.6.0 - current | 2.8.0 | ### Wazuh indexer @@ -45,8 +45,8 @@ The following table shows the references for the versions of each component. |-----------------|-----------------------| | 4.3.x | 1.2.4 | | 4.4.0 | 2.4.1 | -| 4.4.1 - 4.5.2 | 2.6.0 | -| 4.6.0 - | 2.8.0 | +| 4.4.1 - 4.5.x | 2.6.0 | +| 4.6.0 - current | 2.8.0 | ## Contribute diff --git a/aix/SPECS/wazuh-agent-aix.spec b/aix/SPECS/wazuh-agent-aix.spec index b27280c768..85b2edb69f 100644 --- a/aix/SPECS/wazuh-agent-aix.spec +++ b/aix/SPECS/wazuh-agent-aix.spec @@ -292,6 +292,8 @@ rm -fr %{buildroot} %changelog * Fri Dec 15 2023 support - 4.8.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html +* Tue Nov 14 2023 support - 4.7.1 +- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html * Sat Oct 28 2023 support - 4.7.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html * Mon Sep 04 2023 support - 4.6.0 diff --git a/debs/SPECS/wazuh-agent/debian/changelog b/debs/SPECS/wazuh-agent/debian/changelog index c0118d0fa1..1ff8b03805 100644 --- a/debs/SPECS/wazuh-agent/debian/changelog +++ b/debs/SPECS/wazuh-agent/debian/changelog @@ -3,6 +3,11 @@ wazuh-agent (4.8.0-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html -- Wazuh, Inc Fri, 15 Dec 2023 00:00:00 +0000 +wazuh-agent (4.7.1-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html + + -- Wazuh, Inc Tue, 14 Nov 2023 00:00:00 +0000 wazuh-agent (4.7.0-RELEASE) stable; urgency=low diff --git a/debs/SPECS/wazuh-manager/debian/changelog b/debs/SPECS/wazuh-manager/debian/changelog index bf5abe533c..82cbff0b46 100644 --- a/debs/SPECS/wazuh-manager/debian/changelog +++ b/debs/SPECS/wazuh-manager/debian/changelog @@ -3,6 +3,11 @@ wazuh-manager (4.8.0-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html -- Wazuh, Inc Fri, 15 Dec 2023 00:00:00 +0000 +wazuh-manager (4.7.1-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html + + -- Wazuh, Inc Tue, 14 Nov 2023 00:00:00 +0000 wazuh-manager (4.7.0-RELEASE) stable; urgency=low diff --git a/macos/specs/wazuh-agent-intel64.pkgproj b/macos/specs/wazuh-agent-intel64.pkgproj index 3a7a3584da..50a7d2aec6 100644 --- a/macos/specs/wazuh-agent-intel64.pkgproj +++ b/macos/specs/wazuh-agent-intel64.pkgproj @@ -812,7 +812,7 @@ USE_HFS+_COMPRESSION VERSION - 4.6.0-1 + 4.8.0-1 TYPE 0 diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index aa5bf38bf9..f3f0f1ebe4 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -624,6 +624,8 @@ rm -fr %{buildroot} %changelog * Fri Dec 15 2023 support - 4.8.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html +* Tue Nov 14 2023 support - 4.7.1 +- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html * Tue Nov 07 2023 support - 4.7.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html * Mon Oct 16 2023 support - 4.6.0 diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 073f00c215..a86a4ac708 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -847,6 +847,8 @@ rm -fr %{buildroot} %changelog * Fri Dec 15 2023 support - 4.8.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html +* Tue Nov 14 2023 support - 4.7.1 +- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html * Tue Nov 07 2023 support - 4.7.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html * Mon Oct 16 2023 support - 4.6.0 diff --git a/stack/dashboard/deb/build_package.sh b/stack/dashboard/deb/build_package.sh index e75e9aa1d1..7e4f5c6d20 100755 --- a/stack/dashboard/deb/build_package.sh +++ b/stack/dashboard/deb/build_package.sh @@ -58,6 +58,17 @@ build_deb() { base_cmd+="--app-url ${url}" fi ../base/generate_base.sh -s ${outdir} -r ${revision} ${base_cmd} + else + if [ "${reference}" ];then + version=$(curl -sL https://raw.githubusercontent.com/wazuh/wazuh-packages/${reference}/VERSION | cat) + else + version=$(cat ${current_path}/../../../VERSION) + fi + basefile="${outdir}/wazuh-dashboard-base-${version}-${revision}-linux-x64.tar.xz" + if ! test -f "${basefile}"; then + echo "Did not find expected Wazuh dashboard base file: ${basefile} in output path. Exiting..." + exit 1 + fi fi # Build the Docker image diff --git a/stack/dashboard/deb/debian/changelog b/stack/dashboard/deb/debian/changelog index e4752099fc..9f1bd89771 100644 --- a/stack/dashboard/deb/debian/changelog +++ b/stack/dashboard/deb/debian/changelog @@ -4,6 +4,12 @@ wazuh-dashboard (4.8.0-RELEASE) stable; urgency=low -- Wazuh, Inc Fri, 15 Dec 2023 00:00:00 +0000 +wazuh-dashboard (4.7.1-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html + + -- Wazuh, Inc Tue, 14 Nov 2023 00:00:00 +0000 + wazuh-dashboard (4.7.0-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html diff --git a/stack/dashboard/rpm/build_package.sh b/stack/dashboard/rpm/build_package.sh index 06d48f526b..b56e325884 100755 --- a/stack/dashboard/rpm/build_package.sh +++ b/stack/dashboard/rpm/build_package.sh @@ -58,6 +58,17 @@ build_rpm() { base_cmd+="--app-url ${url}" fi ../base/generate_base.sh -s ${outdir} -r ${revision} ${base_cmd} + else + if [ "${reference}" ];then + version=$(curl -sL https://raw.githubusercontent.com/wazuh/wazuh-packages/${reference}/VERSION | cat) + else + version=$(cat ${current_path}/../../../VERSION) + fi + basefile="${outdir}/wazuh-dashboard-base-${version}-${revision}-linux-x64.tar.xz" + if ! test -f "${basefile}"; then + echo "Did not find expected Wazuh dndexer base file: ${basefile} in output path. Exiting..." + exit 1 + fi fi # Build the Docker image diff --git a/stack/dashboard/rpm/wazuh-dashboard.spec b/stack/dashboard/rpm/wazuh-dashboard.spec index c43ef675b2..bbe9b47af9 100644 --- a/stack/dashboard/rpm/wazuh-dashboard.spec +++ b/stack/dashboard/rpm/wazuh-dashboard.spec @@ -410,6 +410,8 @@ rm -fr %{buildroot} %changelog * Fri Dec 15 2023 support - 4.8.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html +* Tue Nov 14 2023 support - 4.7.1 +- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html * Tue Nov 07 2023 support - 4.7.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html * Mon Oct 16 2023 support - 4.6.0 diff --git a/stack/indexer/deb/build_package.sh b/stack/indexer/deb/build_package.sh index b5032d0760..d67dac9f7b 100755 --- a/stack/indexer/deb/build_package.sh +++ b/stack/indexer/deb/build_package.sh @@ -40,7 +40,7 @@ build_deb() { # Copy the necessary files cp ${current_path}/builder.sh ${dockerfile_path} - + if [ "${build_base}" == "yes" ];then # Base generation if [ "${future}" == "yes" ];then @@ -50,6 +50,17 @@ build_deb() { base_cmd+="--reference ${reference}" fi ../base/generate_base.sh -s ${outdir} -r ${revision} ${base_cmd} + else + if [ "${reference}" ];then + version=$(curl -sL https://raw.githubusercontent.com/wazuh/wazuh-packages/${reference}/VERSION | cat) + else + version=$(cat ${current_path}/../../../VERSION) + fi + basefile="${outdir}/wazuh-indexer-base-${version}-${revision}-linux-x64.tar.xz" + if ! test -f "${basefile}"; then + echo "Did not find expected Wazuh indexer base file: ${basefile} in output path. Exiting..." + exit 1 + fi fi # Build the Docker image diff --git a/stack/indexer/deb/debian/changelog b/stack/indexer/deb/debian/changelog index 8afe456b84..ce9f3f5fc5 100644 --- a/stack/indexer/deb/debian/changelog +++ b/stack/indexer/deb/debian/changelog @@ -4,6 +4,12 @@ wazuh-indexer (4.8.0-RELEASE) stable; urgency=low -- Wazuh, Inc Fri, 15 Dec 2023 00:00:00 +0000 +wazuh-indexer (4.7.1-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html + + -- Wazuh, Inc Tue, 14 Nov 2023 00:00:00 +0000 + wazuh-indexer (4.7.0-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html diff --git a/stack/indexer/rpm/build_package.sh b/stack/indexer/rpm/build_package.sh index cc8bf9bb7b..b9fcec92a7 100755 --- a/stack/indexer/rpm/build_package.sh +++ b/stack/indexer/rpm/build_package.sh @@ -50,6 +50,17 @@ build_rpm() { base_cmd+="--reference ${reference}" fi ../base/generate_base.sh -s ${outdir} -r ${revision} ${base_cmd} + else + if ! [ "${reference}" ];then + version=$(curl -sL https://raw.githubusercontent.com/wazuh/wazuh-packages/${reference}/VERSION | cat) + else + version=$(cat ${current_path}/../../../VERSION) + fi + basefile="${outdir}/wazuh-indexer-base-${version}-${revision}-linux-x64.tar.xz" + if ! test -f "${basefile}"; then + echo "Did not find expected Wazuh indexer base file: ${basefile} in output path. Exiting..." + exit 1 + fi fi # Build the Docker image diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 1f7fa3964a..729de2a400 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -1446,6 +1446,8 @@ rm -fr %{buildroot} %changelog * Fri Dec 15 2023 support - 4.8.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html +* Tue Nov 14 2023 support - 4.7.1 +- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html * Tue Nov 07 2023 support - 4.7.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html * Mon Oct 16 2023 support - 4.6.0 diff --git a/tests/unattended/install/test_unattended.py b/tests/unattended/install/test_unattended.py index b803760b96..80e9c4e3e5 100644 --- a/tests/unattended/install/test_unattended.py +++ b/tests/unattended/install/test_unattended.py @@ -183,11 +183,11 @@ def test_check_filebeat_process(): @pytest.mark.indexer def test_check_indexer_process(): - assert check_call("ps -xa | grep \"/usr/share/wazuh-indexer/jdk/bin/java\" | grep -v grep | cut -d \" \" -f15", shell=True) != "" + assert check_call("ps -xa | grep wazuh-indexer | grep -v grep | cut -d \" \" -f15", shell=True) != "" @pytest.mark.dashboard def test_check_dashboard_process(): - assert check_call("ps -xa | grep \"/usr/share/wazuh-dashboard/bin/../node/bin/node\" | grep -v grep", shell=True) != "" + assert check_call("ps -xa | grep wazuh-dashboard | grep -v grep", shell=True) != "" @pytest.mark.indexer def test_check_indexer_cluster_status_not_red(): diff --git a/unattended_installer/cert_tool/certMain.sh b/unattended_installer/cert_tool/certMain.sh index f10d5a5ac0..62186cb039 100644 --- a/unattended_installer/cert_tool/certMain.sh +++ b/unattended_installer/cert_tool/certMain.sh @@ -20,7 +20,7 @@ function getHelp() { echo -e " Creates the admin certificates, add root-ca.pem and root-ca.key." echo -e "" echo -e " -A, --all " - echo -e " Creates Wazuh server, Wazuh indexer, Wazuh dashboard, and admin certificates. Add a root-ca.pem and root-ca.key or leave it empty so a new one will be created." + echo -e " Creates certificates specified in config.yml and admin certificates. Add a root-ca.pem and root-ca.key or leave it empty so a new one will be created." echo -e "" echo -e " -ca, --root-ca-certificates" echo -e " Creates the root-ca certificates." @@ -186,26 +186,21 @@ function main() { fi if [[ -n "${all}" ]]; then - if [[ ${#indexer_node_names[@]} -gt 0 ]] && [[ ${#server_node_names[@]} -gt 0 ]] && [[ ${#dashboard_node_names[@]} -gt 0 ]]; then - cert_checkRootCA - cert_generateAdmincertificate - common_logger "Admin certificates created." - if cert_generateIndexercertificates; then - common_logger "Wazuh indexer certificates created." - fi - if cert_generateFilebeatcertificates; then - common_logger "Wazuh server certificates created." - fi - if cert_generateDashboardcertificates; then - common_logger "Wazuh dashboard certificates created." - fi - cert_cleanFiles - cert_setpermisions - eval "mv ${cert_tmp_path} ${base_path}/wazuh-certificates ${debug}" - else - common_logger -e "You must specify at least one indexer, one server and one dashboard node." - exit 1 + cert_checkRootCA + cert_generateAdmincertificate + common_logger "Admin certificates created." + if cert_generateIndexercertificates; then + common_logger "Wazuh indexer certificates created." + fi + if cert_generateFilebeatcertificates; then + common_logger "Wazuh server certificates created." fi + if cert_generateDashboardcertificates; then + common_logger "Wazuh dashboard certificates created." + fi + cert_cleanFiles + cert_setpermisions + eval "mv ${cert_tmp_path} ${base_path}/wazuh-certificates ${debug}" fi if [[ -n "${ca}" ]]; then diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index a52626c81c..40174ddd0a 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -10,6 +10,8 @@ function dashboard_changePort() { chosen_port="$1" http_port="${chosen_port}" + wazuh_dashboard_ports=( "${http_port}" ) + wazuh_aio_ports=(9200 9300 1514 1515 1516 55000 "${http_port}") sed -i 's/server\.port: [0-9]\+$/server.port: '"${chosen_port}"'/' "$0" common_logger "Wazuh web interface port will be ${chosen_port}." diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 2c93cb60dd..a6cc717ed3 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -283,6 +283,8 @@ function installCommon_checkChromium() { if (! yum list installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\\.) && (! yum list installed 2>/dev/null | grep -q -E ^"chromium"\\.); then if [ "${DIST_NAME}" == "amzn" ]; then installCommon_installChrome + elif [[ "${DIST_NAME}" == "centos" ]] && [[ "${DIST_VER}" == "7" ]]; then + installCommon_installChrome else dashboard_dependencies=(chromium) fi diff --git a/unattended_installer/install_functions/installVariables.sh b/unattended_installer/install_functions/installVariables.sh index 21a8437bdd..afb97f013a 100644 --- a/unattended_installer/install_functions/installVariables.sh +++ b/unattended_installer/install_functions/installVariables.sh @@ -50,7 +50,7 @@ adminUser="wazuh" adminPassword="wazuh" http_port=443 -readonly wazuh_aio_ports=( 9200 9300 1514 1515 1516 55000 "${http_port}") +wazuh_aio_ports=( 9200 9300 1514 1515 1516 55000 "${http_port}") readonly wazuh_indexer_ports=( 9200 9300 ) readonly wazuh_manager_ports=( 1514 1515 1516 55000 ) -readonly wazuh_dashboard_port="${http_port}" +wazuh_dashboard_port="${http_port}" diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index f60cab47f3..d68059de80 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -179,7 +179,9 @@ function passwords_createBackUp() { fi common_logger -d "Creating password backup." - eval "mkdir /etc/wazuh-indexer/backup ${debug}" + if [ ! -d "/etc/wazuh-indexer/backup" ]; then + eval "mkdir /etc/wazuh-indexer/backup ${debug}" + fi eval "JAVA_HOME=/usr/share/wazuh-indexer/jdk/ OPENSEARCH_CONF_DIR=/etc/wazuh-indexer /usr/share/wazuh-indexer/plugins/opensearch-security/tools/securityadmin.sh -backup /etc/wazuh-indexer/backup -icl -p 9200 -nhnv -cacert ${capem} -cert ${adminpem} -key ${adminkey} -h ${IP} ${debug}" if [ "${PIPESTATUS[0]}" != 0 ]; then common_logger -e "The backup could not be created" @@ -579,6 +581,7 @@ function passwords_runSecurityAdmin() { common_logger -e "Could not load the changes." exit 1; fi + eval "cp /etc/wazuh-indexer/backup/internal_users.yml /etc/wazuh-indexer/opensearch-security/internal_users.yml" eval "rm -rf /etc/wazuh-indexer/backup/ ${debug}" if [[ -n "${nuser}" ]] && [[ -n ${autopass} ]]; then diff --git a/windows/generate_wazuh_msi.ps1 b/windows/generate_wazuh_msi.ps1 index 08cffc4a48..8ddcf569e4 100644 --- a/windows/generate_wazuh_msi.ps1 +++ b/windows/generate_wazuh_msi.ps1 @@ -83,6 +83,7 @@ function BuildWazuhMsi(){ & $SIGNTOOL_EXE sign /a /tr http://timestamp.digicert.com /fd SHA256 /td SHA256 "..\shared_modules\dbsync\build\bin\dbsync.dll" & $SIGNTOOL_EXE sign /a /tr http://timestamp.digicert.com /fd SHA256 /td SHA256 "..\shared_modules\rsync\build\bin\rsync.dll" & $SIGNTOOL_EXE sign /a /tr http://timestamp.digicert.com /fd SHA256 /td SHA256 "..\wazuh_modules\syscollector\build\bin\syscollector.dll" + & $SIGNTOOL_EXE sign /a /tr http://timestamp.digicert.com /fd SHA256 /td SHA256 "..\syscheckd\build\bin\libfimdb.dll" } Write-Host "Building MSI installer..." diff --git a/wpk/run.sh b/wpk/run.sh index 6db1a0e3e3..5b3ec89150 100755 --- a/wpk/run.sh +++ b/wpk/run.sh @@ -222,7 +222,11 @@ clean() { rm -rf src/{addagent,analysisd,client-agent,config,error_messages,external/*} rm -rf src/{headers,logcollector,monitord,os_auth,os_crypto,os_csyslogd} rm -rf src/{os_dbd,os_execd,os_integrator,os_maild,os_net,os_regex,os_xml,os_zlib} - rm -rf src/{remoted,reportd,shared,syscheckd,unit_tests,wazuh_db} + rm -rf src/{remoted,reportd,shared,unit_tests,wazuh_db} + + # Clean syscheckd folder + find src/syscheckd -type f -not -name "wazuh-syscheckd" -not -name "libfimdb.dylib" -not -name "libfimdb.so" -delete + if [[ "${BUILD_TARGET}" != "winagent" ]]; then rm -rf src/win32