Details
-
Task
-
Status: Closed
-
Unknown
-
Resolution: Fixed
-
None
-
None
Description
When encrypting a value to store in a document, both key_id and index_key_Id are required. The explicit Queryable Encryption doc example only uses key_id, it needs to utilize index_key_Id too:
# Create and encrypt an indexed and unindexed value. |
val = "encrypted indexed value" |
unindexed_val = "encrypted unindexed value" |
insert_payload_indexed = client_encryption.encrypt(val, Algorithm.INDEXED, indexed_key_id) |
insert_payload_unindexed = client_encryption.encrypt(unindexed_val, Algorithm.UNINDEXED, |
unindexed_key_id)
|
For a correct example see the test Kevin is adding here: https://github.com/mongodb/specifications/pull/1249/files#diff-c57f446f49351e6f7432a2d3028c880a728f1a33031510a7c376aed157d6de00R1786