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

Certificate deployment not ideal with 4.8.0 #1038

Open
Hedius opened this issue Jun 15, 2024 · 2 comments
Open

Certificate deployment not ideal with 4.8.0 #1038

Hedius opened this issue Jun 15, 2024 · 2 comments

Comments

@Hedius
Copy link

Hedius commented Jun 15, 2024

Hello,

with 4.8.0 it seems like the cert deployment was heavily modified:

file { 'Copy all certificates into module':
ensure => 'directory',
source => '/tmp/wazuh-certificates/',
recurse => 'remote',
path => '/etc/puppetlabs/code/environments/production/modules/archive/files/',
owner => 'root',
group => 'root',
mode => '0755',
}

Especially this block.

Few things or ideas?:

  • You hardcoded the environment in the repo. (Not everyone has a env called production)
  • You generate the certs on the puppet master, but with large multi puppet master setups this won't work?
  • It seems like the files are being tried to saved in the files folder of another puppet module.? (puppet-archive)
  • Would not be the correct way to share certs between nodes, etc. to use puppetdb and exported resources?
    i can add more information if needed.
@Hedius
Copy link
Author

Hedius commented Jun 15, 2024

https://documentation.wazuh.com/current/deployment-options/deploying-with-puppet/wazuh-puppet-module/index.html

Still exported resources would be cleaner. The setup does not work like this if you have a multi puppet master/server environment.

please do not hijack other modules... and do not hardcode environments (puppet-archive in this case). :(

@Hedius Hedius changed the title Certificate deployment seems to be broken on 4.8.0 Certificate deployment not ideal with 4.8.0 Jun 15, 2024
@6uhrmittag
Copy link

6uhrmittag commented Nov 11, 2024

IMHO the whole certificates.pp should be refactored - it's a collection of bad practices :(

  • The version is hardcoded and isn't updated on new releases(4.9 and v4.10.0-alpha3):

$wazuh_version = '4.8',

  • The script isn't packaged with the puppet-module but is pulled from packages.wazuh.com without any (hashsum-)verification and than executed by the Puppet Agent and its privileges on the Puppet Master(!):

source => "https://${wazuh_repository}/${wazuh_version}/wazuh-certs-tool.sh",

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

No branches or pull requests

2 participants