[JAVA-2824] Handshake changes for SDAM and Auth Created: 29/Mar/18  Updated: 28/Oct/23  Resolved: 03/May/18

Status: Closed
Project: Java Driver
Component/s: Cluster Management, Connection Management
Affects Version/s: None
Fix Version/s: 3.8.0

Type: New Feature Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-466 Handshake changes for SDAM and Auth Closed
Epic Link: Java MongoDB 4.0 Support

 Description   

tl;dr:

  • Monitoring-only sockets must not send SCRAM mechanism negotiation in isMaster and must not authenticate at all.
  • Non-monitoring sockets (e.g. connection pool or single-threaded client) do a "normal" handshake and authenticate if there are credentials.
  • An authentication error on a socket must close all (and only) non-monitoring sockets to the same server.

Possible backward breaking change:

  • Some drivers were resetting a server's topology description to Unknown on an authentication error and should stop doing so. This means the topology will always be "correct" even when authentication fails.
  • It will no longer be possible for authentication errors to be masked as server selection errors.

Detailed changes:



 Comments   
Comment by Githook User [ 03/May/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin', 'username': 'jyemin'}

Message: JAVA-2824: Stop authenticating server monitor connections

This is a significant behavior change in the driver, as authentication
errors will be thrown much faster to applications, as a
MongoSecurityException rather than as a MongoTimeoutException after the
server selection timeout (which defaults to 30 seconds) has expired.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/2bf883e23db509366307248be6bbcbfac29088fd

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