[P0] Audit Log infrastructure (immutable append-only) #7

Open
opened 2026-05-26 01:32:40 +00:00 by ChrisChen · 0 comments
Owner

Overview

All sensitive operations must be logged in an immutable append-only audit log that cannot be deleted.

Fields

timestamp, actor_id, actor_role, action (CREATE/UPDATE/DELETE/LOGIN), resource_type, resource_id, before_snapshot (JSON), after_snapshot (JSON), ip_address, user_agent

Tasks

  • Create AuditLog table (bigint PK, no delete allowed)
  • Build AuditService that wraps all sensitive DB writes and auto-logs changes
  • Audit Log viewer (super_admin + pastor only, read-only)
  • Archive-only strategy (no physical deletes ever)

Reference

PLANNING.md Section 3.8 - Audit Log

## Overview All sensitive operations must be logged in an immutable append-only audit log that cannot be deleted. ## Fields timestamp, actor_id, actor_role, action (CREATE/UPDATE/DELETE/LOGIN), resource_type, resource_id, before_snapshot (JSON), after_snapshot (JSON), ip_address, user_agent ## Tasks - [ ] Create AuditLog table (bigint PK, no delete allowed) - [ ] Build AuditService that wraps all sensitive DB writes and auto-logs changes - [ ] Audit Log viewer (super_admin + pastor only, read-only) - [ ] Archive-only strategy (no physical deletes ever) ## Reference PLANNING.md Section 3.8 - Audit Log
ChrisChen added this to the Phase 0 - Tech Foundation and DevOps milestone 2026-05-26 01:32:40 +00:00
ChrisChen added the module: audit-log label 2026-05-26 01:32:40 +00:00
Sign in to join this conversation.