-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Field Level Encryption
-
None
-
3
-
Iteration Grouper, Iteration Herring, Iteration Isopod
-
Needed
-
The driver key management API is closely based on mongosh’s, which in turn is based on the legacy shell’s. One difference that the drivers are introducing is that the .getKey() and .getKeyByAltName() methods return Document | null instead of a cursor, which is a sensible decision given that the result consists of either one or zero results.
Since this is a) the more sensible API choice and b) it aligns with the drivers, we should align with the driver API here as closely as possible.
In order to avoid a breaking change, could use a JS Proxy object to wrap the result document to still provide cursor methods when they are being accessed. That would only leave a question on what to do if no result was returned – either return null, which is a breaking change compared to current behavior, or a cursor Proxy for e.g. an empty document, which will be a breaking change if/when we remove the Proxy functionality and instead start returning null.
- is related to
-
MONGOSH-1556 Remove keyVault single-Document wrapping methods
- Closed