CSFLE: Cryptd in containerised Nodejs application

I am using Mongoose to use CSFLE to encrypt the data on rest. Do we have any recommendation or blog to use cryptd in docker container?

Hi @Mohit_Talniya,

Apologies for the late response.

You can consider using crypt_shared library - one being that it does not require you to spawn another process to perform automatic encryption. You can place this file and point the driver to use it. Please refer to the linked Quick Start documentation to learn more about it.

Meanwhile, here is the quick example for your reference:

MongoClient( <uri>, {
  autoEncryption: {
    extraOptions: {
      cryptSharedLibPath: ...

cryptSharedLibPath: “/home/node/demo/crypt_shared/lib/mongo_crypt_v1.so”,

Also, please ensure that you are aware of the OS where your Docker container is being hosted and you can download the crypt_shared for the same.

Best regards,

@Kushagra_Kesav Thanks for your reply. Shared library is fine, but installation requirement mentions to install * Install [MongoDB Enterprise Edition version 4.2 or later.] And I checked without it CSFLE is not working.
Are you sure only installing shared library is sufficient?