[SERVER-32164] Shell SRV implementation does not allow `authSource` from TXT records to be used Created: 04/Dec/17 Updated: 30/Oct/23 Resolved: 14/Dec/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 3.7 Required, 3.6.0 |
| Fix Version/s: | 3.6.1, 3.7.1 |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Cory Mintz | Assignee: | ADAM Martin (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Backport Requested: |
v3.6
|
||||||||||||||||
| Sprint: | Platforms 2017-12-18 | ||||||||||||||||
| Participants: | |||||||||||||||||
| 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.
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:
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 [ 14/Dec/17 ] |
|
Author: {'name': 'ADAM David Alan Martin', 'email': 'adam.martin@10gen.com', 'username': 'adamlsd'}Message: (cherry picked from commit 2efa93e1132e2dbc1b7f5a7f0118a9440e511f89) |
| Comment by Githook User [ 14/Dec/17 ] |
|
Author: {'name': 'ADAM David Alan Martin', 'email': 'adam.martin@10gen.com', 'username': 'adamlsd'}Message: |