Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-699

Omit encryptionInformation in compact if no range fields are used

    • Not Needed

      Scope

      Only include encryptionInformation in compactStructuredEncryptionData if "range" fields are referenced.

      Background & Motivation

      Server 8.0 requires encryptionInformation for "range" (i.e. range V2, not "rangePreview").

      Server 7.0 prohibits encryptionInformation in compactStructuredEncryptionData. Attempting to send encryptionInformation results in:

      BSON field 'compactStructuredEncryptionData.encryptionInformation' is an unknown field.
      

      compactStructuredEncryptionData may be used for equality fields. It has a wrapper in mongosh. I expect it is not OK to break backwards compatibility for equality fields.

      To prevent breaking backwards compatibility for stable equality indexed fields, only send encryptionInformation in compactStructuredEncryptionData if "range" fields are referenced.

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

              Created:
              Updated:
              Resolved: