@@ -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
@@ -87,7 +149,7 @@ Every database includes the following client roles:
87149.. _database-administration-roles:
88150
89151Database Administration Roles
90- -----------------------------
152+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91153
92154Every database includes the following database administration roles:
93155
@@ -209,7 +271,7 @@ Every database includes the following database administration roles:
209271.. _admin-roles:
210272
211273Cluster Administration Roles
212- ----------------------------
274+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213275
214276.. include:: /includes/extracts/built-in-roles-cluster-admin-roles.rst
215277
@@ -550,7 +612,7 @@ Cluster Administration Roles
550612.. _backup-and-restore-roles:
551613
552614Backup and Restoration Roles
553- ----------------------------
615+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
554616
555617.. include:: /includes/extracts/built-in-roles-backup-roles.rst
556618
@@ -709,7 +771,7 @@ Backup and Restoration Roles
709771.. _auth-any-database-roles:
710772
711773All-Database Roles
712- ------------------
774+ ~~~~~~~~~~~~~~~~~~
713775
714776.. include:: /includes/extracts/built-in-roles-all-database-roles.rst
715777
@@ -769,7 +831,7 @@ All-Database Roles
769831.. _superuser:
770832
771833Superuser Roles
772- ---------------
834+ ~~~~~~~~~~~~~~~
773835
774836Several roles provide either indirect or direct system-wide superuser access.
775837
@@ -790,7 +852,7 @@ The following role provides full privileges on all resources:
790852 .. include:: /includes/extracts/built-in-roles-root.rst
791853
792854Internal Role
793- -------------
855+ ~~~~~~~~~~~~~
794856
795857.. authrole:: __system
796858
0 commit comments