[DRIVERS-2352] EncryptOpts queryType should accept a string consistent with queryType in encryptedFields Created: 09/Jun/22 Updated: 17/Jun/22 |
|
| Status: | Implementing |
| Project: | Drivers |
| Component/s: | Client Side Encryption |
| Fix Version/s: | None |
| Type: | Spec Change | Priority: | Unknown |
| Reporter: | Jeremy Mikola | Assignee: | Kevin Albertson |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Changes: | Needed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Downstream Changes Summary: | Bindings ChangesUpgrade to libmongocrypt 1.5.0-rc2. Binaries can be downloaded from the upload-all task. Bindings in the libmongocrypt repository were updated in MONGOCRYPT-414. Drivers with bindings outside of the libmongocrypt repo will need to update bindings code. Replace calls of mongocrypt_ctx_setopt_index_type with mongocrypt_ctx_setopt_algorithm. Update calls of mongocrypt_ctx_setopt_query_type to use the string "equality". Driver ChangesChange EncryptOpts.QueryType from an enum to a string. See the specification change here: https://github.com/mongodb/specifications/commit/cb58ded938146fcbce2b04a91d09f72d66832603. See the C driver changes for reference: https://github.com/mongodb/mongo-c-driver/commit/fe2bae72bc733515d766a46a8799783667396590 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Compliance: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
SummaryEncryptOpts currently defines the queryType option as an enum. Drivers should change the option to accept a string value, which would more easily allow for forward compatibility (a libmongocrypt version bump would likely be required, but drivers would not necessarily need to be changed). This would be similar to what is done for Read Concern level, where drivers provide an enum but also accept string values for forward compatibility. This would depend on Ideally, the string value accepted for queryType should be consistent with the queryType option accepted by the server in an encryptedFields document. Then, users could utilize the same constant defined by drivers for use with EncryptOpts. MotivationWho is the affected end user?Users of queryable encryption. How does this affect the end user?Making the string consistent between encryptedFields and EncryptOpts would be a boon for users. How likely is it that this problem or use case will occur?Users may be confused if encryptedFields and EncryptOpts accept different values for the queryType option. If the problem does occur, what are the consequences and how severe are they?Immediate error message for an invalid option. Is this issue urgent?Ideally before 6.0-compat stable driver releases. Is this ticket required by a downstream team?May be relevant to mongosh. Is this ticket only for tests?No. |
| Comments |
| Comment by Githook User [ 17/Jun/22 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message: DRIVERS-2352 use a string for QueryType (#1252) |