Skip to content

Implement audit log table and service` #52

Description

@Nemenwq

Dependencies: Issue #27, Issue #28.

Context:
Sensitive actions must be recorded for security and compliance.

Tasks:

  • Create an audit_logs table/entity with fields:
    • id, merchant_id (nullable), actor_type, actor_id (nullable), action, target_type, target_id, metadata, created_at
  • Add a lightweight audit log service with helper methods.
  • Log at least:
    • API key create/revoke
    • webhook create/delete
    • withdrawal request

Implementation Notes:

  • Don’t log secrets (API keys, webhook secrets) — log identifiers and metadata only.

Scope:

  • In scope: DB table + service + usage in endpoints.
  • Out of scope: Admin UI.

Files: backend/api_gateway/src/audit/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions