fix(store): validate WORM/ledger key length from the vault #239

Merged
KofTwentyTwo merged 1 commits from story/m6-vault-key-length into dev 2026-07-30 03:19:15 +00:00
1 Commits
Author SHA1 Message Date
James Maes 9b35e8b138 fix(store): validate WORM/ledger key length from the vault
Mirror the existing storage-key length check for the WORM audit and
filter-ledger HMAC keys: resolve_engine_keys now converts each key's
Vec<u8> into a Zeroizing<[u8; 32]>, failing closed with a distinct
DatabaseError::KeyProvisioning message when a vault entry decodes to
the wrong length. Previously only the storage key was validated, so a
corrupted or hand-edited vault entry of any length would be silently
accepted as an HMAC signing key.

Refs #200
2026-07-29 22:16:45 -05:00