Skip to content

Commit 5eb9fe6

Browse files
authored
(DOCSP-32330) Adds Atlas built-in role info to server docs (#4711)
* (DOCSP-32330) Adds Atlas built-in role info to server docs * Adds Atlas section and refines intro * Changes heading levels
1 parent a7e08d6 commit 5eb9fe6

File tree

2 files changed

+82
-13
lines changed

2 files changed

+82
-13
lines changed

source/core/security-user-defined-roles.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ MongoDB provides a number of :doc:`built-in roles
1616
</reference/built-in-roles>`. However, if these roles cannot describe the
1717
desired set of privileges, you can create new roles.
1818

19+
.. note::
20+
21+
You can configure custom database roles in the UI for deployments
22+
hosted in {+atlas+}. To learn more, see
23+
:atlas:`Configure Custom Database Roles
24+
</security-add-mongodb-roles>`.
25+
1926
Role Management Interface
2027
-------------------------
2128

source/reference/built-in-roles.txt

Lines changed: 75 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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

1515
MongoDB 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
2727
for all :ref:`system collections <metadata-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-
3429
This section describes the privileges for each built-in role. You can also
3530
view 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

41103
Database User Roles
42-
-------------------
104+
~~~~~~~~~~~~~~~~~~~
43105

44106
Every database includes the following client roles:
45107

@@ -95,7 +157,7 @@ Every database includes the following client roles:
95157
.. _database-administration-roles:
96158

97159
Database Administration Roles
98-
-----------------------------
160+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99161

100162
Every database includes the following database administration roles:
101163

@@ -223,7 +285,7 @@ Every database includes the following database administration roles:
223285
.. _admin-roles:
224286

225287
Cluster Administration Roles
226-
----------------------------
288+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227289

228290
.. include:: /includes/extracts/built-in-roles-cluster-admin-roles.rst
229291

@@ -572,7 +634,7 @@ Cluster Administration Roles
572634
.. _backup-and-restore-roles:
573635

574636
Backup and Restoration Roles
575-
----------------------------
637+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
576638

577639
.. include:: /includes/extracts/built-in-roles-backup-roles.rst
578640

@@ -745,7 +807,7 @@ Backup and Restoration Roles
745807
.. _auth-any-database-roles:
746808

747809
All-Database Roles
748-
------------------
810+
~~~~~~~~~~~~~~~~~~
749811

750812
.. include:: /includes/extracts/built-in-roles-all-database-roles.rst
751813

@@ -810,7 +872,7 @@ All-Database Roles
810872
.. _superuser:
811873

812874
Superuser Roles
813-
---------------
875+
~~~~~~~~~~~~~~~
814876

815877
Several roles provide either indirect or direct system-wide superuser access.
816878

@@ -837,7 +899,7 @@ The following role provides full privileges on all resources:
837899
collection in the ``config`` database.
838900

839901
Internal Role
840-
-------------
902+
~~~~~~~~~~~~~
841903

842904
.. authrole:: __system
843905

0 commit comments

Comments
 (0)