Skip to content

Prevent ADMIN_KEY envar from recreating existing auth key - #444

Merged
ostefano merged 3 commits into
MISP:masterfrom
jeremiah-RENISAC:master
Oct 9, 2026
Merged

ostefano merged 3 commits into
MISP:masterfrom
jeremiah-RENISAC:master

Conversation

@jeremiah-RENISAC

@jeremiah-RENISAC jeremiah-RENISAC commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #443

Adds a check when the environment variable "ADMIN_KEY" is set to see if user 1's key is already set to the same value by hash match, and if so, skips the change_authkey command. When change_authkey is run, it expires the current key and recreates a new duplicate entry without preserving any allowed ips.

@jeremiah-RENISAC

Copy link
Copy Markdown
Contributor Author

Tested the new image:

  • Redeploy with same ADMIN_KEY value triggers the "configured admin key already active, not changing" path
  • Changing the ADMIN_KEY value and redeploying triggers the "setting admin key from environment variable" path

@ostefano

Copy link
Copy Markdown
Collaborator

@righel can you help reviewing this?

@ostefano
ostefano requested a review from righel September 10, 2026 11:55
@ostefano ostefano self-assigned this Sep 10, 2026
@ostefano ostefano added enhancement New feature or request scheduled Will merge at the next opportunity labels Sep 10, 2026
@jeremiah-RENISAC

Copy link
Copy Markdown
Contributor Author

@righel can you help reviewing this?

Any word on getting this reviewed?

@righel

righel commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

LGTM. There is an indentation issue staring in line 491, if you could fix that it would be great.

Thanks.

Comment thread core/files/configure_misp.sh Outdated
@ostefano
ostefano merged commit 9941f4a into MISP:master Oct 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request scheduled Will merge at the next opportunity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants