MongoDB Documentation, Release 3.0.4 Role Management Methods 6.4.2 Security Reference Documentation Built-In Roles Database User Roles read Provides the ability to read data on all non -system collections and on the following system collections: Every database includes the following client roles: This section describes the privileges for each built-in role. You can also view the privileges for a built-in role at any time by issuing the rolesInfo command with the showPrivileges and showBuiltinRoles fields both set to true . 405 6.4. Security Reference MongoDB provides the built-in database user (page 405) and database administration (page 406) roles on every database. MongoDB provides all other built-in roles only on the admin database. Each of MongoDB’s built-in roles defines access at the database level for all non -system collections in the role’s database and at the collection level for all system collections (page 291). A role grants privileges to perform sets of actions (page 419) on defined resources (page 417). A given role applies to the database on which it is defined and can grant access down to a collection level of granularity. MongoDB grants access to data and commands through role-based authorization (page 325) and provides built-in roles that provide the different levels of access commonly needed in a database system. You can additionally create user-defined roles (page 325). system.users Collection (page 416) Describes the content of the collection that stores users’ credentials and role as- signments. Resource Document (page 417) Describes the resource document for roles. Privilege Actions (page 419) List of the actions available for privileges. Default MongoDB Port (page 424) List of default ports used by MongoDB. System Event Audit Messages (page 424) Reference on system event audit messages. system.roles Collection (page 413) Describes the content of the collection that stores user-defined roles. Built-In Roles (page 405) Reference on MongoDB provided roles and corresponding access. Name Description db.createRole() Creates a role and specifies its privileges. db.updateRole() Updates a user-defined role. db.dropRole() Deletes a user-defined role. db.dropAllRoles() Deletes all user-defined roles associated with a database. db.grantPrivilegesToRole() Assigns privileges to a user-defined role. db.revokePrivilegesFromRole() Removes the specified privileges from a user-defined role. db.grantRolesToRole() Specifies roles from which a user-defined role inherits privileges. db.revokeRolesFromRole() Removes a role from a user. db.getRole() Returns information for the specified role. db.getRoles() Returns information for all the user-defined roles in a database.