Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check when generating certificates for multiple DNS #3006

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

davidcr01
Copy link
Contributor

Related issue
#2371

Description

The aim of this PR is to add a check in the certificates generation. This check ensures that every DNS specified in the config.yml file was valid. This comprobation was already done by the certificates tool, but it was enhanced to cover the multiple DNS use case:

Before

With the following YAML file, the certificates were created. Notice that the localhost DNS is invalid:

nodes:
  server:
    - name: wazuh-server
      ip: www.google.es
      ip: facebook.es
      ip: wikipedia.org

After

Now, with the check, the invalid DNS is fetched and the certificates generation is stopped.

root@ubuntu22:/home/vagrant# bash wazuh-certs-tool.sh -A -v
17/06/2024 16:11:51 INFO: Verbose logging redirected to /home/vagrant/wazuh-certificates-tool.log
17/06/2024 16:11:51 DEBUG: Reading configuration file.
17/06/2024 16:11:52 ERROR: The DNS localhost is not valid.
root@ubuntu22:/home/vagrant# 

Testing

The performed testing is in the following comment: #2371 (comment). Also, it has been checked that this change does not affect to the IP certificates generation.

@davidcr01 davidcr01 requested a review from a team June 17, 2024 16:22
@davidcr01 davidcr01 self-assigned this Jun 17, 2024
@davidcr01 davidcr01 linked an issue Jun 17, 2024 that may be closed by this pull request
3 tasks
@teddytpc1 teddytpc1 merged commit c4e499b into master Jun 25, 2024
4 checks passed
@teddytpc1 teddytpc1 deleted the bug/2371-fix-certs-generation-multi-dns branch June 25, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug generating certificates using multiple DNS in the Wazuh manager
3 participants