[JAVA-1203] Java API should support db.createUser() Created: 07/May/14 Updated: 08/Nov/17 Resolved: 08/Nov/17 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API, Authentication |
| Affects Version/s: | 2.12.1 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Rudi Wijaya | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
MongoDB 2.6.0 deprecates the db.addUser() and recommends the db.createUser() command. However, the Java API deprecates the db.addUser() method and suggests using the low-level db.command() method:
MongoDB Java Driver API should support db.createUser() as a replacement to db.addUser() (taking into account server version). Related to |
| Comments |
| Comment by Jeffrey Yemin [ 08/Nov/17 ] | |
|
For the time being the drivers team has concluded that there is little benefit in providing API wrappers around user management commands, and recommend instead that applications construct commands dynamically and use MongoDatabase#runCommand. | |
| Comment by Hendy Irawan [ 20/May/14 ] | |
|
jeff.yemin http://docs.mongodb.org/manual/reference/method/db.createUser/#db.createUser is the JavaScript API. The problem is DB.createUser() is not supported by the Java API, instead it suggests developers use server commands directly (which defeats the purpose of an API) :
| |
| Comment by Jeffrey Yemin [ 07/May/14 ] | |
|
DB.addUser does call the createUser server command if it's talking to a 2.6 server. But it's true that DB.addUser() doesn't support the full range of options that the createUser server command supports. See http://docs.mongodb.org/manual/reference/method/db.createUser/#db.createUser. | |
| Comment by Rudi Wijaya [ 07/May/14 ] | |
|
tag ceefour |