From d5191b8f4bd20172acde654deb34c2608d013a39 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Thu, 24 Mar 2022 20:00:39 +0100 Subject: [PATCH] Change certs copy --- docker-compose.yml | 4 ++-- wazuh-dashboard/config/config.sh | 2 +- wazuh-indexer/config/config.sh | 7 ++++++- wazuh-indexer/config/opensearch.yml | 10 +++++----- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2138bc75..f3e28d73 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: - filebeat_var:/var/lib/filebeat wazuh1.indexer: - image: wazuh/wazuh-indexer:4.3.0-dev-testing + image: wazuh/wazuh-indexer:4.3.0-dev-test hostname: wazuh1.indexer restart: always ports: @@ -46,7 +46,7 @@ services: hard: 65536 wazuh.dashboard: - image: wazuh/wazuh-dashboard:4.3.0-dev-testing + image: wazuh/wazuh-dashboard:4.3.0-dev-test hostname: wazuh.dashboard restart: always ports: diff --git a/wazuh-dashboard/config/config.sh b/wazuh-dashboard/config/config.sh index 1d2a575a..629a5988 100644 --- a/wazuh-dashboard/config/config.sh +++ b/wazuh-dashboard/config/config.sh @@ -30,7 +30,7 @@ fi chmod 755 $CERT_TOOL && bash /$CERT_TOOL -A -# Copy Wazuh dashboard's certificates +# Create certs directory mkdir -p ${CONFIG_DIR}/certs # Copy Wazuh dashboard certs to install config dir diff --git a/wazuh-indexer/config/config.sh b/wazuh-indexer/config/config.sh index f15c2b40..513bc3b4 100644 --- a/wazuh-indexer/config/config.sh +++ b/wazuh-indexer/config/config.sh @@ -98,4 +98,9 @@ cp -pr /roles.yml ${TARGET_DIR}${INSTALLATION_DIR}/plugins/opensearch-security/s cp -pr /internal_users.yml ${TARGET_DIR}${INSTALLATION_DIR}/plugins/opensearch-security/securityconfig/ cp -pr /opensearch.yml ${TARGET_DIR}${CONFIG_DIR} # Copy Wazuh indexer's certificates -cp -pr /wazuh-certificates/* ${TARGET_DIR}${CONFIG_DIR} +cp -pr /wazuh-certificates/demo.indexer.pem ${TARGET_DIR}${CONFIG_DIR}/indexer.pem +cp -pr /wazuh-certificates/demo.indexer-key.pem ${TARGET_DIR}${CONFIG_DIR}/indexer-key.pem +cp -pr /wazuh-certificates/root-ca.key ${TARGET_DIR}${CONFIG_DIR}/root-ca.key +cp -pr /wazuh-certificates/root-ca.pem ${TARGET_DIR}${CONFIG_DIR}/root-ca.pem +cp -pr /wazuh-certificates/admin.pem ${TARGET_DIR}${CONFIG_DIR}/admin.pem +cp -pr /wazuh-certificates/admin-key.pem ${TARGET_DIR}${CONFIG_DIR}/admin-key.pem \ No newline at end of file diff --git a/wazuh-indexer/config/opensearch.yml b/wazuh-indexer/config/opensearch.yml index 765efb62..4cc0d33c 100644 --- a/wazuh-indexer/config/opensearch.yml +++ b/wazuh-indexer/config/opensearch.yml @@ -4,11 +4,11 @@ path.data: /var/lib/wazuh-indexer path.logs: /var/log/wazuh-indexer discovery.type: single-node compatibility.override_main_response_version: true -plugins.security.ssl.http.pemcert_filepath: ${OPENSEARCH_PATH_CONF}/demo.indexer.pem -plugins.security.ssl.http.pemkey_filepath: ${OPENSEARCH_PATH_CONF}/demo.indexer-key.pem +plugins.security.ssl.http.pemcert_filepath: ${OPENSEARCH_PATH_CONF}/indexer.pem +plugins.security.ssl.http.pemkey_filepath: ${OPENSEARCH_PATH_CONF}/indexer-key.pem plugins.security.ssl.http.pemtrustedcas_filepath: ${OPENSEARCH_PATH_CONF}/root-ca.pem -plugins.security.ssl.transport.pemcert_filepath: ${OPENSEARCH_PATH_CONF}/demo.indexer.pem -plugins.security.ssl.transport.pemkey_filepath: ${OPENSEARCH_PATH_CONF}/demo.indexer-key.pem +plugins.security.ssl.transport.pemcert_filepath: ${OPENSEARCH_PATH_CONF}/indexer.pem +plugins.security.ssl.transport.pemkey_filepath: ${OPENSEARCH_PATH_CONF}/indexer-key.pem plugins.security.ssl.transport.pemtrustedcas_filepath: ${OPENSEARCH_PATH_CONF}/root-ca.pem plugins.security.ssl.http.enabled: true plugins.security.ssl.transport.enforce_hostname_verification: false @@ -19,7 +19,7 @@ plugins.security.authcz.admin_dn: plugins.security.check_snapshot_restore_write_privileges: true plugins.security.enable_snapshot_restore_privilege: true plugins.security.nodes_dn: -- "CN=demo.indexer,OU=Wazuh,O=Wazuh,L=California,C=US" +- "CN=indexer,OU=Wazuh,O=Wazuh,L=California,C=US" plugins.security.restapi.roles_enabled: - "all_access" - "security_rest_api_access"