Skip to content

[BUG] Admin role check relies on a wallet allowlist in an environment variable that isn't reloaded without a full restart #904

Open

Description

@meshackyaro

Bug Description

Adding or removing an admin wallet requires editing ADMIN_WALLETS and restarting the service; there's no runtime admin-management endpoint or hot-reload, making incident response (revoking a compromised admin) slower than it should be.

Component

  • Backend
  • Frontend
  • Smart Contract
  • SDK
  • Documentation
  • Other:

Steps to Reproduce

  1. Add a wallet to the live ADMIN_WALLETS list via the hosting platform's env var UI.
  2. Without restarting, attempt an admin action with that wallet.
  3. Observe it being rejected.
  4. Confirm a restart is required for the change to take effect.

Expected Behavior

Revoking admin access, especially in an incident, shouldn't require a full service restart.

Actual Behavior

Admin membership changes have no effect until the next deploy/restart, which is a meaningful delay during a security incident.

Environment

  • Node Version: 20.x
  • OS: Linux / macOS
  • Browser (if applicable): N/A
  • Network (Testnet/Mainnet): Mainnet

Error Messages/Logs

N/A — no error output; behavior is incorrect but silent.

Screenshots

N/A — backend/API issue, not applicable.

Additional Context

Admin membership is read once at startup from env and cached in memory for the process lifetime.

Possible Solution

Store admin membership in Redis/DB instead of env vars so it can be revoked immediately without a restart, keeping env var as a bootstrap-only fallback.

Activity

  1. added
    bug
    difficulty: medium
    priority: medium
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbugcoredifficulty: mediumpriority: mediumsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions