From 9b21029e38c369ea7bbd552c10dd57d14d26a539 Mon Sep 17 00:00:00 2001 From: Fede Tux Date: Fri, 5 Jul 2024 11:00:02 -0300 Subject: [PATCH] Add TLS to OpenSearch and Wazuh Dashboards --- integrations/docker/opensearch.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/integrations/docker/opensearch.yml b/integrations/docker/opensearch.yml index 2cfa537cbcc50..ed878c8054b92 100644 --- a/integrations/docker/opensearch.yml +++ b/integrations/docker/opensearch.yml @@ -72,10 +72,36 @@ services: SERVER.SSL_CERTIFICATE: '/usr/share/opensearch-dashboards/config/certs/opensearch.pem' OPENSEARCH_SSL_CERTIFICATEAUTHORITIES: '/usr/share/opensearch-dashboards/config/certs/root-ca.pem' + generate-certs-config: + image: alpine:latest + volumes: + - ./config:/config + command: | + sh -c " + echo ' + nodes: + indexer: + - name: wazuh.indexer + ip: \"wazuh.indexer\" + - name: opensearch.node + ip: \"opensearch.node\" + server: + - name: wazuh.manager + ip: \"wazuh.manager\" + dashboard: + - name: wazuh.dashboard + ip: \"wazuh.dashboard\" + - name: opensearch.dashboards + ip: \"opensearch.dashboards\" + ' > /config/certs.yml + " wazuh-certs-generator: image: wazuh/wazuh-certs-generator:0.0.1 hostname: wazuh-certs-generator + depends_on: + generate-certs-config: + condition: service_completed_successfully entrypoint: sh -c "/entrypoint.sh; chown -R 1000:999 /certificates; chmod 740 /certificates; chmod 440 /certificates/*" volumes: - ./certs/:/certificates/