Skip to content

Commit

Permalink
Merge pull request #2511 from wazuh/merge-4.6.0-into-4.7.0
Browse files Browse the repository at this point in the history
Merge 4.6.0 into 4.7.0
  • Loading branch information
Dwordcito authored Oct 10, 2023
2 parents cca8f44 + e20ee68 commit c9d5a07
Show file tree
Hide file tree
Showing 21 changed files with 103 additions and 34 deletions.
4 changes: 2 additions & 2 deletions aix/SPECS/wazuh-agent-aix.spec
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ rm -fr %{buildroot}
%changelog
* Sat Oct 28 2023 support <info@wazuh.com> - 4.7.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html
* Mon Sep 04 2023 support <info@wazuh.com> - 4.6.0
* Tue Oct 24 2023 support <info@wazuh.com> - 4.6.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html
* Wed Sep 06 2023 support <info@wazuh.com> - 4.5.3
* Tue Oct 10 2023 support <info@wazuh.com> - 4.5.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html
* Thu Aug 31 2023 support <info@wazuh.com> - 4.5.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-2.html
Expand Down
4 changes: 2 additions & 2 deletions debs/SPECS/wazuh-agent/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ wazuh-agent (4.6.0-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html

-- Wazuh, Inc <info@wazuh.com> Mon, 16 Oct 2023 00:00:00 +0000
-- Wazuh, Inc <info@wazuh.com> Tue, 24 Oct 2023 00:00:00 +0000

wazuh-agent (4.5.3-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html

-- Wazuh, Inc <info@wazuh.com> Wed, 06 Sep 2023 00:00:00 +0000
-- Wazuh, Inc <info@wazuh.com> Tue, 10 Oct 2023 00:00:00 +0000

wazuh-agent (4.5.2-RELEASE) stable; urgency=low

Expand Down
2 changes: 1 addition & 1 deletion debs/SPECS/wazuh-agent/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This work was packaged for Debian by:

Wazuh, Inc <info@wazuh.com> on Tue, 07 Nov 2023 00:00:00 +0000
Wazuh, Inc <info@wazuh.com> on Tue, 24 Oct 2023 00:00:00 +0000

It was downloaded from:

Expand Down
4 changes: 2 additions & 2 deletions debs/SPECS/wazuh-manager/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ wazuh-manager (4.6.0-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html

-- Wazuh, Inc <info@wazuh.com> Mon, 16 Oct 2023 00:00:00 +0000
-- Wazuh, Inc <info@wazuh.com> Tue, 24 Oct 2023 00:00:00 +0000

wazuh-manager (4.5.3-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html

-- Wazuh, Inc <info@wazuh.com> Wed, 06 Sep 2023 00:00:00 +0000
-- Wazuh, Inc <info@wazuh.com> Tue, 10 Oct 2023 00:00:00 +0000

wazuh-manager (4.5.2-RELEASE) stable; urgency=low

Expand Down
2 changes: 1 addition & 1 deletion debs/SPECS/wazuh-manager/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This work was packaged for Debian by:

Wazuh, Inc <info@wazuh.com> on Tue, 07 Nov 2023 00:00:00 +0000
Wazuh, Inc <info@wazuh.com> on Tue, 24 Oct 2023 00:00:00 +0000

It was downloaded from:

Expand Down
4 changes: 2 additions & 2 deletions rpms/SPECS/wazuh-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,9 @@ rm -fr %{buildroot}
%changelog
* Tue Nov 07 2023 support <info@wazuh.com> - 4.7.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html
* Mon Oct 16 2023 support <info@wazuh.com> - 4.6.0
* Tue Oct 24 2023 support <info@wazuh.com> - 4.6.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html
* Wed Sep 06 2023 support <info@wazuh.com> - 4.5.3
* Tue Oct 10 2023 support <info@wazuh.com> - 4.5.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html
* Thu Aug 31 2023 support <info@wazuh.com> - 4.5.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-2.html
Expand Down
4 changes: 2 additions & 2 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,9 @@ rm -fr %{buildroot}
%changelog
* Tue Nov 07 2023 support <info@wazuh.com> - 4.7.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html
* Mon Oct 16 2023 support <info@wazuh.com> - 4.6.0
* Tue Oct 24 2023 support <info@wazuh.com> - 4.6.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html
* Wed Sep 06 2023 support <info@wazuh.com> - 4.5.3
* Tue Oct 10 2023 support <info@wazuh.com> - 4.5.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html
* Thu Aug 31 2023 support <info@wazuh.com> - 4.5.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-2.html
Expand Down
2 changes: 1 addition & 1 deletion solaris/solaris10/pkginfo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARCH="i386"
CLASSES="none"
CATEGORY="system"
VENDOR="Wazuh, Inc <info@wazuh.com>"
PSTAMP="07Nov2023"
PSTAMP="24Oct2023"
EMAIL="info@wazuh.com"
ISTATES="S s 1 2 3"
RSTATES="S s 1 2 3"
Expand Down
2 changes: 1 addition & 1 deletion stack/dashboard/base/files/etc/opensearch_dashboards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ opensearch.hosts: https://localhost:9200
opensearch.ssl.verificationMode: certificate
#opensearch.username:
#opensearch.password:
opensearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
opensearch.requestHeadersAllowlist: ["securitytenant","Authorization"]
opensearch_security.multitenancy.enabled: false
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
server.ssl.enabled: true
Expand Down
4 changes: 2 additions & 2 deletions stack/dashboard/deb/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ wazuh-dashboard (4.6.0-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html

-- Wazuh, Inc <info@wazuh.com> Mon, 16 Oct 2023 00:00:00 +0000
-- Wazuh, Inc <info@wazuh.com> Tue, 24 Oct 2023 00:00:00 +0000

wazuh-dashboard (4.5.3-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html

-- Wazuh, Inc <info@wazuh.com> Wed, 06 Sep 2023 00:00:00 +0000
-- Wazuh, Inc <info@wazuh.com> Tue, 10 Oct 2023 00:00:00 +0000

wazuh-dashboard (4.5.2-RELEASE) stable; urgency=low

Expand Down
4 changes: 2 additions & 2 deletions stack/dashboard/rpm/wazuh-dashboard.spec
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ rm -fr %{buildroot}
%changelog
* Tue Nov 07 2023 support <info@wazuh.com> - 4.7.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html
* Mon Oct 16 2023 support <info@wazuh.com> - 4.6.0
* Tue Oct 24 2023 support <info@wazuh.com> - 4.6.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html
* Wed Sep 06 2023 support <info@wazuh.com> - 4.5.3
* Tue Oct 10 2023 support <info@wazuh.com> - 4.5.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html
* Thu Aug 31 2023 support <info@wazuh.com> - 4.5.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-2.html
Expand Down
4 changes: 2 additions & 2 deletions stack/indexer/deb/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ wazuh-indexer (4.6.0-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html

-- Wazuh, Inc <info@wazuh.com> Mon, 16 Oct 2023 00:00:00 +0000
-- Wazuh, Inc <info@wazuh.com> Tue, 24 Oct 2023 00:00:00 +0000

wazuh-indexer (4.5.3-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html

-- Wazuh, Inc <info@wazuh.com> Wed, 06 Sep 2023 00:00:00 +0000
-- Wazuh, Inc <info@wazuh.com> Tue, 10 Oct 2023 00:00:00 +0000

wazuh-indexer (4.5.2-RELEASE) stable; urgency=low

Expand Down
2 changes: 1 addition & 1 deletion stack/indexer/deb/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This work was packaged for Debian by:

Wazuh, Inc <info@wazuh.com> on Tue, 07 Nov 2023 00:00:00 +0000
Wazuh, Inc <info@wazuh.com> Tue, 24 Oct 2023 00:00:00 +0000

It was downloaded from:

Expand Down
4 changes: 2 additions & 2 deletions stack/indexer/rpm/wazuh-indexer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -1446,9 +1446,9 @@ rm -fr %{buildroot}
%changelog
* Tue Nov 07 2023 support <info@wazuh.com> - 4.7.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html
* Mon Oct 16 2023 support <info@wazuh.com> - 4.6.0
* Tue Oct 24 2023 support <info@wazuh.com> - 4.6.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html
* Wed Sep 06 2023 support <info@wazuh.com> - 4.5.3
* Tue Oct 10 2023 support <info@wazuh.com> - 4.5.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html
* Thu Aug 31 2023 support <info@wazuh.com> - 4.5.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-2.html
Expand Down
2 changes: 1 addition & 1 deletion unattended_installer/config/dashboard/dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ server.port: 443
opensearch.ssl.verificationMode: certificate
# opensearch.username: kibanaserver
# opensearch.password: kibanaserver
opensearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
opensearch.requestHeadersAllowlist: ["securitytenant","Authorization"]
opensearch_security.multitenancy.enabled: false
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
server.ssl.enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ opensearch.hosts: https://localhost:9200
opensearch.ssl.verificationMode: certificate
# opensearch.username: kibanaserver
# opensearch.password: kibanaserver
opensearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
opensearch.requestHeadersAllowlist: ["securitytenant","Authorization"]
opensearch_security.multitenancy.enabled: false
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
server.ssl.enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ server.port: 443
opensearch.ssl.verificationMode: certificate
# opensearch.username: kibanaserver
# opensearch.password: kibanaserver
opensearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
opensearch.requestHeadersAllowlist: ["securitytenant","Authorization"]
opensearch_security.multitenancy.enabled: false
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
server.ssl.enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server.port: 443
opensearch.ssl.verificationMode: certificate
# opensearch.username: kibanaserver
# opensearch.password: kibanaserver
opensearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
opensearch.requestHeadersAllowlist: ["securitytenant","Authorization"]
opensearch_security.multitenancy.enabled: false
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
server.ssl.enabled: true
Expand Down
5 changes: 5 additions & 0 deletions unattended_installer/install_functions/dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ function dashboard_installReportDependencies() {
if [ "${sys_type}" == "yum" ]; then
dashboard_dependencies+=( nss xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc fontconfig freetype )
installCommon_yumInstallList "${dashboard_dependencies[@]}"

# In RHEL cases, remove the CentOS repositories configuration
if [ "${centos_repos_configured}" == 1 ]; then
installCommon_removeCentOSrepositories
fi

elif [ "${sys_type}" == "apt-get" ]; then
dashboard_dependencies+=( libnss3-dev fonts-liberation libfontconfig1 )
Expand Down
73 changes: 68 additions & 5 deletions unattended_installer/install_functions/installCommon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@
# License (version 2) as published by the FSF - Free Software
# Foundation.

function installCommon_addCentOSRepository() {

local repo_name="$1"
local repo_description="$2"
local repo_baseurl="$3"

echo "[$repo_name]" >> "${centos_repo}"
echo "name=${repo_description}" >> "${centos_repo}"
echo "baseurl=${repo_baseurl}" >> "${centos_repo}"
echo 'gpgcheck=1' >> "${centos_repo}"
echo 'enabled=1' >> "${centos_repo}"
echo "gpgkey=file://${centos_key}" >> "${centos_repo}"
echo '' >> "${centos_repo}"

}

function installCommon_cleanExit() {

rollback_conf=""
Expand Down Expand Up @@ -81,18 +97,20 @@ function installCommon_aptInstall() {
else
installer=${package}
fi
command="DEBIAN_FRONTEND=noninteractive apt-get install ${installer} -y -q ${debug}"
command="DEBIAN_FRONTEND=noninteractive apt-get install ${installer} -y -q"
seconds=30
eval "${command}"
apt_output=$(eval "${command} 2>&1")
install_result="${PIPESTATUS[0]}"
eval "echo \${apt_output} ${debug}"
eval "tail -n 2 ${logfile} | grep -q 'Could not get lock'"
grep_result="${PIPESTATUS[0]}"
while [ "${grep_result}" -eq 0 ] && [ "${attempt}" -lt 10 ]; do
attempt=$((attempt+1))
common_logger "An external process is using APT. This process has to end to proceed with the Wazuh installation. Next retry in ${seconds} seconds (${attempt}/10)"
sleep "${seconds}"
eval "${command}"
apt_output=$(eval "${command} 2>&1")
install_result="${PIPESTATUS[0]}"
eval "echo \${apt_output} ${debug}"
eval "tail -n 2 ${logfile} | grep -q 'Could not get lock'"
grep_result="${PIPESTATUS[0]}"
done
Expand Down Expand Up @@ -282,6 +300,9 @@ function installCommon_checkChromium() {
installCommon_installChrome
elif [[ "${DIST_NAME}" == "centos" ]] && [[ "${DIST_VER}" == "7" ]]; then
installCommon_installChrome
elif [[ "${DIST_NAME}" == "rhel" ]] && [[ "${DIST_VER}" == "8" || "${DIST_VER}" == "9" ]]; then
installCommon_configureCentOSRepositories
dashboard_dependencies=(chromium)
else
dashboard_dependencies=(chromium)
fi
Expand All @@ -301,6 +322,35 @@ function installCommon_checkChromium() {

}

# Adds the CentOS repository to install the dashboard dependencies.
function installCommon_configureCentOSRepositories() {

centos_repos_configured=1
centos_key="/etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial"
eval "common_curl -sLo ${centos_key} 'https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official' --max-time 300 --retry 5 --retry-delay 5 --fail"

if [ ! -f "${centos_key}" ]; then
common_logger -w "The CentOS key could not be added. Chromium package skipped."
pdf_warning=1
else
centos_repo="/etc/yum.repos.d/centos.repo"
eval "touch ${centos_repo} ${debug}"
common_logger -d "CentOS repository file created."

if [ "${DIST_VER}" == "9" ]; then
installCommon_addCentOSRepository "appstream" "CentOS Stream \$releasever - AppStream" "https://mirror.stream.centos.org/9-stream/AppStream/\$basearch/os/"
installCommon_addCentOSRepository "baseos" "CentOS Stream \$releasever - BaseOS" "https://mirror.stream.centos.org/9-stream/BaseOS/\$basearch/os/"
elif [ "${DIST_VER}" == "8" ]; then
installCommon_addCentOSRepository "extras" "CentOS Linux \$releasever - Extras" "http://vault.centos.org/centos/\$releasever/extras/\$basearch/os/"
installCommon_addCentOSRepository "baseos" "CentOS Linux \$releasever - BaseOS" "http://vault.centos.org/centos/\$releasever/BaseOS/\$basearch/os/"
installCommon_addCentOSRepository "appstream" "CentOS Linux \$releasever - AppStream" "http://vault.centos.org/centos/\$releasever/AppStream/\$basearch/os/"
fi

common_logger -d "CentOS repositories added."
fi

}

function installCommon_extractConfig() {

if ! tar -tf "${tar_file}" | grep -q wazuh-install-files/config.yml; then
Expand Down Expand Up @@ -525,6 +575,16 @@ function installCommon_restoreWazuhrepo() {

}

function installCommon_removeCentOSrepositories() {

eval "rm -f ${centos_repo} ${debug}"
eval "rm -f ${centos_key} ${debug}"
eval "yum clean all ${debug}"
centos_repos_configured=0
common_logger -d "CentOS repositories and key deleted."

}

function installCommon_rollBack() {

if [ -z "${uninstall}" ]; then
Expand Down Expand Up @@ -700,8 +760,11 @@ function installCommon_yumInstallList(){
common_logger "--- Dependencies ---"
for dep in "${not_installed[@]}"; do
common_logger "Installing $dep."
eval "yum install ${dep} -y ${debug}"
if [ "${PIPESTATUS[0]}" != 0 ]; then
yum_output=$(yum install ${dep} -y 2>&1)
yum_code="${PIPESTATUS[0]}"

eval "echo \${yum_output} ${debug}"
if [ "${yum_code}" != 0 ]; then
installCommon_checkOptionalInstallation
fi
done
Expand Down
5 changes: 3 additions & 2 deletions wpk/common/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM debian:9

RUN apt-get update && \
RUN echo "deb http://archive.debian.org/debian stretch contrib main non-free" > /etc/apt/sources.list && \
echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get -y install --allow-change-held-packages python git curl jq python3 python3-pip libffi-dev && \
pip3 install --upgrade cryptography==2.9.2 awscli

Expand Down

0 comments on commit c9d5a07

Please sign in to comment.