If the ADMIN_KEY envar is set, the following code block in configure_misp will run on every container start and potentially expire then recreate matching keys without preserving any allowlist entries set for the admin key.
if [ -n "$ADMIN_KEY" ]; then
if [ "$DISABLE_PRINTING_PLAINTEXT_CREDENTIALS" == "true" ]; then
echo "... setting admin key from environment variable"
else
echo "... setting admin key to '${ADMIN_KEY}'"
fi
CHANGE_CMD=(sudo -u www-data /var/www/MISP/app/Console/cake User change_authkey 1 "${ADMIN_KEY}")
This should be updated to check if the user 1 key is already set to ADMIN_KEY, and if so, take no action to prevent creating duplicate entries or removing IP allow lists.
If the ADMIN_KEY envar is set, the following code block in configure_misp will run on every container start and potentially expire then recreate matching keys without preserving any allowlist entries set for the admin key.
This should be updated to check if the user 1 key is already set to ADMIN_KEY, and if so, take no action to prevent creating duplicate entries or removing IP allow lists.