@@ -9,7 +9,7 @@ Built-In Roles
99.. contents:: On this page
1010 :local:
1111 :backlinks: none
12- :depth: 1
12+ :depth: 2
1313 :class: singlecol
1414
1515MongoDB grants access to data and commands through :ref:`role-based
@@ -26,20 +26,82 @@ Each of MongoDB's built-in roles defines access at the database level for all
2626*non*-system collections in the role's database and at the collection level
2727for all :doc:`system collections </reference/system-collections>`.
2828
29- MongoDB provides the built-in :ref:`database user <database-user-roles>` and
30- :ref:`database administration <database-administration-roles>` roles on
31- *every* database. MongoDB provides all other built-in roles only on the
32- ``admin`` database.
33-
3429This section describes the privileges for each built-in role. You can also
3530view the privileges for a built-in role at any time by issuing the
3631:dbcommand:`rolesInfo` command with the ``showPrivileges`` and
3732``showBuiltinRoles`` fields both set to ``true``.
3833
34+ Compatibility
35+ -------------
36+
37+ .. |page-topic| replace:: use built-in roles
38+
39+ .. include:: /includes/fact-atlas-compatible.rst
40+
41+ {+atlas+} deployments have different built-in roles than self-hosted
42+ deployments. See the following resources to learn more:
43+
44+ - :ref:`atlas-built-in-roles`
45+ - :ref:`self-hosted-built-in-roles`
46+
47+ .. _atlas-built-in-roles:
48+
49+ {+atlas+} Built-In Roles
50+ -----------------------------
51+
52+ You can assign the following built-in database user roles for
53+ deployments hosted in {+atlas+}:
54+
55+ .. list-table::
56+ :header-rows: 1
57+
58+ * - MongoDB Role
59+ - Role Name in the {+atlas+} UI
60+ - Inherited Roles or Privilege Actions
61+
62+ * - ``atlasAdmin``
63+ - :guilabel:`Atlas admin`
64+ -
65+ - :authrole:`readWriteAnyDatabase`
66+ - :authrole:`readAnyDatabase`
67+ - :authrole:`dbAdminAnyDatabase`
68+ - :authrole:`clusterMonitor`
69+ - :authaction:`cleanupOrphaned`
70+ - :authaction:`enableSharding`
71+ - :authaction:`flushRouterConfig`
72+ - :authaction:`moveChunk`
73+ - :authaction:`viewUser`
74+
75+ * - ``readWriteAnyDatabase``
76+ - :guilabel:`Read and write to any database`
77+ -
78+ - :authrole:`readWriteAnyDatabase`
79+
80+ * - ``readAnyDatabase``
81+ - :guilabel:`Only read any database`
82+ -
83+ - :authrole:`readAnyDatabase`
84+
85+ You can create database users and assign built-in roles in the
86+ {+atlas+} UI. To learn more, see :atlas:`Add Database Users </security-add-mongodb-users/#add-database-users>`.
87+
88+ .. _self-hosted-built-in-roles:
89+
90+ Self-Hosted Deployment Built-In Roles
91+ -------------------------------------
92+
93+ MongoDB provides the following built-in roles for self-hosted
94+ deployments:
95+
96+ - :ref:`Database user <database-user-roles>` and
97+ :ref:`database administration <database-administration-roles>` roles
98+ on *every* database
99+ - All other roles only on the ``admin`` database
100+
39101.. _database-user-roles:
40102
41103Database User Roles
42- -------------------
104+ ~~~~~~~~~~~~~~~~~~~
43105
44106Every database includes the following client roles:
45107
@@ -90,7 +152,7 @@ Every database includes the following client roles:
90152.. _database-administration-roles:
91153
92154Database Administration Roles
93- -----------------------------
155+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94156
95157Every database includes the following database administration roles:
96158
@@ -212,7 +274,7 @@ Every database includes the following database administration roles:
212274.. _admin-roles:
213275
214276Cluster Administration Roles
215- ----------------------------
277+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216278
217279.. include:: /includes/extracts/built-in-roles-cluster-admin-roles.rst
218280
@@ -554,7 +616,7 @@ Cluster Administration Roles
554616.. _backup-and-restore-roles:
555617
556618Backup and Restoration Roles
557- ----------------------------
619+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
558620
559621.. include:: /includes/extracts/built-in-roles-backup-roles.rst
560622
@@ -720,7 +782,7 @@ Backup and Restoration Roles
720782.. _auth-any-database-roles:
721783
722784All-Database Roles
723- ------------------
785+ ~~~~~~~~~~~~~~~~~~
724786
725787.. include:: /includes/extracts/built-in-roles-all-database-roles.rst
726788
@@ -783,7 +845,7 @@ All-Database Roles
783845.. _superuser:
784846
785847Superuser Roles
786- ---------------
848+ ~~~~~~~~~~~~~~~
787849
788850Several roles provide either indirect or direct system-wide superuser access.
789851
@@ -810,7 +872,7 @@ The following role provides full privileges on all resources:
810872 collection in the ``config`` database.
811873
812874Internal Role
813- -------------
875+ ~~~~~~~~~~~~~
814876
815877.. authrole:: __system
816878
0 commit comments