4 changed files with 46 additions and 3 deletions
@ -0,0 +1,17 @@ |
|||||||
|
--- |
||||||
|
# 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" |
||||||
|
|
||||||
@ -0,0 +1,14 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
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 -ti amazon/opendistro-for-elasticsearch:1.12.0 bash /usr/share/elasticsearch/plugins/opendistro_security/tools/hash.sh -p "${MISTBORN_DEFAULT_PASSWORD}") |
||||||
|
|
||||||
|
sed -i "s/__MISTBORN_HASH__/${WAZUH_MISTBORN_HASHED}/" /opt/mistborn_volumes/extra/guacamole/init/initdb.sql |
||||||
Loading…
Reference in new issue