Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2302

Add FLE 2 API to ClientEncryptionOpts

    • Needed
    • Hide

      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.

      Show
      Please see these specifications PRs for the detailed changes and new prose tests: https://github.com/mongodb/specifications/pull/1200 https://github.com/mongodb/specifications/pull/1218 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.
    • $i18n.getText("admin.common.words.hide")
      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
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } 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

      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.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: