Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.8.2' into enhancement/339-remo…
Browse files Browse the repository at this point in the history
…ve-kibana-references
  • Loading branch information
MARCOSD4 committed Apr 4, 2024
2 parents 2af8112 + c14ce17 commit 466162c
Show file tree
Hide file tree
Showing 69 changed files with 617 additions and 1,008 deletions.
20 changes: 13 additions & 7 deletions .github/actions/offline-installation/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function check_file() {
function check_shards() {

retries=0
until [ "$(curl -s -k -u admin:admin "https://localhost:9200/_template/wazuh?pretty&filter_path=wazuh.settings.index.number_of_shards" | grep "number_of_shards")" ] || [ "${retries}" -eq 5 ]; do
until [ "$(curl -s -k -u admin:admin "https://127.0.0.1:9200/_template/wazuh?pretty&filter_path=wazuh.settings.index.number_of_shards" | grep "number_of_shards")" ] || [ "${retries}" -eq 5 ]; do
sleep 5
retries=$((retries+1))
done
Expand All @@ -53,7 +53,7 @@ function check_shards() {
echo "ERROR: Could not get the number of shards."
exit 1
fi
curl -s -k -u admin:admin "https://localhost:9200/_template/wazuh?pretty&filter_path=wazuh.settings.index.number_of_shards"
curl -s -k -u admin:admin "https://127.0.0.1:9200/_template/wazuh?pretty&filter_path=wazuh.settings.index.number_of_shards"
echo "INFO: Number of shards detected."

}
Expand All @@ -79,13 +79,19 @@ function dashboard_installation() {
/usr/share/wazuh-dashboard/bin/opensearch-dashboards "-c /etc/wazuh-dashboard/opensearch_dashboards.yml" --allow-root > /dev/null 2>&1 &
fi

sleep 10
retries=0
# In this context, 302 HTTP code refers to SSL certificates warning: success.
if [ "$(curl -k -s -I -w "%{http_code}" https://localhost -o /dev/null --fail)" -ne "302" ]; then
until [ "$(curl -k -s -I -w "%{http_code}" https://127.0.0.1 -o /dev/null --fail)" -ne "302" ] || [ "${retries}" -eq 5 ]; do
echo "INFO: Sleeping 10 seconds."
sleep 10
retries=$((retries+1))
done
if [ ${retries} -eq 5 ]; then
echo "ERROR: The Wazuh dashboard installation has failed."
exit 1
else
echo "INFO: The Wazuh dashboard is ready."
fi
echo "INFO: The Wazuh dashboard is ready."

}

Expand Down Expand Up @@ -190,7 +196,7 @@ function indexer_initialize() {
echo "ERROR: The indexer node is not started."
exit 1
fi
/usr/share/wazuh-indexer/bin/indexer-init.sh
/usr/share/wazuh-indexer/bin/indexer-security-init.sh

}

Expand Down Expand Up @@ -226,7 +232,7 @@ function indexer_installation() {

indexer_initialize
sleep 10
eval "curl -s -XGET https://localhost:9200 -u admin:admin -k --fail"
eval "curl -s -XGET https://127.0.0.1:9200 -u admin:admin -k --fail"
if [ "${PIPESTATUS[0]}" != 0 ]; then
echo "ERROR: The Wazuh indexer installation has failed."
exit 1
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/passwords-tool/tests-stack-success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ echo '::endgroup::'

echo '::group:: Change all passwords except Wazuh API ones.'

mapfile -t pass < <(bash wazuh-passwords-tool.sh -a | awk '{ print $NF }' | sed \$d | sed '1d' )
mapfile -t pass < <(bash wazuh-passwords-tool.sh -a | grep 'The password for' | awk '{ print $NF }')
for i in "${!users[@]}"; do
if curl -s -XGET https://localhost:9200/ -u "${users[i]}":"${pass[i]}" -k -w %{http_code} | grep "401"; then
exit 1
Expand All @@ -35,7 +35,7 @@ echo '::group:: Change all passwords.'

wazuh_pass="$(cat wazuh-install-files/wazuh-passwords.txt | awk "/username: 'wazuh'/{getline;print;}" | awk '{ print $2 }' | tr -d \' )"

mapfile -t passall < <(bash wazuh-passwords-tool.sh -a -au wazuh -ap "${wazuh_pass}" | awk '{ print $NF }' | sed \$d )
mapfile -t passall < <(bash wazuh-passwords-tool.sh -a -au wazuh -ap "${wazuh_pass}" | grep 'The password for' | awk '{ print $NF }' )
passindexer=("${passall[@]:0:6}")
passapi=("${passall[@]:(-2)}")

Expand Down Expand Up @@ -63,7 +63,7 @@ echo '::endgroup::'

echo '::group:: Change all passwords except Wazuh API ones using a file.'

mapfile -t passfile < <(bash wazuh-passwords-tool.sh -f wazuh-install-files/wazuh-passwords.txt | awk '{ print $NF }' | sed \$d | sed '1d' )
mapfile -t passfile < <(bash wazuh-passwords-tool.sh -f wazuh-install-files/wazuh-passwords.txt | grep 'The password for' | awk '{ print $NF }' )
for i in "${!users[@]}"; do
if curl -s -XGET https://localhost:9200/ -u "${users[i]}":"${passfile[i]}" -k -w %{http_code} | grep "401"; then
exit 1
Expand All @@ -72,7 +72,7 @@ done
echo '::endgroup::'

echo '::group:: Change all passwords from a file.'
mapfile -t passallf < <(bash wazuh-passwords-tool.sh -f wazuh-install-files/wazuh-passwords.txt -au wazuh -ap BkJt92r*ndzN.CkCYWn?d7i5Z7EaUt63 | awk '{ print $NF }' | sed \$d )
mapfile -t passallf < <(bash wazuh-passwords-tool.sh -f wazuh-install-files/wazuh-passwords.txt -au wazuh -ap BkJt92r*ndzN.CkCYWn?d7i5Z7EaUt63 | grep 'The password for' | awk '{ print $NF }' )
passindexerf=("${passallf[@]:0:6}")
passapif=("${passallf[@]:(-2)}")

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/build-rpm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:

jobs:
Wazuh-agent-rpm-package-build:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -68,8 +70,13 @@ jobs:
if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_agent_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || ((steps.changes.outputs.rpm_images_manager_x86_64 == 'true' || steps.changes.outputs.rpm_images_agent_x86_64 == 'true') && matrix.ARCHITECTURE == 'x86_64')
working-directory: ./rpms
run: |
if [ "X`git ls-remote --heads https://github.com/wazuh/wazuh.git ${BRANCH_NAME}`" != "X" ]; then
W_BRANCH=${BRANCH_NAME}
else
W_BRANCH=${{ env.VERSION }}
fi
REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g; s/\//./g' )
bash generate_rpm_package.sh -b ${{ env.VERSION }} -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r $REVISION
bash generate_rpm_package.sh -b ${W_BRANCH} -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r $REVISION
echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV
- name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ All notable changes to this project will be documented in this file.

- https://github.com/wazuh/wazuh-packages/releases/tag/v4.8.0

## [4.7.3]

- https://github.com/wazuh/wazuh-packages/releases/tag/v4.7.3

## [4.7.2]

- https://github.com/wazuh/wazuh-packages/releases/tag/v4.7.2
Expand Down
20 changes: 11 additions & 9 deletions aix/SPECS/wazuh-agent-aix.spec
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,14 @@ rm -fr %{buildroot}
%attr(750, root, wazuh) %{_localstatedir}/wodles/*

%changelog
* Tue Mar 26 2024 support <[email protected]> - 4.8.2
* Wed Apr 17 2024 support <[email protected]> - 4.8.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-2.html
* Wed Feb 28 2024 support <[email protected]> - 4.8.1
* Wed Apr 03 2024 support <[email protected]> - 4.8.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-1.html
* Wed Feb 21 2024 support <[email protected]> - 4.8.0
* Wed Mar 20 2024 support <[email protected]> - 4.8.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Tue Feb 27 2024 support <[email protected]> - 4.7.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-3.html
* Tue Jan 09 2024 support <[email protected]> - 4.7.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-2.html
* Wed Dec 13 2023 support <[email protected]> - 4.7.1
Expand Down Expand Up @@ -408,7 +410,7 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-3-12-1.html
* Wed Mar 25 2020 support <[email protected]> - 3.12.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-12-0.html
* Thu Feb 24 2020 support <[email protected]> - 3.11.4
* Mon Feb 24 2020 support <[email protected]> - 3.11.4
- More info: https://documentation.wazuh.com/current/release-notes/release-3-11-4.html
* Wed Jan 22 2020 support <[email protected]> - 3.11.3
- More info: https://documentation.wazuh.com/current/release-notes/release-3-11-3.html
Expand All @@ -424,15 +426,15 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-3-10-1.html
* Mon Aug 26 2019 support <[email protected]> - 3.10.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-10-0.html
* Mon Aug 8 2019 support <[email protected]> - 3.9.5
* Thu Aug 8 2019 support <[email protected]> - 3.9.5
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-5.html
* Mon Jul 12 2019 support <[email protected]> - 3.9.4
* Fri Jul 12 2019 support <[email protected]> - 3.9.4
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-4.html
* Mon Jul 02 2019 support <[email protected]> - 3.9.3
* Tue Jul 02 2019 support <[email protected]> - 3.9.3
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-3.html
* Mon Jun 11 2019 support <[email protected]> - 3.9.2
* Tue Jun 11 2019 support <[email protected]> - 3.9.2
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-2.html
* Mon Jun 01 2019 support <[email protected]> - 3.9.1
* Sat Jun 01 2019 support <[email protected]> - 3.9.1
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-1.html
* Mon Feb 25 2019 support <[email protected]> - 3.9.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-0.html
Expand Down
2 changes: 1 addition & 1 deletion aix/generate_wazuh_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ build_perl() {

curl -LO http://www.cpan.org/src/5.0/perl-5.10.1.tar.gz -k -s
gunzip perl-5.10.1.tar.gz && tar -xf perl-5.10.1.tar
cd perl-5.10.1 && ./Configure -des -Dcc='gcc'
cd perl-5.10.1 && ./Configure -des -Dcc='gcc' -Dusethreads
make && make install
ln -fs /usr/local/bin/perl /bin/perl
ln -fs /usr/local/bin/perl /opt/freeware/bin/perl
Expand Down
Loading

0 comments on commit 466162c

Please sign in to comment.