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

Yaml format of the config.yml file to generate certificates is not correct #1413

Closed
jmv74211 opened this issue Mar 31, 2022 · 2 comments
Closed
Assignees

Comments

@jmv74211
Copy link
Contributor

Reading the documentation of 4.3.0-rc5, I have seen that to create the necessary certificates for the communication between different Wazuh components, a config.yml file is used.

Reviewing the content of this file, I have seen that it contains the following:

nodes:
  # Wazuh indexer nodes
  indexer:
    name: node-1
    ip: <indexer-node-ip>
    name: node-2
    ip: <indexer-node-ip>
    name: node-3
    ip: <indexer-node-ip>
...

However, it does not comply with the actual yaml syntax, because if we parse this we would get the following:

nodes:
  # Wazuh indexer nodes
  indexer:
    name: node-3
    ip: <indexer-node-ip>
...

The correct syntax would be as follows:

nodes:
  # Wazuh indexer nodes
  indexer:
    - name: node-1
      ip: <indexer-node-ip>
    - name: node-2
      ip: <indexer-node-ip>
    - name: node-3
      ip: <indexer-node-ip>
...

Regardless of which syntax seems to be wrong, the certificates are generated correctly. This has to be because you are using a custom parser that does not take into account that syntax error.

It is requested to correct this error to comply with the standard yaml format, or directly change the extension to another, such as .cnf ... to indicate that it does not comply with any specific format.

@DFolchA
Copy link
Contributor

DFolchA commented Apr 6, 2022

Update

  • Change templates for config.yml
  • Modify yml parser to read new format
  • Found some and solved issues with the variables generated by the new config.yml
  • Start testing

To Do

  • Finish tests
  • Check if the change affects Jenkins automated tests

@alberpilot
Copy link
Contributor

alberpilot commented Apr 7, 2022

Tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants