Skip to content

Security: Hardcoded default API token enables predictable authentication#13336

Open
tomaioo wants to merge 1 commit intoequinor:mainfrom
tomaioo:fix/security/hardcoded-default-api-token-enables-pred
Open

Security: Hardcoded default API token enables predictable authentication#13336
tomaioo wants to merge 1 commit intoequinor:mainfrom
tomaioo:fix/security/hardcoded-default-api-token-enables-pred

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented Apr 17, 2026

Summary

Security: Hardcoded default API token enables predictable authentication

Problem

Severity: High | File: src/ert/dark_storage/security.py:L6

Authentication falls back to a hardcoded token (DEFAULT_TOKEN = "hunter2") when ERT_STORAGE_TOKEN is not set. If operators forget to configure the environment variable, attackers can authenticate using a publicly known default credential.

Solution

Remove hardcoded fallback tokens. Require ERT_STORAGE_TOKEN to be explicitly set at startup and fail fast if missing. Consider loading secrets from a secret manager and rotating tokens regularly.

Changes

  • src/ert/dark_storage/security.py (modified)

Authentication falls back to a hardcoded token (`DEFAULT_TOKEN = "hunter2"`) when `ERT_STORAGE_TOKEN` is not set. If operators forget to configure the environment variable, attackers can authenticate using a publicly known default credential.

Signed-off-by: tomaioo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant