Skip to content

fix(security): implement audit logging for sensitive operations#435

Open
JosephOnuh wants to merge 1 commit into
AnnabelJoe:mainfrom
JosephOnuh:fix/341-audit-logging
Open

fix(security): implement audit logging for sensitive operations#435
JosephOnuh wants to merge 1 commit into
AnnabelJoe:mainfrom
JosephOnuh:fix/341-audit-logging

Conversation

@JosephOnuh
Copy link
Copy Markdown
Contributor

Closes #341

Changes

  • audit_logs table: id, timestamp, actor, action, resource, resource_id, ip, metadata
  • Append-only: UPDATE/DELETE revoked at DB level
  • writeAuditLog() utility in src/lib/audit.ts
  • Readings route logs: reading.submitted, reading.anchored, certificate.minted
  • Admin API: GET /api/admin/audit-logs (paginated, service_role only)
  • Supabase migration: supabase/migrations/20260601000000_create_audit_logs.sql

…belJoe#341)

- audit_logs table: id, timestamp, actor, action, resource, resource_id, ip, metadata
- Append-only: UPDATE/DELETE revoked at DB level
- writeAuditLog() utility in src/lib/audit.ts
- readings route logs: reading.submitted, reading.anchored, certificate.minted
- Admin API: GET /api/admin/audit-logs (paginated, service_role only)
- Supabase migration: supabase/migrations/20260601000000_create_audit_logs.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement audit logging for all sensitive operations

1 participant