@cipherstash/protect@12.0.0
Major Changes
-
f743fcc: Upgrade
@cipherstash/protect-ffito0.23.0and the bundled CipherStash EQL extension toeql-2.3.1.Breaking upstream changes adopted in this release:
- Encrypt-config schema version:
buildEncryptConfignow emits{ v: 1, ... }(was{ v: 2, ... }). protect-ffi0.22.0started validating this field and rejects any value other than1with the newUNSUPPORTED_CONFIG_VERSIONerror code. - Storage and query payloads are now distinct types (protect-ffi
0.23.0): the previously-conflatedEncryptedtype splits intoEncrypted(storage-only,crequired) and a newEncryptedQuery(search terms — scalarunique/match/orelookups andste_vec_selectorJSON path queries; noc). JSON containment queries (ste_vec_term) still return a storage-shapedEncryptedpayload.encryptQuery/encryptQueryBulknow returnEncrypted | EncryptedQuery, and the stack'sEncryptedSearchTerm/EncryptedQueryResultunions widen to match.decryptrejects query payloads at the type level. The DynamoDBSearchTermsOperationnarrows via'hm' in termrather thanterm.hm. - SteVec encoding default flipped: protect-ffi's default
modeforste_vecindexes changed fromcompattostandard. The two encodings are not cross-compatible. Existing JSON-searchable data that was indexed undercompatwill need to be re-encrypted to be queryable. The stack adopts the newstandarddefault — there is no longer a way to pincompatfrom the SDK. - EQL extension bumped to
eql-2.3.1: the new SteVecstandardencoding requires matching support in the database EQL extension. The CLI's bundled SQL (packages/cli/src/sql/*.sql) and the@cipherstash/prisma-nextinstall bundle (migrations/20260601T0000_install_eql_bundle/ops.json+eql-install.generated.ts) are updated toeql-2.3.1. Databases installed with an older EQL extension must be reinstalled (stash db install) before containment / contained-by queries against SteVec columns will work.eql-2.3.1ships the_encrypted_check_cfix for SteVec storage payloads (cipherstash/encrypt-query-language#232). - New error codes:
ProtectErrorCode(re-exported from@cipherstash/protect-ffi) gainsMATCH_REQUIRES_TEXTandUNSUPPORTED_CONFIG_VERSION. Exhaustive switches overProtectErrorCodewill need additional cases. matchindex validation: protect-ffi now rejectsmatchindexes on columns whosecast_asis not text-family ('text'/'string') withMATCH_REQUIRES_TEXT. The stack'sfreeTextSearch()builder is unaffected because it only targets string-typed columns.Encryptedciphertext shape: protect-ffi'sEncryptedtype is now a discriminated union keyed onk('ct'for scalars,'sv'for SteVec). SteVec storage payloads now place the root document ciphertext atsv[0].c. The stack'sisEncryptedPayloadruntime check continues to work because storage payloads still carryc(scalar) orsv(SteVec). The DynamoDB helpers (toEncryptedDynamoItem,SearchTermsOperation) now narrow onkbefore reading variant-only fields.- Config-validation error message wording: error messages for config-validation failures now come from upstream
ConfigError.ProtectError.codevalues are preserved; consumers that string-match onerr.messagefor config-validation errors must update.
- Encrypt-config schema version:
Patch Changes
- Updated dependencies [f743fcc]
- @cipherstash/schema@3.0.0