scottwrobinson / camo

A class-based ES6 ODM for Mongo-like databases.
557 stars 81 forks source link

Connect to mongo using certificate #92

Closed duartealexf closed 7 years ago

duartealexf commented 7 years ago

I looked around for it, but I'm guessing there is no support for connecting to mongo using ssl certificate? For example, on command line I connect to mongo using:

mongo --port=27017 --ssl --sslCAFile /var/lib/mongo/ca/mongo-ca.crt --sslPEMKeyFile /var/lib/mongo/ca/localhost.pem --sslAllowInvalidHostnames -u root -p XXXX admin

Is there any support for it?

scottwrobinson commented 7 years ago

Sorry for the late reply.

Can you achieve the same thing using a Mongo connection string (mongodb://username:pw@localhost/people)? Camo also exposes the underlying driver, which in the case of Mongo would be the MongoClient. This may be what you need.

duartealexf commented 7 years ago

No problems. I will try that. Thanks!