Skip to content

Commit e7d8813

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

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 :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-
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

@@ -87,7 +149,7 @@ Every database includes the following client roles:
87149
.. _database-administration-roles:
88150

89151
Database Administration Roles
90-
-----------------------------
152+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91153

92154
Every database includes the following database administration roles:
93155

@@ -209,7 +271,7 @@ Every database includes the following database administration roles:
209271
.. _admin-roles:
210272

211273
Cluster 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

552614
Backup 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

711773
All-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

771833
Superuser Roles
772-
---------------
834+
~~~~~~~~~~~~~~~
773835

774836
Several 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

792854
Internal Role
793-
-------------
855+
~~~~~~~~~~~~~
794856

795857
.. authrole:: __system
796858

0 commit comments

Comments
 (0)