@@ -36,18 +36,13 @@ Every database includes the following roles:
36
36
37
37
* - :authrole:`read`
38
38
39
- - Provides the ability to read data on all *non*-system collections and on the
40
- following system collections: :data:`system.indexes <<database>.system.indexes>`,
41
- :data:`system.js <<database>.system.js>`, and :data:`system.namespaces
42
- <<database>.system.namespaces>` collections.
39
+ - .. include:: /includes/extracts/built-in-roles-read.rst
43
40
44
41
For the specific privileges granted by the role, see :authrole:`read`.
45
42
46
43
* - :authrole:`readWrite`
47
44
48
- - Provides all the privileges of the :authrole:`read` role and the ability to modify
49
- data on all *non*-system collections and the :data:`system.js
50
- <<database>.system.js>` collection.
45
+ - .. include:: /includes/extracts/built-in-roles-read-write.rst
51
46
52
47
For the specific privileges granted by the role, see
53
48
:authrole:`readWrite`.
@@ -66,39 +61,26 @@ Every database includes the following database administration roles:
66
61
67
62
* - :authrole:`dbAdmin`
68
63
69
- - Provides the ability to perform administrative tasks such as
70
- schema-related tasks, indexing, gathering statistics. This role
71
- does not grant privileges for user and role management.
64
+ - .. include:: /includes/extracts/built-in-roles-dbAdmin.rst
72
65
73
66
For the specific privileges granted by the role, see
74
67
:authrole:`dbAdmin`.
75
68
76
69
* - :authrole:`dbOwner`
77
70
78
- - Provides the ability to perform any administrative action on the
79
- database. This role combines the privileges granted by the
80
- :authrole:`readWrite`, :authrole:`dbAdmin` and
81
- :authrole:`userAdmin` roles.
71
+ - .. include:: /includes/extracts/built-in-roles-dbOwner.rst
82
72
83
73
* - :authrole:`userAdmin`
84
74
85
- - Provides the ability to create and modify roles and users on the
86
- current database. Since the :authrole:`userAdmin` role allows
87
- users to grant any privilege to any user, including themselves,
88
- the role also indirectly provides :ref:`superuser <superuser>`
89
- access to either the database or, if scoped to the ``admin``
90
- database, the cluster.
75
+ - .. include:: /includes/extracts/built-in-roles-userAdmin.rst
91
76
92
77
For the specific privileges granted by the role, see
93
78
:authrole:`userAdmin`.
94
79
95
80
Cluster Administration Roles
96
81
----------------------------
97
82
98
- The ``admin`` database includes the following roles for administering the
99
- whole system rather than a specific database. These roles include but are
100
- not limited to :term:`replica set` and :term:`sharded cluster`
101
- administrative functions.
83
+ .. include:: /includes/extracts/built-in-roles-cluster-admin-roles.rst
102
84
103
85
.. list-table::
104
86
:header-rows: 1
@@ -109,41 +91,33 @@ administrative functions.
109
91
110
92
* - :authrole:`clusterAdmin`
111
93
112
- - Provides the greatest cluster-management access. This role combines the
113
- privileges granted by the :authrole:`clusterManager`,
114
- :authrole:`clusterMonitor`, and :authrole:`hostManager` roles.
115
- Additionally, the role provides the :authaction:`dropDatabase` action.
94
+ - .. include:: /includes/extracts/built-in-roles-clusterAdmin.rst
116
95
117
96
* - :authrole:`clusterManager`
118
97
119
- - Provides management and monitoring actions on the cluster. A
120
- user with this role can access the ``config`` and ``local``
121
- databases, which are used in sharding and replication,
122
- respectively.
98
+ - .. include:: /includes/extracts/built-in-roles-clusterManager.rst
123
99
124
100
For the specific privileges granted by the role, see
125
101
:authrole:`clusterManager`.
126
102
127
103
* - :authrole:`clusterMonitor`
128
104
129
- - Provides read-only access to monitoring tools, such as the |mms-home|
130
- and :opsmgr:`Ops Manager </>` monitoring agent.
105
+ - .. include:: /includes/extracts/built-in-roles-clusterMonitor.rst
131
106
132
107
For the specific privileges granted by the role, see
133
108
:authrole:`clusterMonitor`.
134
109
135
110
* - :authrole:`hostManager`
136
111
137
- - Provides the ability to monitor and manage servers.
112
+ - .. include:: /includes/extracts/built-in-roles-hostMonitor.rst
138
113
139
114
For the specific privileges granted by the role, see
140
115
:authrole:`hostManager`.
141
116
142
117
Backup and Restoration Roles
143
118
----------------------------
144
119
145
- The ``admin`` database includes the following roles for backing up and
146
- restoring data:
120
+ .. include:: /includes/extracts/built-in-roles-backup-roles.rst
147
121
148
122
.. list-table::
149
123
:header-rows: 1
@@ -154,19 +128,14 @@ restoring data:
154
128
155
129
* - :authrole:`backup`
156
130
157
- - Provides privileges needed to back up data. This role provides
158
- sufficient privileges to use the |mms-home| backup agent,
159
- :opsmgr:`Ops Manager </>` backup agent, or to use
160
- :binary:`~bin.mongodump`.
131
+ - .. include:: /includes/extracts/built-in-roles-backup.rst
161
132
162
133
For the specific privileges granted by the role, see
163
134
:authrole:`backup`.
164
135
165
136
* - :authrole:`restore`
166
137
167
- - Provides privileges needed to restore data with
168
- :binary:`~bin.mongorestore` without the :option:`--oplogReplay <mongorestore --oplogReplay>`
169
- option or without ``system.profile`` collection data.
138
+ - .. include:: /includes/extracts/built-in-roles-restore.rst
170
139
171
140
For the specific privileges granted by the role, see
172
141
:authrole:`restore`.
@@ -176,10 +145,7 @@ restoring data:
176
145
All-Database Roles
177
146
------------------
178
147
179
- .. versionchanged:: 3.4
180
-
181
- These roles in the ``admin`` database apply to all but the ``local``
182
- and ``config`` databases in a :binary:`~bin.mongod` instance:
148
+ .. include:: /includes/extracts/built-in-roles-all-database-roles.rst
183
149
184
150
.. list-table::
185
151
:header-rows: 1
@@ -190,53 +156,34 @@ and ``config`` databases in a :binary:`~bin.mongod` instance:
190
156
191
157
* - :authrole:`readAnyDatabase`
192
158
193
- - Provides the same read-only permissions as :authrole:`read`,
194
- except it applies to all but the ``local`` and ``config``
195
- databases in the cluster. The role also provides the
196
- :authaction:`listDatabases` action on the cluster as a whole.
159
+ - .. include:: /includes/extracts/built-in-roles-readAnyDatabase.rst
197
160
198
161
For the specific privileges granted by the role, see
199
162
:authrole:`readAnyDatabase`.
200
163
201
164
.. versionchanged:: 3.4
202
165
203
- Prior to 3.4, :authrole:`readAnyDatabase` includes ``local``
204
- and ``config`` databases. To provide ``read`` privileges on
205
- the ``local`` database, create a user in the ``admin``
206
- database with :authrole:`read` role in the ``local``
207
- database. See also :authrole:`clusterManager` role for access
208
- to the ``config`` and ``local`` databases.
166
+ .. include:: /includes/extracts/built-in-roles-readAnyDatabase-prior.rst
209
167
210
168
* - :authrole:`readWriteAnyDatabase`
211
169
212
- - Provides the same read and write permissions as
213
- :authrole:`readWrite`, except it applies to all but the
214
- ``local`` and ``config`` databases in the cluster. The role also
215
- provides the :authaction:`listDatabases` action on the cluster
216
- as a whole.
170
+ - .. include:: /includes/extracts/built-in-roles-readWriteAnyDatabase.rst
217
171
218
172
For the specific privileges granted by the role, see
219
173
:authrole:`readWriteAnyDatabase`.
220
174
221
175
.. versionchanged:: 3.4
222
176
223
- Prior to 3.4, :authrole:`readWriteAnyDatabase` includes
224
- ``local`` and ``config`` databases. To provide ``readWrite``
225
- privileges on the ``local`` database, create a user in the
226
- ``admin`` database with :authrole:`readWrite` role in the
227
- ``local`` database. See also :authrole:`clusterManager` role
228
- for access to the ``config`` and ``local`` databases.
177
+ .. include:: /includes/extracts/built-in-roles-readWriteAnyDatabase-prior.rst
229
178
230
179
* - :authrole:`userAdminAnyDatabase`
231
180
232
- - Provides the same access to user administration operations as
233
- :authrole:`userAdmin`, except it applies to all but the
234
- ``local`` and ``config`` databases in the cluster.
181
+ - .. include:: /includes/extracts/built-in-roles-userAdminAnyDatabase.rst
235
182
236
183
Since the :authrole:`userAdminAnyDatabase` role allows users to
237
184
grant any privilege to any user, including themselves, the role
238
185
also indirectly provides :ref:`superuser <superuser>` access.
239
-
186
+
240
187
For the specific privileges granted by the role, see
241
188
:authrole:`userAdminAnyDatabase`.
242
189
@@ -247,23 +194,14 @@ and ``config`` databases in a :binary:`~bin.mongod` instance:
247
194
248
195
* - :authrole:`dbAdminAnyDatabase`
249
196
250
- - Provides the same access to database administration operations
251
- as :authrole:`dbAdmin`, except it applies to all but the
252
- ``local`` and ``config`` databases in the cluster. The role also
253
- provides the :authaction:`listDatabases` action on the cluster
254
- as a whole.
197
+ - .. include:: /includes/extracts/built-in-roles-dbAdminAnyDatabase.rst
255
198
256
199
For the specific privileges granted by the role, see
257
200
:authrole:`dbAdminAnyDatabase`.
258
201
259
202
.. versionchanged:: 3.4
260
203
261
- Prior to 3.4, :authrole:`dbAdminAnyDatabase` includes
262
- ``local`` and ``config`` databases. To provide ``dbAdmin``
263
- privileges on the ``local`` database, create a user in the
264
- ``admin`` database with :authrole:`dbAdmin` role in the
265
- ``local`` database. See also :authrole:`clusterManager` role
266
- for access to the ``config`` and ``local`` databases.
204
+ .. include:: /includes/extracts/built-in-roles-dbAdminAnyDatabase-prior.rst
267
205
268
206
Superuser Roles
269
207
---------------
@@ -279,11 +217,7 @@ The following role provides full privileges on all resources:
279
217
280
218
* - :authrole:`root`
281
219
282
- - Provides access to the operations and all the resources of the
283
- :authrole:`readWriteAnyDatabase`,
284
- :authrole:`dbAdminAnyDatabase`, :authrole:`userAdminAnyDatabase`,
285
- :authrole:`clusterAdmin`, :authrole:`restore`, and
286
- :authrole:`backup` *combined*.
220
+ - .. include:: /includes/extracts/built-in-roles-root.rst
287
221
288
222
For the specific privileges granted by the role, see
289
223
:authrole:`root`.
@@ -306,6 +240,6 @@ Internal Role
306
240
**Do not** assign this role to user objects representing applications or
307
241
human administrators, other than in exceptional circumstances.
308
242
309
- For more information, see :authrole:`root `.
243
+ For more information, see :authrole:`__system `.
310
244
311
245
.. seealso:: :doc:`/reference/built-in-roles`
0 commit comments