5 / 5
Mar 26

Hi,

We are using Client-Side Field Level Encryption (CSFLE) with explicit encryption in a MongoDB Atlas environment, utilizing Azure Key Vault as the Key Management Service (KMS) provider. Our connection to MongoDB is authenticated via certificates.

We have observed delays during the decryption of the encrypted document in our applicaltion. We noticed that the libmongocrypt driver version 1.12.0 introduced a new flag, mongocrypt_setopt_key_expiration, which allows extending the DEK cache duration from the default 60 seconds.

However, we are unable to implement this using the MongoDB.Driver for .NET (v2.30). The ExtraOptions property in the AutoEncryptionSettings class, which is used to configure client communication with MongoDB, only accepts the following flags:

  • cryptSharedLibPath
  • cryptSharedLibRequired
  • mongocryptdURI
  • mongocryptdBypassSpawn
  • mongocryptdSpawnPath
  • mongocryptdSpawnArgs

Could you please advise on how to use the mongocrypt_setopt_key_expiration flag within these settings, or suggest an alternative approach to extend the DEK cache duration?

Thank in advance!

Regards,

UB

19 days later

Thanks for the update! It looks like the JIRA ticket CSHARP-5205 is now closed.

Does this mean that the MongoDB C# Driver has now been updated with this option?

I do see another referenced JIRA Ticket DRIVERS-2781 in Implementing status and couldn’t understand whether the issue is now resolved.

@UB_K

We close tickets when we’re done with the task related to the ticket, not when the code is available in a release. In this case the new option will be released in next version, 3.3.0.