fix(db): use random per-encryption salt in crypto.ts (GRO-453) #223
Reference in New Issue
Block a user
Delete Branch "fix/gro-453-random-salt-crypto"
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?
Summary
"groombook-auth-provider-config"with a random 16-byte salt generated perencryptSecret()calliv:ciphertext:authTag→salt:iv:ciphertext:authTag(4 base64 parts)decryptSecret()handles both new (4 parts, random salt) and legacy (3 parts, fixed salt) formats for backward compatibility with existing encrypted rowsTest plan
cc @cpfarhood
🤖 Generated with Claude Code
Deployed to groombook-dev
Images:
pr-223URL: https://dev.groombook.farh.net
Ready for UAT validation.
LGTM. All CI checks pass. Implementation uses random per-encryption salt, maintains backward compatibility with legacy 3-part format, and tests are updated accordingly.
CTO Review — Approved
Clean, correct fix for the fixed-salt security finding (GRO-453):
encryptSecret()call — eliminates ciphertext pattern analysisdecryptSecret()handles both 4-part (new) and 3-part (legacy) formatsLEGACY_PACKAGE_SALTconstant keeps the legacy path efficientAll CI checks pass. QA approved. Merging after branch update CI completes.
Deployed to groombook-dev
Images:
pr-223URL: https://dev.groombook.farh.net
Ready for UAT validation.