No reviewers
Labels
No labels
architecture
code-quality
correctness
critical
docs
high
low
medium
ops
performance
privacy
security
tests
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
antrapol/CA-MDID-eMudhra!54
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/a6-ca-key-protection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Batch A6: #3 key encryption at rest, #29 issuer store
#3 — new
MdidWs.KeyVault: every stored private key (Root/Sub CA, OCSP responder, JWT signing key) is AES-256-GCM encrypted underMDID_KEY_ENCRYPTION_KEY(required in prod; fixed non-secret key for dev/test). Ciphertext is bound to table + row id. Boot runsmigrate_stores!/0: upgrades legacy plaintext rows, re-encrypts rows underMDID_KEY_ENCRYPTION_KEY_PREVIOUS(rotation), then dumps the Mnesia log. Plaintext is accepted only by the migration, never on normal reads. Runbook:docs/key-management.md.#29 —
Issuerstore usessync_transaction,wait_for_tableson init, and a protocol-conformantfind(context, {:by_type, t}, opts);IssuerManagergoes through the facade (:ambiguous_issueron duplicates).Not done
runtime.exsenv parsing has no automated test.Breaking
Prod needs
MDID_KEY_ENCRYPTION_KEY(openssl rand -base64 32) in.env; compose andstart-docker-prod.shrefuse to start without it.Review
Pass 1 (ponytail) and Pass 2 (correctness) done; fixed: empty
PREVIOUScrashing compose boot, plaintext accepted forever,:safedecode on cold VM, dead find branches, log dump, duplicated dev/test key. Fixes were not re-reviewed by a second Pass 1.Tests / coverage
280/282 pass; the 2 failures are pre-existing live-site
TrustgateLifecycleTest.KeyVault93.8%, project total 73.8%. Issuer/SigningKey protocol impls were 55%/60% at the first coverage run (unchanged paths dominate).🤖 Generated with Claude Code