Managing users and roles

Gen 2

As part of provisioning a new deployment in IBM Cloud®, you can use the service credential console page to create a user with different roles (Manager and Writer).

Databases for MongoDB deployments no longer include a default admin user. Instead, you create a user with the Manager or Writer role using the IBM Cloud® Service Credentials interface — via UI or CLI. These users come with necessary credentials to connect to and manage the deployment.

The manager user

The Manager user functions as an admin-like user and is automatically granted the below privileges:

  "dbAdminAnyDatabase",
	"readWriteAnyDatabase",
	"readAnyDatabase",
	"clusterMonitor",
	"clusterManager",
	"backup",
	"restore"

Changing the user password is not supported via the IBM Cloud console on Gen 2.

Create the manager user in the CLI

Use one of the following commands from the IBM Cloud CLI Cloud Databases plug-in to create the Manager user.

ibmcloud resource service-key-create <service_key_name> Manager --instance-name <instance_name>
ibmcloud resource service-key-create <service_key_name> Manager --instance-id <guid>

Creating users in the console

  1. Go to the service dashboard for your service.
  2. Click Service credentials.
  3. Click New credential.
  4. Choose a descriptive name for your new credential.
  5. Click Add to provision the new credential. A username and password, and an associated database user in the Databases for MongoDB are generated.