[DOCS-11202] Docs for SERVER-32164: Shell SRV implementation does not allow `authSource` from TXT records to be used Created: 12/Jan/18  Updated: 29/Oct/23  Resolved: 16/Aug/18

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 3.7.1, 3.6.1

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Allison Reinheimer Moore
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-32164 Shell SRV implementation does not all... Closed
Participants:
Days since reply: 5 years, 25 weeks, 6 days ago

 Description   

Description

When the shell is passed a username and the authentication method requires a password, the shell will now automatically ask the user for a password, interactively. The username may be passed either in the connection URI or as a separate command line argument.

Work to do

Engineering Ticket Description:

I would like to be able to connect to an authenticated replica set with the following command when the _mongodb._tcp.mycluster SRV record existed and a TXT record existed containing authSource=admin&replicaSet=mycluster.

mongo "mongodb+srv://mycluster/test" --username cory --password

Using this command against the 3.6.0 shell fails because the test database is used as the auth source. This occurs because the URI parsing ignores the authSource in the TXT record because username is not also specified in the URI.

If I were to move the username to the URI, then the shell no longer prompts for a password and does not authenticate properly. i.e:

mongo "mongodb+srv://mycluster/test?username=cory" --password

The current workaround is to specify "--authenticationDatabase admin" on the command line instead of using the TXT record.

Ideally the first example would work, and the shell would use the authSource from the URI (via the TXT record) even though the username is specified on the command line and not explicitly in the URI. The second example also seems acceptable but less consistent.



 Comments   
Comment by Githook User [ 16/Aug/18 ]

Author:

{'username': 'schmalliso', 'email': 'allison.moore@10gen.com', 'name': 'Allison Reinheimer Moore'}

Message: DOCS-11202: mongo connections using srv format will prompt for username
Branch: master
https://github.com/mongodb/docs/commit/01fa14decadc116b09ecdeae049e6744f16bf97f

Comment by Kay Kim (Inactive) [ 07/Aug/18 ]

Removing link to epic. Seems odd to keep the epic open just because of one ticket.

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