Role-based access control

It's important to note the difference between a role (https://docs.mongodb.com/manual/core/authorization/#role-based-access-control) and a user. Privileges are granted to roles. Roles, in turn, are assigned to users.  This arrangement vastly minimizes the complications which could arise as the numbers of database users increases.  In addition, one role can inherit from another, which allows you to create a hierarchy of privileges and minimize the number of assignments which need to be made.

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.