[JAVA-1528] Work around localhost exception issues in addUser helpers Created: 30/Oct/14 Updated: 30/Jan/15 Resolved: 06/Nov/14 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Authentication |
| Affects Version/s: | None |
| Fix Version/s: | 2.13.0, 3.0.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Barrie Segal | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
With MongoDB 2.6 the usersInfo command is used to determine if the addUser helper should call createUser or updateUser when passed a given username. Starting with MongoDB 2.7.0 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. Any driver that calls usersInfo in its addUser helper can no longer be used to add the first admin user while 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. https://github.com/mongodb/mongo/blob/master/src/mongo/base/error_codes.err |
| Comments |
| Comment by Githook User [ 30/Jan/15 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Work around localhost exception issues in addUser helper
|
| Comment by Jeffrey Yemin [ 29/Jan/15 ] |
|
2.13.0 has been released. Closing issue. |
| Comment by Githook User [ 06/Nov/14 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Work around localhost exception issues in addUser helper
|
| Comment by Githook User [ 06/Nov/14 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Work around localhost exception issues in addUser helper
|