content_image/846252.jpg
## Role Management Methods 

<img src='content_image/846252.jpg'>

## 6.4.2 Security Reference Documentation 

Built-In Roles (page 405) Reference on MongoDB provided roles and corresponding access. 

system.roles Collection (page 413) Describes the content of the collection that stores user-defined roles. 

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. 

## Built-In Roles 

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). 

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. 

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). 

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. 

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 . 

## Database User Roles 

Every database includes the following client roles: 

## read 

Provides the ability to read data on all non -system collections and on the following system collections: 

