Skip to content

Add structured admin action review queue with mandatory dual-control for high-risk ops #449

Description

@thlpkee20-wq

Description

High-risk admin actions (status transitions, payouts holds, manual reversals) need a structured review queue requiring a second approver before execution, with full audit context attached.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: src/routes/admin.ts, src/security/audit.ts
  • Self-approval must be rejected by identity check

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/dual-control-admin
  • Implement changes
    • Add admin_pending_actions with payload and TTL
    • Add approve/reject endpoints with role + identity guard
    • Apply pending payload atomically on approval
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • npm test
  • Cover edge cases
    • Approver swap mid-flow, TTL expiry, replay of approval
  • Include test output and notes

Example commit message

feat: dual-control review queue for high-risk admin ops

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions