i have a big app in production hosted in Heroku, the app already has a lot amount of data reside in Mongo Atlas, this past couple of days, i added Client Side Field Level Encryption to secure my data, and at this moment everything goes well, the thing, i have to install mongocryptd as a process in my server in Heroku, unfortuntly Heroku do not offer such a thing:
1- Is the option (mongocryptURI) to supply to the authEncryption field of the connection options of MongoClient as the URL of my atlas connection will make everything goes well (i don’t think so because i tried it locally but it did not work.
2- do exist any other method to make it work and hope it’s not deploy as Docker container, if so please can you help me with the script of the Dockerfile, (i am not a big fan of containerization).
option 1 is not possible as the mongocryptd process needs to run in the client application, so it should be running in the instanse where your application is running either normally using docker.
one of the method for it to work would be whenever you are spinning up the instance you can use a script to start the mongocryptd process in the instance.