[CDRIVER-642] Work around localhost exception issues in add_user when connected to MongoDB >= 2.7.1 Created: 11/May/15  Updated: 12/May/15  Resolved: 12/May/15

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.1.5

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-169 Work around localhost exception issue... Closed

 Description   

Starting with MongoDB 2.7.1 the scope of the localhost exception for authentication was dramatically narrowed. It is no longer possible to call the userInfo command unauthenticated, even when the localhost exception is in effect. A workaround for this issue is to catch the exception and call createUser if the error code is 13 (Unauthorized). Any exception from the createUser call should propagate to the user application.



 Comments   
Comment by Githook User [ 12/May/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-642 detect auth error from usersInfo

Starting with MongoDB 2.7.1 the scope of the localhost exception for
authentication was dramatically narrowed. It is no longer possible to call the
userInfo command unauthenticated, even when the localhost exception is in
effect. A workaround for this issue is to catch the exception and call
createUser if the error code is 13 (Unauthorized). Any exception from the
createUser call should propagate to the user application.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/9c450c34dbb8746bf9d321eefc7c4993c935c52d

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