zhaoyi0113 / mongodb-runner

Other
18 stars 5 forks source link

connecting to user/password admin db using string does not work #223

Open ssnyder opened 3 years ago

ssnyder commented 3 years ago

Hi,

I have set up my db using simple userid/password using SCRAM-SHA-1 using the admin db to do the authentication.

The connection string in my settings.json is this: (test does show up in the mongoDB Runner extension, but never connects)

    "mongoRunner": {
        "connections": [
            {
                "name": "test",
                "url": "mongodb://myUseridWithReadOnlyAccess:PasswordThatNob0dyElseKnows@my-server.companyname.com:27017/?authSource=admin&readPreference=primary&ssl=false"
            }
        ]
    }

Help would be appreciated....

zhaoyi0113 commented 3 years ago

Sorry for late response. Could you let me know the version of mongodb server you are connecting to? Do you have other way to connect to your db server without using authSource?

ssnyder commented 3 years ago

We are currently using version 3.0 I believe (we hope to update to 3.6 or higher soon, but no target date as of yet). For security purposes, we have disabled any other method of logging in at this time.

zhaoyi0113 commented 3 years ago

3.0 is a very old version and I didn't test it. There may be a different configuration for 3.0 in terms of ssl. The mongodb driver version I am using is also not the one for 3.0. Is it possible to upgrade your db server?

ssnyder commented 3 years ago

What is the oldest version you tested on? We have recently updated to 3.2 .... yes, we hope to keep updating, but are being careful for multiple reasons.

zhaoyi0113 commented 3 years ago

Yes, 3.2 should work. Are you saying it doesn't work in 3.2?

ssnyder commented 3 years ago

Sorry - it took me so long to get back to this - and yes, I'm saying it did not work in 3.2