Skip to main content
PostgreSQL-Layer Controls • v1.0.0

MARPP

Hash-chained provenance and database-layer retention controls

Named evidence content and dedicated audit-log tables are protected against update and delete at the PostgreSQL layer, and trust-artifact provenance is recorded as a hash-chained record trail.

UPDATE/DELETE
DB-Layer Protection
5 Tables
Append-Only Logs
10 MB
Size Limit
SHA-256
Provenance Chain

Why Immutability Matters

Without MARPP

  • ✗Evidence can be modified after creation (tampering)
  • ✗Audit logs can be deleted to hide incidents
  • ✗Evidence provenance becomes harder to verify
  • ✗Framework-mapped evidence review is harder to defend

With MARPP

  • ✓Named evidence content columns are locked against update
  • ✓Protected audit-log tables are append-only
  • ✓Enforcement lives at the database layer, not only application code
  • ✓Supports framework-mapped review; mapping is not certification

How MARPP Works

MARPP uses PostgreSQL triggers and constraints to enforce retention controls at the database level, so the enforcement path does not depend on application code alone.

1. Evidence Immutability

Locks content and evidenceHash fields after creation. Metadata can update (access tracking), but evidence cannot.

// ✓ Allowed
create(evidence)
// ✗ Blocked
update(content)

2. Append-Only Logs

Blocks UPDATE and DELETE operations on protected audit log tables. Only INSERT operations are allowed there.

// ✓ Allowed
insert(auditLog)
// ✗ Blocked
update(auditLog)
delete(auditLog)

3. Size Limits

Limits evidence artifacts to 10 MB and CI payloads to 5 MB. Prevents database bloat and storage abuse.

Evidence: 10 MB max
CI Payload: 5 MB max
// Use S3 for larger files

Compliance Alignment

MARPP maps to evidence-integrity expectations in common compliance frameworks. Mapping is not certification.

FrameworkRequirementMARPP Control
SOC 2CC7.2 - System monitoringAppend-only audit logs
SOC 2CC8.1 - Change managementEvidence immutability
ISO 27001A.12.4.1 - Event loggingAudit log protection
ISO 27001A.18.1.3 - Protection of recordsEvidence immutability
GDPRArticle 32 - Security of processingIntegrity guarantees

Database-Level Enforcement

PostgreSQL triggers enforce rules on the protected tables for connections that reach them: API, admin tools, scripts

Evidence Immutability Trigger

CREATE TRIGGER evidence_immutability_trigger
  BEFORE UPDATE ON "compliance_evidence_artifacts"
  FOR EACH ROW
  EXECUTE FUNCTION prevent_evidence_mutation();

Why Database-Level?

  • Application code can have bugs
  • Developers can accidentally bypass checks
  • Database-layer controls apply to covered tables, independent of application code
  • Constraints are enforced where the records are stored

Protected Tables

  • • AuditLog
  • • audit_logs
  • • admin_audit_logs
  • • assessment_access_logs
  • • kill_switch_audit_logs

Who Needs MARPP?

SOC 2 Audits

Auditors require tamper-evident evidence and audit logs. MARPP provides cryptographic integrity records.

Regulated Industries

Healthcare, finance, and government teams often need tamper-evident audit trails. MARPP maps to evidence-integrity expectations; mapping is not certification.

Enterprise Security

Security teams need confidence that incident evidence is protected against post-hoc modification.

MARPP Evidence Package is in the ASSURE Plan

Hash-chained provenance records, protected audit-log tables, and integrity checking where supported.

Frequently Asked Questions

Can I modify evidence content?

No. Named evidence content and evidenceHash fields are locked against update after creation. Create new evidence instead and link to the old record with the supersededBy field.

Can I delete evidence?

Deletion follows the retention lifecycle. Modification of protected fields is blocked to preserve tamper-evidence.

Can I modify audit logs?

No. Protected audit-log tables are append-only: updates and deletes are blocked at the database layer.

What happens if I exceed size limits?

The database will reject the INSERT with a constraint violation error. Use external storage for larger artifacts.

Can I bypass MARPP in application code?

MARPP protections are enforced at the database layer on the protected tables and columns, so application-layer code does not own the enforcement path.