MongoDB Documentation, Release 3.0.4 [ { role: "<role name>", db: "<database>" }, ... ] } { resource: { <resource> }, actions: [ "<action>", ... ] } A system.roles document has the following fields: A privilege document has the following syntax: Each privilege document has the following fields: { db: <database>, collection: <collection> } or { cluster : true } See Resource Document (page 417) for more details. An array of actions permitted on the resource. For a list of actions, see Privilege Actions (page 419). A document that specifies the resources upon which the privilege actions (page 414) apply. The docu- ment has one of the following form: The role (page 414) field is a string that specifies the name of the role. The db (page 414) field is a string that specifies the database to which the role belongs. MongoDB uniquely identifies each role by the pairing of its name (i.e. role (page 414)) and its database. The privileges (page 414) array contains the privilege documents that define the privileges (page 325) for the role. The roles (page 414) array contains role documents that specify the roles from which this role inherits (page 325) privileges. A role document has the following syntax: { role: "<role name>", db: "<database>" } A role document has the following fields: The name of the role. A role can be a built-in role (page 405) provided by MongoDB or a user-defined role (page 325). The name of the database where the role is defined. Chapter 6. Security 414 admin.system.roles.roles[n]. role admin.system.roles.roles[n]. db admin.system.roles. roles admin.system.roles.privileges[n]. actions admin.system.roles.privileges[n]. resource admin.system.roles. privileges admin.system.roles. db admin.system.roles. role