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

Add FLE 2 API to ClientEncryptionOpts

    XMLWordPrintable

Details

    • 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.

    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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: