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

The wazuh-certs-tool.sh script should allow the certificate creation in existing directories #1801

Closed
rauldpm opened this issue Aug 25, 2022 · 1 comment · Fixed by #2998
Closed
Assignees

Comments

@rauldpm
Copy link
Member

rauldpm commented Aug 25, 2022

Wazuh version Install type Action performed Platform
4.3.7 wazuh-certs-tool.sh - -

When trying to create a single node certificate, it is necessary to use an existing root-ca.pem and root-ca.key file, in case it does not exist, they can be generated with the same tool, but this causes the node certificates to not be able to be created because the target directory already exists.

╰─➤  bash wazuh-certs-tool.sh -ca
25/08/2022 16:37:11 INFO: Authority certificates created.
╰─➤  bash wazuh-certs-tool.sh -wd wazuh-certificates/root-ca.pem wazuh-certificates/root-ca.key
25/08/2022 16:37:19 ERROR: Directory wazuh-certificates already exists in the same path as the script. Please, remove the certs directory to create new certificates.

We must allow the certificates to be generated if the directory exists.

@rauldpm
Copy link
Member Author

rauldpm commented Aug 25, 2022

Update report

  • It has been observed that when using parameters that require specifying the root-ca certificates, these end up being copied to the folder created along with the rest of the certificates. It is possible that this behavior is not entirely desired for several reasons:
    • Duplicate files. Right now root-ca certificates are required to be on a different path than the one used to generate the certificates.
    • If certificates are allowed to use an existing directory, we would be faced with two cases:
      1. The user uses his own root-ca certificates (the custom root-ca will be in a different path to where the certificates are created). In this case, it would make sense for the root-ca certificates to be copied to the certificates folder
      2. The user generates the root-ca before generating the rest of the certificates (they are originally in the same folder). In this case, the root-ca certificates are already in the final directory, which saves copying and duplicating them.

@okynos okynos moved this to Triage in Release 4.4.0 Sep 9, 2022
@rauldpm rauldpm changed the title The wazuh-certs-tool.sh script should allow the creation of certificates in existing folders The wazuh-certs-tool.sh script should allow the certificate creation in existing folders Sep 28, 2022
@rauldpm rauldpm changed the title The wazuh-certs-tool.sh script should allow the certificate creation in existing folders The wazuh-certs-tool.sh script should allow the certificate creation in existing directories Sep 28, 2022
@snaow snaow added this to the Release 4.5.0 milestone Nov 16, 2022
@snaow snaow removed this from the Release 4.5.0 milestone Dec 21, 2022
@teddytpc1 teddytpc1 added level/task Subtask issue type/enhancement Enhancement issue labels May 22, 2023
@wazuhci wazuhci moved this to Backlog in Release 4.9.0 Oct 27, 2023
@wazuhci wazuhci removed this from Release 4.9.0 Dec 18, 2023
@teddytpc1 teddytpc1 added type/bug Bug issue and removed type/enhancement Enhancement issue labels May 20, 2024
@wazuhci wazuhci moved this to Backlog in XDR+SIEM/Release 5.0.0 May 20, 2024
@Enaraque Enaraque self-assigned this Jun 12, 2024
@wazuhci wazuhci moved this from Backlog to In progress in XDR+SIEM/Release 5.0.0 Jun 12, 2024
@Enaraque Enaraque linked a pull request Jun 12, 2024 that will close this issue
@wazuhci wazuhci moved this from In progress to Pending review in XDR+SIEM/Release 5.0.0 Jun 12, 2024
@wazuhci wazuhci moved this from Pending review to Done in XDR+SIEM/Release 5.0.0 Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants