1. What would you like to communicate to the user about this feature?
I want the user to know about libmongocrypt and that linux users should use the environment variable LIBMONGOCRYPT_PATH to specify the path to a manually installed libmongocrypt library.
2. Would you like the user to see examples of the syntax and/or executable code and its output?
no code example needed.
3. Which versions of the driver/connector does this apply to?
This would most likely target the next release; 2.26
We would like to have a section under our C# CSFLE docs talking about libmongocrypt as below; I copied the Ruby docs for this and adapted a bit for our needs.
Libmongocrypt
Libmongocrypt is a C library utilized by the driver for client-side encryption. To enable client-side encryption, you must install the libmongocrypt library on the machine running your application. The driver includes the MongoDB.libmongocrypt NuGet package, which bundles libmongocrypt libraries for various operating systems. However, on Linux systems, the bundled libmongocrypt library does not use the system’s native encryption providers due to OpenSSL versioning issues. For high-performance applications on Linux, it is recommended to manually install the libmongocrypt library and specify its path to the driver using the LIBMONGOCRYPT_PATH environment variable. This is only recommended for users on linux systems.
You can download a pre-built binary distribution of libmongocrypt and manually place the required shared object on your computer, as follows:
- Download a tarball of all libmongocrypt variations here.
- Extract the file you downloaded. You will see a list of directories, each corresponding to an operating system. Find the directory that matches your operating system and open it.
- Inside that folder, open either the lib or lib64 folder, you will find the libmongocrypt.so or libmongocrypt.dylib or libmongocrypt.dll file, depending on your OS.
- Move that file to wherever you want to keep it on your machine. You may delete the other files included in the tarball.
To build the binary from source:
Once you have the libmongocrypt binary on your machine, specify the path to the binary using the LIBMONGOCRYPT_PATH environment variable. It is recommended that you add this variable to your rc files.
For example:
export LIBMONGOCRYPT_PATH=/absolute/path/to/your/libmongocrypt.so