-
Type: Investigation
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Connectivity
-
None
-
Not Needed
Problem Description
When connecting to a mongodb+srv that contains multiple mongos Compass is attempting to connect to all the members of theĀ _mongodb._tcp hosts.
For some users that uses 2 factor authentication such as Okta, every connection to a mongodb+srv will prompt confirmation for all hosts (as they don't share the same ip)
Steps to Reproduce
Setup a shard with 4 mongos and attempt to connect using Compass client. It will open one connection for each mongos.
The same is not true for our mongo shell client, the shell client will only connect to one mongos instead.
Expected Results
We expect Compass to only perform authentication in one mongos instead of in all.
Actual Results
Compass opens connections to all the mongos and perform authentication in all of those
Additional Notes
The same is true for non LDAP authentication, however only users with LDAP configured to two factor authentication are affected.
The current workaround is specifying a single mongos in the connection uri ignoring the srv dns.
- is caused by
-
SERVER-61585 Mongosh triggering an okta 2fa on every single command
- Open
- is related to
-
COMPASS-7009 Improve error message for "Connection pool cleared"
- Closed
- related to
-
COMPASS-5617 Add srvMaxHosts in the list of URL options in the connection form
- Closed