CSFLE key rotation: how to update the CMK in the DEK that references an updated version

Hi! Thanks for raising this issue. First, could you please provide all of the information specified in our README, and furthermore, it would be super helpful if you could provide a code snippet that shows what you are attempting to do right now. From my understanding of what rewrap_many_data_key does, all you need to do is update the data key, not re-encrypt the old data with that new data key. So, all you have to do to rotate keys is:

key_vault.rewrap_many_data_key({}, {
  provider: 'azure',
  master_key: {
    # put the rest of your master_key options here
    "key": "<your new key>"
  }
})

The first argument is the filter–so if you only want to update some of the data keys, use that. More info can be found here: https://www.mongodb.com/docs/rapid/reference/method/KeyVault.rewrapManyDataKey/