[GODRIVER-1021] Specify behavior where connection string contain auth database but no credentials Created: 06/May/19  Updated: 28/Oct/23  Resolved: 13/Jun/19

Status: Closed
Project: Go Driver
Component/s: Authentication
Affects Version/s: None
Fix Version/s: 1.0.4

Type: Improvement Priority: Major - P3
Reporter: Ian Whalen (Inactive) Assignee: Isabella Siu (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
backported by GODRIVER-1136 Backport "Specify behavior where conn... Closed
Depends
is depended on by TOOLS-2292 Specifying default database in URI tr... Closed
is depended on by DRIVERS-637 Specify behavior where connection str... Implementing
Duplicate
is duplicated by GODRIVER-868 Authentication failure when specifyin... Closed
is duplicated by GODRIVER-870 Add better error message when connect... Closed
Related
is related to GODRIVER-920 Specifying a database name in URI oth... Closed

 Comments   
Comment by Githook User [ 13/Jun/19 ]

Author:

{'name': 'iwysiu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}

Message: GODRIVER-1021 specify behavior when URI has auth database but no credentials

Change-Id: Ib3d07fea98402f680a2c1adddae5708005e7b7d7
Branch: release/1.0
https://github.com/mongodb/mongo-go-driver/commit/3aab4a2f61e95907d4f80a8c5936be5725a1c0ed

Comment by Githook User [ 13/Jun/19 ]

Author:

{'name': 'iwysiu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}

Message: GODRIVER-1021 specify behavior when URI has auth database but no credentials

Change-Id: Ib3d07fea98402f680a2c1adddae5708005e7b7d7
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/4f954752fb48b8ba480d067de9e374c744be9529

Comment by Isabella Siu (Inactive) [ 07/Jun/19 ]

code review url: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/457304

Comment by Jeffrey Yemin [ 15/May/19 ]

To add some context to the backport request: the tools plan to ship with the 1.0.x driver version and the current behavior is impactful to that effort, as it's common in tools to specify a database in the URI. Right now this is what happens:

~$ mongodump --version
mongodump version: r4.1.11
git version: 1b8a9f5dc5c3314042b55e7415a2a25045b32a94
Go version: go1.11.9
   os: darwin
   arch: amd64
   compiler: gc
~$ mongodump --uri mongodb://localhost/test
2019-05-15T14:14:13.149-0400	Failed: error creating intents to dump: error getting collections for database `test`: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.

I consider this change a candidate for backport because:

  • it's relatively isolated and therefore low risk
  • while it's an application-visible behavioral change, it's going from something that returns an error to something that works. So it shouldn't have negative repercussions for existing applications.
Generated at Thu Feb 08 08:35:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.