Skip to content

Development - DevOps 5.0 adaptation - Remove Filebeat references from the certs tool #510

@Enaraque

Description

@Enaraque

Description

For version 5.0, Filebeat will no longer be used, so all references to it in the certs tool must be removed:

  • Update the log messages related to Filebeat certificate generation. These messages should be updated to reference the Wazuh server instead of Filebeat.
  • Update the cert_generateFilebeatCertificates function. This function currently generates certificates for Filebeat. Since the certificates use the server names defined in config.yml, the only required change is to replace Filebeat references with Wazuh server.

References

function cert_generateFilebeatcertificates() {
if [ ${#server_node_names[@]} -gt 0 ]; then
common_logger "Generating Filebeat certificates."
for i in "${!server_node_names[@]}"; do
server_name="${server_node_names[i]}"
common_logger -d "Generating the certificates for ${server_name} server node."
j=$((i+1))
declare -a server_ips=(server_node_ip_"$j"[@])
cert_generateCertificateconfiguration "${server_name}" "${!server_ips}"
common_logger -d "Creating the Wazuh server tmp key pair."
cert_executeAndValidate "openssl req -new -nodes -newkey rsa:2048 -keyout ${cert_tmp_path}/${server_name}-key.pem -out ${cert_tmp_path}/${server_name}.csr -config ${cert_tmp_path}/${server_name}.conf"
common_logger -d "Creating the Wazuh server certificates."
cert_executeAndValidate "openssl x509 -req -in ${cert_tmp_path}/${server_name}.csr -CA ${cert_tmp_path}/root-ca.pem -CAkey ${cert_tmp_path}/root-ca.key -CAcreateserial -out ${cert_tmp_path}/${server_name}.pem -extfile ${cert_tmp_path}/${server_name}.conf -extensions v3_req -days 3650"
done
else
return 1
fi
}

if cert_generateFilebeatcertificates; then
common_logger "Wazuh Filebeat certificates created."

if [[ -n "${cserver}" ]]; then
if [ ${#server_node_names[@]} -gt 0 ]; then
cert_checkRootCA
cert_generateFilebeatcertificates
common_logger "Wazuh Filebeat certificates created."

Tasks

  • Certificates must be generated without referencing Filebeat at any point.
  • Manager and worker certificates must be generated according to the configuration specified in config.yml.

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions