[P2] K03: Integrate approved at-rest encryption, KMS and recoverable backups #32

Open
opened 2026-10-21 20:29:31 +02:00 by amiryahaya · 0 comments
Owner

Backlog ID: K03 | Priority: P2 | Phase: M6 — Release evidence and approved deployment

Outcome and scope

Protect canonical/vector/original stores, WAL, temporary files, snapshots and backups with the authority-approved encryption/key-management architecture.

Dependencies and gates

Engineering prerequisites: #5 (K01), #2 (D01), #8 (F03), #22 (I05)

Requires D01 recovery/retention decisions and K01 approved KMS/module/profile. No custom encryption implementation.

Starting points

deploy/; crates/crypto-config/; docs/operations/backup-restore.md; tests/security/recovery/

These are current files or proposed responsibility boundaries; finalize a focused implementation plan before coding. Existing local scaffolding is uncommitted and is not evidence of completion.

Acceptance criteria

  • Keys are managed outside data stores/configuration using approved KMS/HSM, domain separation and least-privilege access.
  • Ciphertext/signatures retain algorithm/key/profile identifiers needed for controlled migration, verification and retirement.
  • Key rotation, crypto profile upgrade, dual-read/re-encryption where needed, rollback, key recovery/destruction and backup restore are exercised.
  • Restores preserve labels, policy/ACL state, citation provenance and audit integrity and meet approved RTO/RPO; backups follow retention/deletion policy.

Verification

Restore into an isolated approved environment; test missing/revoked keys, partial rotation and rollback, and verify unauthorized operators cannot decrypt.

Behavior changes follow Red → Green → Refactor. Run affected Rust shared contract/unit tests and real PostgreSQL/Qdrant/runtime integration tests where applicable; frontend changes run typecheck/build and the relevant browser tests. Record exact commands/results in the implementation PR. Documentation/decision tasks use recorded review evidence.

Requirements and design

FR-CRYPTO-005, 007, 009; FR-DATA-005; NFR-OPS-002; architecture §10.3–10.4

Sources: SRS, system design. Local planning context: docs/implementation-plan.md and docs/development-backlog.md (not published by this task).

Security impact: Use synthetic fixtures until approved for operational data. Preserve current authorization, markings, provenance and default-deny behavior; exclude protected payloads/secrets from operational telemetry. No classified-deployment or PQC-compliance claim is implied by closing this issue.

Parent roadmap: #1

**Backlog ID:** K03 | **Priority:** P2 | **Phase:** M6 — Release evidence and approved deployment ## Outcome and scope Protect canonical/vector/original stores, WAL, temporary files, snapshots and backups with the authority-approved encryption/key-management architecture. ## Dependencies and gates **Engineering prerequisites:** #5 (K01), #2 (D01), #8 (F03), #22 (I05) Requires D01 recovery/retention decisions and K01 approved KMS/module/profile. No custom encryption implementation. ## Starting points deploy/; crates/crypto-config/; docs/operations/backup-restore.md; tests/security/recovery/ These are current files or proposed responsibility boundaries; finalize a focused implementation plan before coding. Existing local scaffolding is uncommitted and is not evidence of completion. ## Acceptance criteria - [ ] Keys are managed outside data stores/configuration using approved KMS/HSM, domain separation and least-privilege access. - [ ] Ciphertext/signatures retain algorithm/key/profile identifiers needed for controlled migration, verification and retirement. - [ ] Key rotation, crypto profile upgrade, dual-read/re-encryption where needed, rollback, key recovery/destruction and backup restore are exercised. - [ ] Restores preserve labels, policy/ACL state, citation provenance and audit integrity and meet approved RTO/RPO; backups follow retention/deletion policy. ## Verification Restore into an isolated approved environment; test missing/revoked keys, partial rotation and rollback, and verify unauthorized operators cannot decrypt. Behavior changes follow Red → Green → Refactor. Run affected Rust shared contract/unit tests and real PostgreSQL/Qdrant/runtime integration tests where applicable; frontend changes run typecheck/build and the relevant browser tests. Record exact commands/results in the implementation PR. Documentation/decision tasks use recorded review evidence. ## Requirements and design FR-CRYPTO-005, 007, 009; FR-DATA-005; NFR-OPS-002; architecture §10.3–10.4 Sources: [SRS](https://forgejo.primatekun.tech/primatekuntech/rag-rust/src/branch/main/docs/SRS.md), [system design](https://forgejo.primatekun.tech/primatekuntech/rag-rust/src/branch/main/docs/architecture.md). Local planning context: `docs/implementation-plan.md` and `docs/development-backlog.md` (not published by this task). **Security impact:** Use synthetic fixtures until approved for operational data. Preserve current authorization, markings, provenance and default-deny behavior; exclude protected payloads/secrets from operational telemetry. No classified-deployment or PQC-compliance claim is implied by closing this issue. **Parent roadmap:** #1
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
primatekuntech/rag-rust#32
No description provided.