Allow keyAltName in encryptedFieldsMap

XMLWordPrintableJSON

    • 1
    • Hide

      DRIVERS-3325:
      Summary of necessary driver changes

      • Update libmongocrypt to 1.18
      • Copy spec tests

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      Show
      DRIVERS-3325 : Summary of necessary driver changes Update libmongocrypt to 1.18 Copy spec tests Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed) https://github.com/mongodb/specifications/pull/1853
    • Not Needed
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      This ticket was split from DRIVERS-3325, please see that ticket for a detailed description.


      Additional context, target user experience:

       TodaykeyAltName works in explicit encryption but not in encryptedFieldsMap:

      // explicit encryption — keyAltName supported today
      await clientEncryption.encrypt(value, {
        keyAltName: "ssn-key",
        algorithm: "Unindexed"
      });
      
      // auto encryption — keyAltName NOT supported, must use a UUID
      const client = new MongoClient(uri, {
        autoEncryption: {
          encryptedFieldsMap: {
            "mydb.users": {
              fields: [{ path: "ssn", bsonType: "string", keyId: new UUID("a5f3...") }]
            }
          }
        }
      });
      

      Proposed — allow keyAltName in encryptedFieldsMap to match the explicit encryption API:

      const client = new MongoClient(uri, {
        autoEncryption: {
          encryptedFieldsMap: {
            "mydb.users": {
              fields: [{ path: "ssn", bsonType: "string", keyAltName: "ssn-key" }]
            }
          }
        }
      });
      

            Assignee:
            Sergey Zelenov
            Reporter:
            TPM Jira Automations Bot
            Pavel Safronov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: