Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongodb connection establishment update #105

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Mongodb connection establishment update #105

wants to merge 2 commits into from

Conversation

mauriceackel
Copy link

Changed mongodb connection establishment to support newer driver and database versions of mongodb. The current authentication method (Db.authenticate) is deprecated (see log files). The new way to establish a connection is to use the MongoClient.

I create different connection strings, depending on whether a username is set or not. The way it is implemented only allows authentication against the selected database (i.e. no auth agains admin database when connecting to different db).

It should be tested whether the "encodeURIComponent" calls on the passwords are sufficient to prevent the connection uri from breaking on special character input.

BarnumD pushed a commit to BarnumD/mongo-k8s-sidecar that referenced this pull request May 14, 2020
Merge in pull request from original repo, cravall#105
Changed mongodb connection establishment to support newer driver and database versions of mongodb. The current authentication method (Db.authenticate) is deprecated (see log files). The new way to establish a connection is to use the MongoClient.

I create different connection strings, depending on whether a username is set or not. The way it is implemented only allows authentication against the selected database (i.e. no auth agains admin database when connecting to different db).

It should be tested whether the "encodeURIComponent" calls on the passwords are sufficient to prevent the connection uri from breaking on special character input.
@BarnumD
Copy link

BarnumD commented May 14, 2020

Can this be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants