Add UUID for the Admin organisation when deploying (#183)

* Update template.env - Add ADMIN_ORG

* Update docker-compose.yml - Add ADMIN_ORG_UUID

* Update configure_misp.sh - Add uuid to database
pull/181/head
Steven Goossens 2024-11-13 10:27:13 +01:00 committed by GitHub
parent 5e60a88eeb
commit 7468cd9886
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 0 deletions

View File

@ -282,6 +282,10 @@ init_user() {
echo "UPDATE $MYSQL_DATABASE.organisations SET name = \"${ADMIN_ORG}\" where id = 1;" | ${MYSQL_CMD}
fi
if [ ! -z "$ADMIN_ORG_UUID" ]; then
echo "UPDATE $MYSQL_DATABASE.organisations SET uuid = \"${ADMIN_ORG_UUID}\" where id = 1;" | ${MYSQL_CMD}
fi
if [ -n "$ADMIN_KEY" ]; then
echo "... setting admin key to '${ADMIN_KEY}'"
CHANGE_CMD=(sudo -u www-data /var/www/MISP/app/Console/cake User change_authkey 1 "${ADMIN_KEY}")

View File

@ -112,6 +112,7 @@ services:
- "ADMIN_PASSWORD=${ADMIN_PASSWORD}"
- "ADMIN_KEY=${ADMIN_KEY}"
- "ADMIN_ORG=${ADMIN_ORG}"
- "ADMIN_ORG_UUID=${ADMIN_ORG_UUID}"
- "GPG_PASSPHRASE=${GPG_PASSPHRASE}"
# OIDC authentication settings
- "OIDC_ENABLE=${OIDC_ENABLE}"

View File

@ -35,6 +35,8 @@ LIBFAUP_COMMIT=3a26d0a
ADMIN_EMAIL=
# name of org #1, default to MISP's default (ORGNAME)
ADMIN_ORG=
# uuid of org #1, defaults to an automatically generated one
ADMIN_ORG_UUID=
# defaults to an automatically generated one
ADMIN_KEY=
# defaults to MISP's default (admin)