[COMPASS-3096] authentication database picked up from SRV URL incorrectly Created: 30/Aug/18  Updated: 29/Oct/23  Resolved: 22/Mar/22

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: 1.15.0, 1.18.0
Fix Version/s: 1.31.0

Type: Bug Priority: Major - P3
Reporter: Charles Kalmanek Assignee: Unassigned
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS X High Sierra


Attachments: PNG File Screen Shot 2018-11-08 at 2.42.11 pm.png     PNG File Screen Shot 2022-03-21 at 11.08.11 PM.png    
Issue Links:
Related
is related to COMPASS-3965 SRV URL authdb parsing issue (non-Atl... Closed
Epic Link: COMPASS-1173
Documentation Changes: Not Needed
Sprint: Iteration Takaioko

 Description   

if I copy an SRV URL e.g., mongodb+srv://chuck:password@charts-datasets-vkuzx.mongodb.net/datasets, Compass takes the db name and puts it in the auth database field. The correct syntax for populating the auth database field would be ?authSource=dataset. In any case, this breaks with an Atlas hosted cluster because in Atlas, the auth database is always admin, so the user needs to manually change it



 Comments   
Comment by Rhys Howell [ 22/Mar/22 ]

This is fixed with the new connection form.

Comment by Githook User [ 30/Nov/18 ]

Author:

{'name': 'Durran Jordan', 'email': 'durran@gmail.com', 'username': 'durran'}

Message: COMPASS-3096: Default authSource to admin if not provided
Branch: master
https://github.com/10gen/compass/commit/b5a11a523f56cf5526b981be6ff9ad53e8b5257a

Comment by Githook User [ 30/Nov/18 ]

Author:

{'name': 'Durran Jordan', 'email': 'durran@gmail.com', 'username': 'durran'}

Message: COMPASS-3096: Default authSource to admin if not provided
Branch: COMPASS-3096
https://github.com/10gen/compass/commit/dcedacf0e6ee851ef5a054c4b06c029a4ea1ce8a

Comment by Githook User [ 30/Nov/18 ]

Author:

{'name': 'Durran Jordan', 'email': 'durran@gmail.com', 'username': 'durran'}

Message: COMPASS-3096: Default authSource to admin if not provided
Branch: master
https://github.com/mongodb-js/data-service/commit/d9da67e8b710d7c55c2896f1603a60dee9107318

Comment by Githook User [ 30/Nov/18 ]

Author:

{'name': 'Durran Jordan', 'email': 'durran@gmail.com', 'username': 'durran'}

Message: COMPASS-3096: Default authSource to admin if not provided
Branch: master
https://github.com/mongodb-js/connection-model/commit/90577077c9b7a422ffb2ffae17735e641c117298

Comment by Durran Jordan [ 30/Nov/18 ]

It seems the shell doesn't behave like the docs as well so maybe we just do the expected thing here and say if authSource is not provided in the URL it's always admin. That seems to be what the shell is doing.

Comment by Durran Jordan [ 30/Nov/18 ]

Actually per the intial bug reported here the Compass behaviour is correct. If authSource is not provided in the URI, then Compass defaults to the database in the URI. This is per our official documentation on the connection string:

https://docs.mongodb.com/manual/reference/connection-string/#urioption.authSource

As for the authSource in the SRV record not getting set I am looking into this now.

Generated at Wed Feb 07 22:32:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.