[CDRIVER-2425] authSource option from TXT record ignored Created: 12/Dec/17 Updated: 28/Oct/23 Resolved: 14/Dec/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | auth, libmongoc |
| Affects Version/s: | 1.9.0 |
| Fix Version/s: | 1.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Given a URI like this: mongodb+srv://user:pass@hostname/test If there is a TXT record for hostname like "authSource=admin", then the driver should log into the admin database, not the URI's database "test". However, the authSource from the TXT record is ignored. Cause: when we create a client or client pool, we call mongoc_topology_new, which copies the client's URI to the topology's URI, then updates the topology's URI with the contents of the SRV and TXT records. But then we create a "cluster" using the client's URI, which hasn't been updated. This is going to be a bug factory so I'll open a ticket to clean it up and test it better. Meanwhile, just initialize the cluster with the topology's URI, not the client's. |
| Comments |
| Comment by Githook User [ 16/Dec/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 14/Dec/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 14/Dec/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: |