[GODRIVER-486] Connection String AuthSource should default to using connection string database name before defaulting to admin Created: 09/Jul/18  Updated: 12/Jul/18  Resolved: 12/Jul/18

Status: Closed
Project: Go Driver
Component/s: Options & Configuration
Affects Version/s: 0.0.8, 0.0.7
Fix Version/s: 0.0.9

Type: Improvement Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Kristofer Brandow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes GODRIVER-485 Authentication degrade after 0.0.6 Closed

 Description   

If an authMechanism is not specified on the connection string, the authSource should always default to the database name specified in the connection string before defaulting to the admin database.

Add code to ensure that the authSource is set to the database name and only default to admin when the database name is empty.



 Comments   
Comment by Githook User [ 12/Jul/18 ]

Author:

{'username': 'skriptble', 'name': 'Kris Brandow', 'email': 'kris@mongodb.com'}

Message: Ensure authsource defaults to dbname before admin

GODRIVER-486

Change-Id: Ie79cf08351b9f2bbbf1a4a47f548827ffee89cbf
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/4503c54ec045b406a0b3533901c6d7a5614cfef3

Comment by Kristofer Brandow (Inactive) [ 09/Jul/18 ]

Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/418719.

Generated at Thu Feb 08 08:34:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.