fetch_ml/internal/audit
Jeremie Fraeys 1c7205c0a0
feat(audit): add HTTP audit middleware and tamper-evident logging
Comprehensive audit system for security and compliance:

- middleware/audit.go: HTTP request/response auditing middleware
  * Captures request details, user identity, response status
  * Chains audit events with cryptographic hashes for tamper detection
  * Configurable filtering for sensitive data redaction

- audit/chain.go: Blockchain-style audit log chaining
  * Each entry includes hash of previous entry
  * Tamper detection through hash verification
  * Supports incremental verification without full scan

- checkpoint.go: Periodic integrity checkpoints
  * Creates signed checkpoints for fast verification
  * Configurable checkpoint intervals
  * Recovery from last known good checkpoint

- rotation.go: Automatic log rotation and archival
  * Size-based and time-based rotation policies
  * Compressed archival with integrity seals
  * Retention policy enforcement

- sealed.go: Cryptographic sealing of audit logs
  * Digital signatures for log integrity
  * HSM support preparation
  * Exportable sealed bundles for external auditors

- verifier.go: Log verification and forensic analysis
  * Complete chain verification from genesis to latest
  * Detects gaps, tampering, unauthorized modifications
  * Forensic export for incident response
2026-03-08 13:03:02 -04:00
..
platform feat(security): add audit subsystem and tenant isolation 2026-02-26 12:03:45 -05:00
alert.go feat(security): add audit subsystem and tenant isolation 2026-02-26 12:03:45 -05:00
audit.go feat(audit): add HTTP audit middleware and tamper-evident logging 2026-03-08 13:03:02 -04:00
chain.go feat(audit): add HTTP audit middleware and tamper-evident logging 2026-03-08 13:03:02 -04:00
checkpoint.go feat(audit): add HTTP audit middleware and tamper-evident logging 2026-03-08 13:03:02 -04:00
rotation.go feat(audit): add HTTP audit middleware and tamper-evident logging 2026-03-08 13:03:02 -04:00
sealed.go feat(audit): add HTTP audit middleware and tamper-evident logging 2026-03-08 13:03:02 -04:00
verifier.go feat(audit): add HTTP audit middleware and tamper-evident logging 2026-03-08 13:03:02 -04:00