molecule-core/docs/architecture
rabbitblood 262a52a32c docs(security): document the KMS-rooted custody chain for SECRETS_ENCRYPTION_KEY
External architecture review flagged the SECRETS_ENCRYPTION_KEY env var
on the platform as encryption-at-rest theater. The reviewer read only
the platform repo and missed that the master key actually lives in AWS
KMS at the control plane layer, with envelope encryption wrapping each
tenant secret blob.

Adds docs/architecture/secrets-key-custody.md as the canonical source
of truth for the full chain:

- Two-mode envelope (KMS_KEY_ARN vs static-key fallback)
- Per-blob AES-256-GCM with KMS-wrapped DEKs
- Where each key actually lives (KMS, CP env, tenant env)
- Threat model per attacker capability
- Rotation story (annual KMS CMK rotation, manual DEK rotation on incident)
- Audit posture (SOC2 / ISO 27001 questionnaire bullets)

Patches three downstream docs that previously stopped at the env-var
level and link them to the new custody doc:

- development/constraints-and-rules.md (Rule 11)
- architecture/database-schema.md (workspace_secrets paragraph)
- architecture/molecule-technical-doc.md (env-vars table)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 11:29:16 -07:00
..
architecture.md chore: open-source restructure — rename dirs, remove internal files, scrub secrets 2026-04-18 00:24:44 -07:00
backends.md docs: testing strategy + PR hygiene + backend parity matrix + boot-event postmortem (#1824) 2026-04-23 19:59:38 +00:00
canary-release.md docs(security): move sensitive runbooks to private internal repo 2026-04-22 22:39:23 +00:00
database-schema.md docs(security): document the KMS-rooted custody chain for SECRETS_ENCRYPTION_KEY 2026-04-26 11:29:16 -07:00
event-log.md initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
memory.md initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
molecule-technical-doc.md docs(security): document the KMS-rooted custody chain for SECRETS_ENCRYPTION_KEY 2026-04-26 11:29:16 -07:00
org-api-keys.md docs: strip internal roadmap/followups from public org-api-keys docs 2026-04-20 14:31:46 -07:00
overview.md fix(docs): update architecture + API reference paths for workspace-server rename 2026-04-18 01:25:21 -07:00
partner-api-keys.md docs: Partner API Keys architecture + Phase 34 plan 2026-04-17 14:07:50 -07:00
provisioner.md initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
saas-prod-migration-2026-04-19.md docs: 2026-04-19 SaaS prod migration notes 2026-04-19 02:29:31 -07:00
secrets-key-custody.md docs(security): document the KMS-rooted custody chain for SECRETS_ENCRYPTION_KEY 2026-04-26 11:29:16 -07:00
staging-environment.md docs: staging environment design + Phase 36 plan 2026-04-17 20:37:11 -07:00
technology-choices.md initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
tenant-image-upgrades.md chore: open-source preparation — scrub secrets, add community files 2026-04-18 00:10:56 -07:00
wildcard-dns-proxy.md chore: final open-source cleanup — binary, stale paths, private refs 2026-04-18 00:38:55 -07:00
workspace-tiers.md initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00