[DRIVERS-2302] Add FLE 2 API to ClientEncryptionOpts Created: 28/Apr/22  Updated: 20/Jan/23  Resolved: 20/Jan/23

Status: Closed
Project: Drivers
Component/s: Client Side Encryption
Fix Version/s: None

Type: Spec Change Priority: Unknown
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Done Votes: 0
Labels: size-medium, spec-change
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Gantt End to End
has to be finished together with DRIVERS-2371 Require contentionFactor for "Indexed... Closed
Issue split
split to JAVA-4597 Support queryable encryption in Clien... Closed
split to CXX-2502 Add Queryable Encryption API to Clien... Closed
split to PHPC-2092 ClientEncryption options for queryabl... Closed
split to CDRIVER-4372 Add Queryable Encryption API to Clien... Closed
split to CSHARP-4157 Add FLE 2 API to ClientEncryptionOpts Closed
split to GODRIVER-2400 Add Queryable Encryption API to Clien... Closed
split to MOTOR-953 Add FLE 2 API to ClientEncryptionOpts Closed
split to NODE-4220 Add FLE 2 API to ClientEncryptionOpts Closed
split to PYTHON-3245 Add FLE 2 API to ClientEncryptionOpts Closed
split to RUBY-2980 Add FLE 2 API to ClientEncryptionOpts Closed
split to RUST-1301 Add FLE 2 API to ClientEncryptionOpts Closed
Epic Link: DRIVERS-1949
Driver Changes: Needed
Server Compat: 6.0
Quarter: FY23Q2
Downstream Changes Summary:

Please see these specifications PRs for the detailed changes and new prose tests:

Please see the Go driver implementation for reference.

Bindings changes

Upgrade libmongocrypt dependency to 1.5.0. Drivers can use 1.5.0-alpha1 to test. Binaries are available from this upload-all task.

Update the bindings to libmongocrypt to add the new functions: mongocrypt_ctx_setopt_index_type, mongocrypt_ctx_setopt_query_type, and mongocrypt_ctx_setopt_contention_factor.

Driver changes

Add the new driver API options: EncryptOpts.queryType and EncryptOpts.contentionFactor.

Pass EncryptOpts.queryType to libmongocrypt with mongocrypt_ctx_setopt_query_type.

Pass EncryptOpts.contentionFactor to libmongocrypt with mongocrypt_ctx_setopt_contention_factor.

If EncryptOpts.algorithm is "Indexed", call mongocrypt_ctx_setopt_index_type(ctx, MONGOCRYPT_INDEX_TYPE_EQUALITY).

If EncryptOpts.algorithm is "Unindexed", call mongocrypt_ctx_setopt_index_type(ctx, MONGOCRYPT_INDEX_TYPE_NONE).

Test changes

Add new prose tests for FLE 2.0 explicit encryption.

Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4372 Fixed 1.22.0, 1.22.0-beta0
CXX-2502 Done 3.8.0
CSHARP-4157 Fixed 2.16.0
GODRIVER-2400 Fixed 1.10.0, 1.10.0-beta1
JAVA-4597 Fixed 4.7.0
NODE-4220 Done mongodb-client-encryption-2.2.0
MOTOR-953 Duplicate
PYTHON-3245 Fixed 4.2
PHPC-2092 Fixed 1.14.0-beta1, 1.14.0
RUBY-2980 Fixed 2.18.0
RUST-1301 Duplicate
SWIFT-1558 Duplicate

 Description   

Summary

Add new options to EncryptOpts:

  • queryType
  • contentionFactor

Add values to EncryptOpts.algorithm:

  • "Indexed"
  • "Unindexed"

Add tests for the new explicit encryption and decryption behavior.

Motivation

Is this issue urgent?

Yes. This is a 6.0 requirement.

Is this ticket required by a downstream team?

Shell.

Is this ticket only for tests?

No.



 Comments   
Comment by Githook User [ 17/May/22 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: DRIVERS-2302 add missing test setup step (#1218)

key1Document must be inserted with majority write concern.
Branch: master
https://github.com/mongodb/specifications/commit/42cbd2109cd24fe96fa19c485231f83a152f4fd8

Comment by Githook User [ 04/May/22 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: DRIVERS-2302 Add FLE 2 API to EncryptOpts (#1200)

  • add FLE 2 algorithm values, contentionFactor, and queryType
Generated at Thu Feb 08 08:25:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.