mirror of https://github.com/MISP/misp-docker
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 databasepull/181/head
parent
5e60a88eeb
commit
7468cd9886
|
@ -282,6 +282,10 @@ init_user() {
|
||||||
echo "UPDATE $MYSQL_DATABASE.organisations SET name = \"${ADMIN_ORG}\" where id = 1;" | ${MYSQL_CMD}
|
echo "UPDATE $MYSQL_DATABASE.organisations SET name = \"${ADMIN_ORG}\" where id = 1;" | ${MYSQL_CMD}
|
||||||
fi
|
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
|
if [ -n "$ADMIN_KEY" ]; then
|
||||||
echo "... setting admin key to '${ADMIN_KEY}'"
|
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}")
|
CHANGE_CMD=(sudo -u www-data /var/www/MISP/app/Console/cake User change_authkey 1 "${ADMIN_KEY}")
|
||||||
|
|
|
@ -112,6 +112,7 @@ services:
|
||||||
- "ADMIN_PASSWORD=${ADMIN_PASSWORD}"
|
- "ADMIN_PASSWORD=${ADMIN_PASSWORD}"
|
||||||
- "ADMIN_KEY=${ADMIN_KEY}"
|
- "ADMIN_KEY=${ADMIN_KEY}"
|
||||||
- "ADMIN_ORG=${ADMIN_ORG}"
|
- "ADMIN_ORG=${ADMIN_ORG}"
|
||||||
|
- "ADMIN_ORG_UUID=${ADMIN_ORG_UUID}"
|
||||||
- "GPG_PASSPHRASE=${GPG_PASSPHRASE}"
|
- "GPG_PASSPHRASE=${GPG_PASSPHRASE}"
|
||||||
# OIDC authentication settings
|
# OIDC authentication settings
|
||||||
- "OIDC_ENABLE=${OIDC_ENABLE}"
|
- "OIDC_ENABLE=${OIDC_ENABLE}"
|
||||||
|
|
|
@ -35,6 +35,8 @@ LIBFAUP_COMMIT=3a26d0a
|
||||||
ADMIN_EMAIL=
|
ADMIN_EMAIL=
|
||||||
# name of org #1, default to MISP's default (ORGNAME)
|
# name of org #1, default to MISP's default (ORGNAME)
|
||||||
ADMIN_ORG=
|
ADMIN_ORG=
|
||||||
|
# uuid of org #1, defaults to an automatically generated one
|
||||||
|
ADMIN_ORG_UUID=
|
||||||
# defaults to an automatically generated one
|
# defaults to an automatically generated one
|
||||||
ADMIN_KEY=
|
ADMIN_KEY=
|
||||||
# defaults to MISP's default (admin)
|
# defaults to MISP's default (admin)
|
||||||
|
|
Loading…
Reference in New Issue