[JAVA-582] com.mongodb.DB.authenticate fails often when invoked from multiple threads Created: 06/Jun/12  Updated: 29/Aug/12  Resolved: 12/Jul/12

Status: Closed
Project: Java Driver
Component/s: Connection Management
Affects Version/s: 2.7.3
Fix Version/s: 2.9.0

Type: Bug Priority: Major - P3
Reporter: Innar Made Assignee: Bryan Reinero
Resolution: Done Votes: 0
Labels: Authenticate, DB, bad_nounce, getnonce
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive mongo-auth-problem-driver.zip    

 Description   

com.mongodb.DB.authenticate(username, password) fails often when invoked from multiple threads. Mongod console logs "auth: bad nonce received or getnonce not called. could be a driver bug or a security attack" whenever authentication fails.

Expected result:
authenticate method should return consistent results.

Steps to reproduce:
import https://gist.github.com/2882362 to your workspace and run or download the attached sample project, import it to your favourite IDE and run.

Additional information:
http://forum.springsource.org/showthread.php?127153-CannotGetMongoDbConnectionException-in-a-multithreaded-environment



 Comments   
Comment by Jeffrey Yemin [ 29/Aug/12 ]

Closing as part of 2.9.0 release process.

Comment by Bryan Reinero [ 12/Jul/12 ]

fixed in commit 5f87c1363ce8720b846c514a5ee2cc0316664c7e

Comment by Bryan Reinero [ 12/Jul/12 ]

fix in commit 5f87c1363ce8720b846c514a5ee2cc0316664c7e

Comment by Jeffrey Yemin [ 06/Jun/12 ]

Thanks for the report. We'll check it out.

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