[CSHARP-858] Incorrect user/pass should throw right away Created: 30/Oct/13  Updated: 27/Oct/14  Resolved: 27/Oct/14

Status: Closed
Project: C# Driver
Component/s: Configuration, Error Handling, Security
Affects Version/s: 1.8.3
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Rasitha Wijesinghe Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

v1.8.3.9 C# driver; Windows 7 64-bit client; Red Hat Linux server; 3-node replica set with 1 arbiter;


Issue Links:
Related
is related to CSHARP-851 Stop Authenticating Against Arbiters Closed
Epic Link: Adopt Core Library

 Description   

When the wrong user/pass is given, the driver should throw an exception right away without waiting for the default 30 second Connection Timeout. This used to work correctly in 1.7.* drivers and when we upgraded to 1.8 drivers the behavior has changed.

The exception that gets thrown is the generic MongoConnectionException that says "Unable to connect in the specified timeframe of '00:00:30'"

I'm not sure if the driver is continuously trying for 30 seconds but it would be nice if it can throw right away like it used to.



 Comments   
Comment by Craig Wilson [ 27/Oct/14 ]

We are working on unifying how all drivers handle this and will open a new ticket when that has been decided upon.

Comment by Craig Wilson [ 31/Oct/13 ]

This is due to a change in how authentication works in 2.4 and higher. We now greedily authenticate connections and, when incorrect user/passwords are provided, it manifests itself as a connection failure rather than an authentication failure. This is likely going to be changed to be more like what you are wanting on account of CSHARP-851. I'll link these tickets together.

Generated at Wed Feb 07 21:38:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.