Hi,
I’m trying to perform automatic client-side field level encryption using mongoDB Enterprise Server 4.2 (ultimately Mongo Atlas 4.2 Cluster) and Node mongo driver version 3.6.1.
I’ve already tested connections and installations by performing the same routine using both servers associated with a compatible mongo shell script.
When using the node driver, I see that the mongocryptd
starts but the encryption doesn’t actually occur.
I have two different behaviours depending on how I use the schema
. When I JSON.stringify
it before inserting a document, the insertion results in success but no encryption is performed and the data is saved as plain text.
If I initialise the client with the JS object for the schema, I get the following error:
MongoError: Array elements must have type BinData, found object
I’ve even tried starting the mongocryptd
process manually on port 27020 and only then run the script. I see that connections are made to mongocryptd but still no data is encrypted.
Any help would be appreciated.