我们使用官方提供的证书管理工具—— wazuh-certs-tool.sh,来制作部署Wazuh服务使用的各种证书。
在安装Wazuh服务中使用的三种证书:
使用上述脚本工具创建的数字证书,默认使用以下参数值:
需要根据实际信息,准备配置文件config.yml:
nodes:
# Wazuh indexer nodes
indexer:
- name: node-1
ip: -node-ip>
# - name: node-2
# ip:
# - name: node-3
# ip:
# Wazuh server nodes
# Use node_type only with more than one Wazuh manager
server:
- name: wazuh-1
ip: -manager-ip>
# node_type: master
# - name: wazuh-2
# ip:
# node_type: worker
# Wazuh dashboard nodes
dashboard:
- name: dashboard
ip: -node-ip>
在准备好config.yml文件后,使用以下命令一键创建所有的证书:
bash wazuh-certs-tool.sh -A
wazuh-certificates/
├── admin-key.pem
├── admin.pem
├── dashboard-key.pem
├── dashboard.pem
├── indexer-key.pem
├── indexer.pem
├── root-ca.key
├── root-ca.pem
├── server-key.pem
└── server.pem
注:使用wazuh-certs-tool.sh工具创建的证书有效期默认值均为10年。
bash wazuh-certs-tool.sh -A /path/to/root-ca.pem /path/to/root-ca.key