EnterpriseDB / mongo_fdw

PostgreSQL foreign data wrapper for MongoDB
GNU Lesser General Public License v3.0
326 stars 70 forks source link

Can't connect Mongo 3.4.23 at Mongo Atlas that requires SSL Self-Signed Certificate #130

Open efron opened 4 years ago

efron commented 4 years ago

Hi,

I'm trying to connect Postgre mongo_fdw to Mongo 3.4.23 at Mongo Atlas that requires SSL Self-Signed Certificate with no success.

Beyond host, port, user and password, it requires the following parameters:

ssl=true
authSource=admin
w=majority

and the SSL as Self-Signed Certificate

image

However I can't figure out where to pass those parameters inside pgAdmin as the picture shows:

image

This is the error message in text:

ERROR:  invalid option "weak_cert_validation"
HINT:  Valid options in this context are: username, password
SQL state: HV00D

Is there any other place to pass these parameters, maybe a file in Ubuntu or something? Can anybody help me please to know how to pass those parameters correctly?

Thanks, in advance. Hernán

vaibhavdalvi93 commented 2 years ago

Hi @efron,

The options 'ssl', 'weak_cert_validation' and 'authentication_database' are the foreign server (i.e. CREATE SERVER command) options. Please refer readme (https://github.com/EnterpriseDB/mongo_fdw#usage) for more details.

To mention authSource, the option _authenticationdatabase needs to be used. Kindly use these options and let us know the feedback.

If you're successfully able to use this option then request you to please close this ticket.