Open
Description
It's bad practice to use the admin user on Couchbase.
I propose that we @deprecate
the current .withCredentials()
method and add a new one named .withAdministratorCredentials(user, pass)
as this more closely reflects what it actually is now.
And also introduce new method like so:
.withLocalRBACUser(String username, String password, String roles)
The underlying API to support this can be found here: https://docs.couchbase.com/server/current/rest-api/rbac.html
Excerpt:
$ curl -X PUT --data "name=John Smith&roles=cluster_admin&password=jspassword" \
-H "Content-Type: application/x-www-form-urlencoded" \
http://Administrator:[email protected]:8091/settings/rbac/users/local/johnsmith