-
Notifications
You must be signed in to change notification settings - Fork 61
Issue #59 — Audit logging middleware #456
Copy link
Copy link
Open
Description
Title: [Middleware] Implement audit log for all admin and fund-moving actions
Tags: backend, middleware, security, feature
Description:
Record an immutable audit trail of all sensitive actions for compliance and incident response.
Acceptance Criteria:
-
audit-log.middleware.tsattaches to all/admin/*,/wallet/withdraw,/disputes/*routes. - Logs:
userId,ip,method,path,requestBody(sanitised — no passwords/tokens),responseStatus,timestamp. - Records stored in
audit_logsDB table (append-only, no DELETE route). -
GET /admin/audit-logs(admin) — paginated with filters byuserId,action, date range. - Integration test: admin action → audit log entry created.
Files: src/middleware/audit-log.middleware.ts, src/routes/admin.routes.ts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels