Skip to content

docs(adrs): add encryption & secrets-management ADR set (ADR-023…029) - #154

Merged
tradem merged 2 commits into
mainfrom
docs/encryption-secrets-adr-set
Aug 1, 2026
Merged

docs(adrs): add encryption & secrets-management ADR set (ADR-023…029)#154
tradem merged 2 commits into
mainfrom
docs/encryption-secrets-adr-set

Conversation

@tradem

@tradem tradem commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

Adds seven Architecture Decision Records covering encryption, secrets management, and GDPR erasure for breakdown-rs, produced in response to backend/prompts/encryption-secrets-adr-prompt.md. Each ADR recommends one concrete open-source, docker-compose-hostable primary tool and marks others as alternatives, per the prompt's constraints (no paid SaaS, no manual user-side setup, EventStore carries only secret references).

ADRs

ADR Decision (recommended primary)
ADR-023 LUKS2 block-device encryption under Postgres + SierraDB + Garage; pg_dump/snapshots re-encrypted
ADR-024 Native TLS on every DB link, certs from self-hosted step-ca; stunnel sidecar for SierraDB (flagged assume)
ADR-025 Caddy edge proxy with built-in ACME; api is Docker-internal only
ADR-026 Arch VPS hardening baseline; nftables, key-only SSH, userns-remap, auditd, honest manual weekly patching SLA
ADR-027 HashiCorp Vault (Transit + kv-v2); events carry only vault_key_id references; crypto-shredding exit ramp
ADR-028 settings:manage_external_credentials capability for Costume Designer + Costume Assistant, // AUTHZ-GATE: in-handler pattern + INSERT-only audit
ADR-029 Layered Art. 17 strategy: crypto-shred DEKs + tombstone projection delete + bounded retention/compaction

Key honest caveats (called out rather than glossed)

  • SierraDB RESP3 TLS support unverified in tqwewe/sierradb:0.3.1stunnel sidecar recommended until confirmed.
  • Arch rolling release has no unattended-upgrades → a documented, owned manual weekly patching SLA with a bounded exposure window.
  • FDE remote-unlock impractical on cheap VPS → LUKS scoped to data volumes only, rootfs left unencrypted.
  • The immutable event log cannot be retroactively rewritten inside the retention window → crypto-shredding + projection-side erasure + post-retention compaction is the defensible Art. 17 strategy, with the limit stated for the privacy notice / DPA.

Role naming

Uses the codebase's English domain language from crates/core/src/membership/mod.rs (Role::CostumeDesigner, Role::CostumeAssistant) rather than the German terms, with the German gloss kept parenthetically where it aids readability. Both Costume Designer and Costume Assistant may save external credentials (GDrive / AI tokens) per ADR-027/028.

Index

backend/docs/architecture/adrs/README.md gains the seven new rows and extends the attribution note to cover the ADR-023…029 co-authorship.

Pre-commit checks

  • gitleaks: no leaks found ✅
  • commit-message format validation: valid ✅

Co-authored-by: glm-5.2 (neuralwatt)

Add seven ADRs addressing the encryption-secrets-adr-prompt, plus a
README index update:

- ADR-023 — Database encryption at rest (LUKS2 under Postgres + SierraDB
  + Garage; dumps/snapshots re-encrypted)
- ADR-024 — Database encryption in transit (native TLS + self-hosted
  step-ca; stunnel sidecar for SierraDB, flagged "assume")
- ADR-025 — HTTPS edge (Caddy with built-in ACME; api Docker-internal only)
- ADR-026 — Arch Linux VPS hardening baseline (nftables, key-only SSH,
  userns-remap, auditd, honest manual weekly patching SLA)
- ADR-027 — Secrets vault for external credentials (HashiCorp Vault;
  events carry only vault_key_id references; crypto-shredding exit ramp)
- ADR-028 — Access control for the Costume Designer / Costume Assistant
  Settings Aggregates view (// AUTHZ-GATE: capability + INSERT-only audit)
- ADR-029 — GDPR Art. 17 right-to-erasure in an append-only event-sourced
  system (crypto-shred + tombstone projection delete + retention/compaction)

README.md gains the seven new rows; the attribution note is extended to
cover the ADR-023…029 co-authorship with glm-5.2 (neuralwatt).

Co-authored-by: glm-5.2 (neuralwatt)
…ge in-transit TLS

ADR-023 — resolve the "assume" flag on Garage at-rest capability using the
upstream encryption cookbook: Garage v1.0.1 stores object bytes in plaintext
(no SSE-S3); LUKS is the only Garage-native at-rest path and is what we ship.
SSE-C is documented as optional defense-in-depth, scoped to a separate
code-change follow-up.

ADR-024 — Garage has no built-in TLS on its S3 endpoint (confirmed upstream).
Add the API↔Garage link to the in-transit decision: front Garage with the
Caddy reverse proxy (ADR-025) on a Docker-internal TLS port, pinned step-ca
root; Garage's plaintext :3900 stays Docker-internal only. Startup config
check extended to reject an http:// S3_ENDPOINT in production.

Co-authored-by: glm-5.2 (neuralwatt)
@tradem
tradem merged commit 21458d1 into main Aug 1, 2026
6 checks passed
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.

1 participant