wazuh-kubernetes icon indicating copy to clipboard operation
wazuh-kubernetes copied to clipboard

PoC of managing certificates with cert-manager

Open gecube opened this issue 2 years ago • 4 comments

This PR closes #576

gecube avatar Feb 01 '24 19:02 gecube

@CarlosALgit Hi! Could you kindly review the PR and give your feedback?

gecube avatar Sep 23 '24 14:09 gecube

Also, to make vulnerability detection work, the config file for the master and worker pod also needs to be changed In file wazuh/wazuh_managers/wazuh_conf/master.conf and wazuh/wazuh_managers/wazuh_conf/worker.conf

<ssl>
  <certificate_authorities>
    <ca>/etc/ssl/root-ca.pem</ca>
  </certificate_authorities>
  <certificate>/etc/ssl/filebeat.pem</certificate>
  <key>/etc/ssl/filebeat.key</key>
</ssl>

this part is using the original certificate path and should be changed to

<ssl>
  <certificate_authorities>
    <ca>/etc/ssl/ca.crt</ca>
  </certificate_authorities>
  <certificate>/etc/ssl/tls.crt</certificate>
  <key>/etc/ssl/tls.key</key>
</ssl>

zznyjidi avatar Oct 04 '24 06:10 zznyjidi

@zznyjidi thanks, I will fix.

gecube avatar Oct 04 '24 06:10 gecube

@zznyjidi kindly check.

gecube avatar Oct 07 '24 14:10 gecube

Been trying to offload certs to separate secret store and sync them with external-secrets to implement this gitops way, stumbling on every possible occasion. This can't come soon enough.

AurimasNav avatar Nov 26 '24 07:11 AurimasNav

@AurimasNav Hi! Could I help somehow?

gecube avatar Nov 26 '24 10:11 gecube

@AurimasNav Hi! Could I help somehow?

Thanks, I've managed it somehow, it just was very time consuming.

AurimasNav avatar Feb 12 '25 09:02 AurimasNav

@AurimasNav Hi! Could you share what you achieved?

gecube avatar Feb 12 '25 09:02 gecube

It is really nothing special, my only goal was to avoid commiting certs to git, but it is by no means automated solution, it is the same manual labor with the certs that wazuh script generates, it is simply that they are stored in azure key vault (manually), and referenced by external-secrets to create secrets in kubernetes by referencing those key vault secrets.

AurimasNav avatar Feb 13 '25 08:02 AurimasNav

@c-bordon Hi! Is there any option to reopen this PR and target it to main branch (I wrote brainch hahaha first time)? It sounds ridiculous if the only way would be to recreate it and lose the history of conversation.

gecube avatar Mar 01 '25 13:03 gecube

~https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request Just found this~

Edit: Sorry, I tested this with a empty repo and it does not work with deleted branch

zznyjidi avatar Mar 05 '25 01:03 zznyjidi

@zznyjidi no problem. Thank you very much for your try to help.

gecube avatar Mar 05 '25 07:03 gecube