Built-in roles

MongoDB includes a number of built-in roles (https://docs.mongodb.com/manual/core/security-built-in-roles/#built-in-roles) for administration convenience, and the most important are summarized here:

Role Allows User To ...
read Read the database (for example, execute db.collection.find())
readWrite Create, read, update, and delete data
userAdmin Perform user administration for a given database
userAdminAnyDatabase Perform user administration for all databases
clusterAdmin Manage and monitor clusters and hosts within the cluster
backup | restore Perform database backups and restores
readWriteAnyDatabase Create, read, update, and delete any database
root Shortcut to assigning all *AnyDatabase privileges

Get MongoDB 4 Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.