Skip to content

feat: Admin audit-log viewer with filters and export #768

Description

@dotunv

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

  1. Normalize audit logging behind an audit service that records: actor, action, resource_type, resource_id, ip, user_agent, metadata (JSON), created_at
  2. 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
  3. Add admin endpoints: GET /api/admin/audit-logs with filters (actor, action, resource_type, date range) and pagination
  4. Add CSV/JSON export of filtered audit results
  5. Make audit records append-only (no update/delete) to preserve integrity
  6. Add an admin UI page with the filters, a results table, and the export button

Acceptance Criteria

  • Audit records are written for all listed security/money actions
  • Audit records are append-only and not modifiable
  • Admin can filter by actor, action, resource_type, and date range
  • Results are paginated
  • Admin can export filtered results to CSV and JSON
  • Audit log viewer is restricted to admin role only
  • Sensitive fields (passwords, secrets) are never stored in audit metadata
  • Tests cover: audit writing for each action, filtering, pagination, export, admin-only access, append-only enforcement

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend / API workenhancementNew feature or requestsecuritySecurity hardening

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions