[MONGOCRYPT-90] Simplify the find filter for datakeys Created: 23/May/19  Updated: 13/Feb/20  Resolved: 15/Oct/19

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When a mongocrypt_ctx_t is in the state MONGOCRYPT_CTX_NEED_MONGO_KEYS, the context provides a filter to query the key vault collection.

Currently, this filter will include an empty $in array for _id or keyAltNames in cases that one isn't necessary. E.g.

{"$or": [{"_id": {"$in": [ UUID(...) ] }}, {"keyAltName": {"$in": []}}]}

Instead, in cases where we have one or the other empty, we should simplify the filter:

{"_id": {"$in": [ UUID(...) ] }}}


Generated at Thu Feb 08 09:07:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.