Generate exporter api key automatically

This commit is contained in:
juarez
2023-08-09 18:06:32 +02:00
parent e7f6c0b1a0
commit d97ac56126
3 changed files with 4 additions and 3 deletions

View File

@ -5,4 +5,5 @@ if [ "$ENABLE_EXPORTER" == true ]; then
OVERRIDE+=" -f ./$PROJECT/modules/exporter-compose.yml"
# TODO: Generate password in another way so that not all passwords are the same?
EXPORTER_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the exporter. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
EXPORTER_API_KEY="$(echo \"This is a salt string to generate one consistent API KEY for the exporter. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 64)"
fi