-
Notifications
You must be signed in to change notification settings - Fork 143
Certificate workflow overhaul (legacy workflow preserved + default) #1409
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
Draft
griggi-ws
wants to merge
29
commits into
wazuh:main
Choose a base branch
from
griggi-ws:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…th inherited params
… key conversion to pkcs8 format for opensearch, fix: repo notify
… to match updated cn param
…catalog is unique to node anyhow; remove: unused parameters
…certs parameter from indexer
…le, to avoid issues in a staged run
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey folks, was looking to set up Wazuh with Puppet and found the official module to be incompatible with my environment (largely due to the certificates workflow), and so I decided to refactor it to make it be significantly more dynamic and allow for the use of the Puppet CA via a custom Puppet fileserver rather than shimming files generated by a script into the code path.
Currently a draft because I started writing this before remembering that I didn't sufficiently test the agent class yet, on the docket for next week though.
The major functionality improvements are:
Variant[Hash, Array] $certfiles
andString $cert_source_basepath
wazuh-certs-tool.sh
functionality with Puppet exported resources, using the Puppet CAopenssl
module that hasn't made it into a release yet for defining keyUsage.Locally I have some degree of rspec tests written up, as the existing tests in the
spec/
dir all failed. I've loosely followed the OpenVox model for those, and can include them in the PR if desired, but they'll need some work to be thorough enough.There are several linting fixups as well in the files I was working on, but should have no effect on functionality (unless maybe you're on Puppet 3.x). I did not look to make sweeping formatting updates (though they are much needed).
Examples
With the changes, here's my example config for a single-node setup:
Puppet CA profile:
Puppet compiler profile
(note that this is only necessary to include in the case of a separate CA and compiler server, which would also need syncing of the files between them via some method)
Wazuh profile
This is using the
stdlib
stages, grouping in such a way that there's no relationship between the cert-generating classes so all of the exported resources can be stored in a single puppet run. If they were configured all at once with chaining arrows, you'd need to interleave several Puppet runs (along with the Puppet CA) in order to allow one class to complete so the next can reach the export step.