caosiyang / py-mongo-sync

Oplog-based data sync tool that synchronizes data from a replica set to another deployment, e.g.: standalone, replica set, and sharded cluster.
http://caosiyang.github.io/py-mongo-sync/
MIT License
108 stars 46 forks source link

Cert based auth not supported #10

Closed jakehilton closed 6 years ago

jakehilton commented 6 years ago

I noticed you support username/password authentication. I would assume it would be trivial to add cert based auth since pymongo supports that natively?

c = pymongo.MongoClient('mongo-name.example.com', authMechanism='MONGODB-X509', ssl_certfile='/path/to/mongossl/user-cert.pem', ssl_ca_certs='/path/to/mongossl/root-ca.pem')

Very promising project!

Thanks!

caosiyang commented 6 years ago

You're right. It is simple to add the config items of certificates and initialize the connection with them. I have never used the X509 certificate and have little knowledge about it, so it is missing.