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

Update Ambiguous Top-Level Storage Error For CSLE remove_alt_name

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • Client Side Encryption
    • None
    • Not Needed

    Description

      Summary

      Top-level dollar signs are not supported in mongodb versions < 4.2, per the legacy documentation. A recent change to key management API (in DRIVERS-2017) added a dependency on aggregation pipeline style update operators which are not supported until 4.2. Apps that attempt to use removeKeyAltName() on MongoDB <4.2 will receive a cryptic error like this:

      The dollar ($) prefixed field '$set' in '0.$set' is not valid for storage.
      

      This particular error will occur when running something like the following for a mongodb version < 4.2:

      def remove_alt_name(name):
          return coll.find_one_and_update({"keyAltNames": name}, [{"$set": { "x": 1 }}])
      

      One potential update could ensure the resulting error reads

      FLE requires mongodb version 4.2+: The dollar ($) prefixed field '$set' in '0.$set' is not valid for storage.
      

      Motivation

      Who is the affected end user?

      Anyone using version < 4.2 for aggregating data.

      How does this affect the end user?

      Cosmetic, clearer error messages for resolution.

      Attachments

        Activity

          People

            Unassigned Unassigned
            preston.vasquez@mongodb.com Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: