Merge pull request #2528 from wazuh/change/2524-wazuh-agent-authd.pass-configuration

Wazuh agent authd.pass configuration
This commit is contained in:
Gonzalo Acuña
2026-07-03 13:50:00 -03:00
committed by GitHub
7 changed files with 17 additions and 7 deletions
+1
View File
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
### Added
- Set authd password in agents installation. ([#2524](https://github.com/wazuh/wazuh-docker/issues/2524))
- Added bump-issue-link support for Revert Stage Bump. ([#2505](https://github.com/wazuh/wazuh-docker/pull/2505))
- Add integration test module docs ([#2491](https://github.com/wazuh/wazuh-docker/pull/2491))
- Implement the wazuh-docker integration testing module ([#2188](https://github.com/wazuh/wazuh-docker/issues/2188))
+1 -2
View File
@@ -36,8 +36,7 @@ RUN dnf install procps shadow-utils -y && \
curl -o /wazuh-agent.rpm "${agent_url}" && \
dnf install /wazuh-agent.rpm -y && \
rm -rf /wazuh-agent.rpm && \
dnf clean all && \
sed -i '/<authorization_pass_path>/d' /var/ossec/etc/ossec.conf
dnf clean all
# Download tini static binary (no external library dependencies)
RUN curl --fail --silent -L \
@@ -62,6 +62,15 @@ set_manager_conn() {
sed -i "s#<address>CHANGE_MANAGER_IP</address>#<address>$WAZUH_MANAGER_SERVER</address>#g" ${WAZUH_INSTALL_PATH}/etc/ossec.conf
sed -i "s#<manager_address>CHANGE_ENROLL_IP</manager_address>#<manager_address>$WAZUH_REGISTRATION_SERVER</manager_address>#g" ${WAZUH_INSTALL_PATH}/etc/ossec.conf
sed -i "s#<agent_name>CHANGE_AGENT_NAME</agent_name>#<agent_name>$WAZUH_AGENT_NAME</agent_name>#g" ${WAZUH_INSTALL_PATH}/etc/ossec.conf
if [ -n "$WAZUH_REGISTRATION_PASSWORD" ]; then
set +x
cat << EOF > /var/ossec/etc/authd.pass
$WAZUH_REGISTRATION_PASSWORD
EOF
set -x
else
echo "WAZUH_REGISTRATION_PASSWORD is not set; the authd.pass configuration is omitted."
fi
}
##############################################################################
@@ -46,8 +46,7 @@ RUN setcap 'cap_net_bind_service=-ep' /usr/share/wazuh-dashboard/node/bin/node
################################################################################
# Build stage 1 (the current Wazuh dashboard image):
#
# Copy wazuh-dashboard from stage 0
# Copy wazuh-dashboard from builder
# Add entrypoint
# Add wazuh_dashboard_config
################################################################################
+1 -2
View File
@@ -41,8 +41,7 @@ RUN yum install curl-minimal shadow-utils findutils hostname -y && \
################################################################################
# Build stage 1 (the actual Wazuh indexer image):
#
# Copy wazuh-indexer from stage 0
# Copy wazuh-indexer from builder
# Add entrypoint
################################################################################
FROM amazonlinux:2023
@@ -19,9 +19,11 @@ Follow these steps to deploy the Wazuh agent using Docker.
# ...
environment:
- WAZUH_MANAGER_SERVER=<YOUR_WAZUH_MANAGER_IP_OR_HOSTNAME>
- WAZUH_REGISTRATION_PASSWORD=<authd.pass-PASSWORD>
# ...
```
**Note:** Replace `<YOUR_WAZUH_MANAGER_IP_OR_HOSTNAME>` with the actual IP address or hostname of your Wazuh manager.
**Note:** Replaces `<YOUR_WAZUH_MANAGER_IP_OR_HOSTNAME>` with the actual IP address or hostname of your Wazuh manager.
**Note:** Replaces `<authd.pass-PASSWORD>` with the password configured in the `/var/wazuh-manager/etc/authd.pass` file of the Wazuh manager server where you will connect.
3. Start the environment using `docker compose`:
+1
View File
@@ -5,3 +5,4 @@ services:
restart: always
environment:
- WAZUH_MANAGER_SERVER=<WAZUH_MANAGER_IP>
- WAZUH_REGISTRATION_PASSWORD=<authd.pass-PASSWORD>