Merge pull request #9 from samply/feature/fetchSecretsFromVault

Auto-fetch sensitive variables from vault.
This commit is contained in:
Torben Brenner
2022-05-13 15:20:00 +02:00
committed by GitHub
3 changed files with 48 additions and 0 deletions

View File

@ -69,6 +69,13 @@ if [ ! -e "certs/traefik.crt" ]; then
openssl req -x509 -newkey rsa:4096 -nodes -keyout certs/traefik.key -out certs/traefik.crt -days 3650 -subj "/CN=$HOST"
fi
if [ -e /etc/bridgehead/vault.conf ]; then
if [ "$(stat -c "%a %U" /etc/bridgehead/vault.conf)" != "600 bridgehead" ]; then
log ERROR "/etc/bridgehead/vault.conf has wrong owner/permissions. To correct this issue, run chmod 600 /etc/bridgehead/vault.conf && chown bridgehead /etc/bridgehead/vault.conf."
exit 1
fi
fi
log INFO "Success - all prerequisites are met!"
exit 0