Overview
Add an admin audit-log viewer that surfaces all security- and money-related actions (login, KYC changes, refunds, dispute resolutions, permission changes) with filters and export.
Motivation
Compliance and incident response require a searchable record of who did what and when, especially for money-moving and security-sensitive actions. Currently audit events may be logged, but there's no admin-facing viewer or filterable export to review them.
Proposed Design
- Normalize audit logging behind an audit service that records: actor, action, resource_type, resource_id, ip, user_agent, metadata (JSON), created_at
- Ensure key actions write audit records: authentication (login/logout/failed), KYC submissions and status changes, refunds, dispute resolutions, admin permission changes, campaign status changes, wallet/key events
- Add admin endpoints: GET /api/admin/audit-logs with filters (actor, action, resource_type, date range) and pagination
- Add CSV/JSON export of filtered audit results
- Make audit records append-only (no update/delete) to preserve integrity
- Add an admin UI page with the filters, a results table, and the export button
Acceptance Criteria
Overview
Add an admin audit-log viewer that surfaces all security- and money-related actions (login, KYC changes, refunds, dispute resolutions, permission changes) with filters and export.
Motivation
Compliance and incident response require a searchable record of who did what and when, especially for money-moving and security-sensitive actions. Currently audit events may be logged, but there's no admin-facing viewer or filterable export to review them.
Proposed Design
Acceptance Criteria