@@ -36,18 +36,13 @@ Every database includes the following roles:
3636
3737 * - :authrole:`read`
3838
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
4340
4441 For the specific privileges granted by the role, see :authrole:`read`.
4542
4643 * - :authrole:`readWrite`
4744
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
5146
5247 For the specific privileges granted by the role, see
5348 :authrole:`readWrite`.
@@ -66,39 +61,26 @@ Every database includes the following database administration roles:
6661
6762 * - :authrole:`dbAdmin`
6863
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
7265
7366 For the specific privileges granted by the role, see
7467 :authrole:`dbAdmin`.
7568
7669 * - :authrole:`dbOwner`
7770
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
8272
8373 * - :authrole:`userAdmin`
8474
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
9176
9277 For the specific privileges granted by the role, see
9378 :authrole:`userAdmin`.
9479
9580Cluster Administration Roles
9681----------------------------
9782
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
10284
10385.. list-table::
10486 :header-rows: 1
@@ -109,41 +91,33 @@ administrative functions.
10991
11092 * - :authrole:`clusterAdmin`
11193
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
11695
11796 * - :authrole:`clusterManager`
11897
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
12399
124100 For the specific privileges granted by the role, see
125101 :authrole:`clusterManager`.
126102
127103 * - :authrole:`clusterMonitor`
128104
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
131106
132107 For the specific privileges granted by the role, see
133108 :authrole:`clusterMonitor`.
134109
135110 * - :authrole:`hostManager`
136111
137- - Provides the ability to monitor and manage servers.
112+ - .. include:: /includes/extracts/built-in-roles-hostMonitor.rst
138113
139114 For the specific privileges granted by the role, see
140115 :authrole:`hostManager`.
141116
142117Backup and Restoration Roles
143118----------------------------
144119
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
147121
148122.. list-table::
149123 :header-rows: 1
@@ -154,19 +128,14 @@ restoring data:
154128
155129 * - :authrole:`backup`
156130
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
161132
162133 For the specific privileges granted by the role, see
163134 :authrole:`backup`.
164135
165136 * - :authrole:`restore`
166137
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
170139
171140 For the specific privileges granted by the role, see
172141 :authrole:`restore`.
@@ -176,10 +145,7 @@ restoring data:
176145All-Database Roles
177146------------------
178147
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
183149
184150.. list-table::
185151 :header-rows: 1
@@ -190,53 +156,34 @@ and ``config`` databases in a :binary:`~bin.mongod` instance:
190156
191157 * - :authrole:`readAnyDatabase`
192158
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
197160
198161 For the specific privileges granted by the role, see
199162 :authrole:`readAnyDatabase`.
200163
201164 .. versionchanged:: 3.4
202165
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
209167
210168 * - :authrole:`readWriteAnyDatabase`
211169
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
217171
218172 For the specific privileges granted by the role, see
219173 :authrole:`readWriteAnyDatabase`.
220174
221175 .. versionchanged:: 3.4
222176
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
229178
230179 * - :authrole:`userAdminAnyDatabase`
231180
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
235182
236183 Since the :authrole:`userAdminAnyDatabase` role allows users to
237184 grant any privilege to any user, including themselves, the role
238185 also indirectly provides :ref:`superuser <superuser>` access.
239-
186+
240187 For the specific privileges granted by the role, see
241188 :authrole:`userAdminAnyDatabase`.
242189
@@ -247,23 +194,14 @@ and ``config`` databases in a :binary:`~bin.mongod` instance:
247194
248195 * - :authrole:`dbAdminAnyDatabase`
249196
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
255198
256199 For the specific privileges granted by the role, see
257200 :authrole:`dbAdminAnyDatabase`.
258201
259202 .. versionchanged:: 3.4
260203
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
267205
268206Superuser Roles
269207---------------
@@ -279,11 +217,7 @@ The following role provides full privileges on all resources:
279217
280218 * - :authrole:`root`
281219
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
287221
288222 For the specific privileges granted by the role, see
289223 :authrole:`root`.
@@ -306,6 +240,6 @@ Internal Role
306240 **Do not** assign this role to user objects representing applications or
307241 human administrators, other than in exceptional circumstances.
308242
309- For more information, see :authrole:`root `.
243+ For more information, see :authrole:`__system `.
310244
311245.. seealso:: :doc:`/reference/built-in-roles`
0 commit comments