Question

I have an SSL built mongo (version 2.4.6). I use pymongo for python to connect to mongoDB. The mongoDB instance will be running in SSL mode with a client certificate key which is encrypted with a password.

To connect to the instance via mongo console, I can pass appropriate parameters with the --sslPEMKeyPassword option. How will I be able to pass this option using pymongo? I searched the net and documentation, but couldn't get any reference for it.

Right now by passing all other options, the python program is asking for the PEM Key password. As my program would be automated, I need to bypass this step. How will I be able to do this? Please help.

Was it helpful?

Solution

It's a limitation of Python's SSL implementation that it can't easily support password-protected PEM files. We have some additional discussion on the PyMongo feature request, ticket PYTHON-640.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top