diff --git a/extra/wazuh.yml b/extra/wazuh.yml index 7991665..49f0545 100644 --- a/extra/wazuh.yml +++ b/extra/wazuh.yml @@ -73,11 +73,6 @@ services: - SERVER_SSL_KEY=/usr/share/kibana/config/opendistroforelasticsearch.example.org.key env_file: - ../.envs/.production/.wazuh - depends_on: - - wazuh-elasticsearch - #links: - # - wazuh-elasticsearch:elasticsearch - # - wazuh:wazuh volumes: ossec_api_configuration: diff --git a/scripts/services/Mistborn-wazuh.service b/scripts/services/Mistborn-wazuh.service index 856bc57..7aaaea7 100644 --- a/scripts/services/Mistborn-wazuh.service +++ b/scripts/services/Mistborn-wazuh.service @@ -11,7 +11,6 @@ User=root Group=docker PermissionsStartOnly=true # Shutdown container (if running) when unit is stopped -ExecStartPre=/usr/sbin/sysctl -w vm.max_map_count=262144 ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh docker-compose -f /opt/mistborn/extra/wazuh.yml down # Start container when unit is started ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh docker-compose -f /opt/mistborn/extra/wazuh.yml up --build diff --git a/scripts/services/wazuh/files/internal_users.yml b/scripts/services/wazuh/files/internal_users.yml deleted file mode 100644 index 540eede..0000000 --- a/scripts/services/wazuh/files/internal_users.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# This is the internal user database -# The hash value is a bcrypt hash and can be generated with plugin/tools/hash.sh - -_meta: - type: "internalusers" - config_version: 2 - -# Define your internal users here - -mistborn: - hash: "__MISTBORN_HASH__" - reserved: true - backend_roles: - - "admin" - description: "Mistborn user" - diff --git a/scripts/services/wazuh/init.sh b/scripts/services/wazuh/init.sh deleted file mode 100755 index 1f35f52..0000000 --- a/scripts/services/wazuh/init.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -e - -if [[ -f "/opt/mistborn_volumes/extra/wazuh/init/internal_users.yml" ]]; then - echo "internal_users.yml exists. Proceeding." - exit 0 -fi - -mkdir -p /opt/mistborn_volumes/extra/wazuh/init/ >/dev/null 2>&1 -chmod -R +x /opt/mistborn_volumes/extra/wazuh/init/ -cp /opt/mistborn/scripts/services/wazuh/files/internal_users.yml /opt/mistborn_volumes/extra/wazuh/init/ - -WAZUH_MISTBORN_HASHED=$(docker run --rm amazon/opendistro-for-elasticsearch:1.12.0 bash /usr/share/elasticsearch/plugins/opendistro_security/tools/hash.sh -p ${MISTBORN_DEFAULT_PASSWORD} | tr -d '\n') - -sed -i "s|__MISTBORN_HASH__|${WAZUH_MISTBORN_HASHED}|" /opt/mistborn_volumes/extra/wazuh/init/internal_users.yml