Skip to content

ADMIN_KEY envar expires and recreates matching keys on startup without preserving allow lists #443

Description

@jeremiah-RENISAC

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions