feat: Introduce webhook secret key to verify webhook requests

This commit is contained in:
Faruk AYDIN
2022-12-07 13:09:04 +01:00
parent 5d80fd523c
commit 75196cbf84
8 changed files with 41 additions and 28 deletions

View File

@@ -5,8 +5,10 @@ set -e
if [ ! -f /automatisch/storage/.env ]; then
>&2 echo "Saving environment variables"
ENCRYPTION_KEY="${ENCRYPTION_KEY:-$(openssl rand -base64 36)}"
WEBHOOK_SECRET_KEY="${WEBHOOK_SECRET_KEY:-$(openssl rand -base64 36)}"
APP_SECRET_KEY="${APP_SECRET_KEY:-$(openssl rand -base64 36)}"
echo "ENCRYPTION_KEY=$ENCRYPTION_KEY" >> /automatisch/storage/.env
echo "WEBHOOK_SECRET_KEY=$WEBHOOK_SECRET_KEY" >> /automatisch/storage/.env
echo "APP_SECRET_KEY=$APP_SECRET_KEY" >> /automatisch/storage/.env
fi