File tree Expand file tree Collapse file tree 5 files changed +79
-13
lines changed Expand file tree Collapse file tree 5 files changed +79
-13
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ Authentication
28
28
29
29
.. include:: /includes/fact-onprem-auth
30
30
31
+ Roles
32
+ -----
33
+
34
+ .. include:: /includes/fact-onprem-roles
35
+
31
36
Behavior
32
37
--------
33
38
Original file line number Diff line number Diff line change 1
- The user specified in the connection string must have the
1
+ The user specified in the connection string must have, at a minimum, the
2
2
:atlasrole: `atlasAdmin ` role.
3
3
4
- To use ``mongosync `` in the :ref: `reverse direction <c2c-api-reverse >`,
5
- you must `create a custom role
6
- </atlas/reference/api/custom-roles-create-a-role/> `__ that grants the
7
- following ActionTypes:
4
+ .. note ::
8
5
9
- - setUserWriteBlockMode
10
- - bypassWriteBlockingMode
11
-
12
- The ``setUserWriteBlockMode `` and ``bypassWriteBlockingMode ``
13
- ActionTypes are available starting in MongoDB 6.0. To create the custom
14
- roles, all clusters in a project must be on MongoDB 6.0 or higher.
6
+ To use ``mongosync `` in the :ref: `reverse direction <c2c-api-reverse >`,
7
+ you must :atlas: `create a custum role
8
+ </reference/api/custom-roles-create-a-role> ` that grants the
9
+ following ActionTypes:
10
+
11
+ - :authaction: `setUserWriteBlockMode `
12
+ - :authaction: `bypassWriteBlockingMode `
13
+
14
+ The ``setUserWriteBlockMode `` and ``bypassWriteBlockingMode ``
15
+ ActionTypes are available starting in MongoDB 6.0. To create the custom
16
+ roles, all clusters in a project must be on MongoDB 6.0 or higher.
15
17
Original file line number Diff line number Diff line change
1
+
2
+ The user specified in the connection string must have, at a minimum, the
3
+ :authrole: `readAnyDatabase `, :authrole: `clusterMonitor `, and
4
+ :authrole: `backup ` roles.
5
+
6
+ .. note ::
7
+
8
+ To use ``mongosync `` in the :ref: `reverse direction <c2c-api-reverse >`,
9
+ you must create a custom role (using the :dbcommand: `createRole ` command)
10
+ that grants the following ActionTypes:
11
+
12
+ - :authaction: `setUserWriteBlockMode `
13
+ - :authaction: `bypassWriteBlockingMode `
14
+
15
+ The ``setUserWriteBlockMode `` and ``bypassWriteBlockingMode ``
16
+ ActionTypes are available starting in MongoDB 6.0. To create the custom
17
+ roles, all clusters in a project must be on MongoDB 6.0 or higher.
Original file line number Diff line number Diff line change 1
1
To set ``enableUserWriteBlocking ``, the ``mongosync `` user must have a
2
- role that includes the ``setUserWriteBlockMode `` and
3
- ``bypassWriteBlockingMode `` ActionTypes.
2
+ role that includes the :authaction: `setUserWriteBlockMode ` and
3
+ :authaction: `bypassWriteBlockingMode ` ActionTypes.
4
+
5
+ .. note ::
6
+
7
+ When using ``enableUserWriteBlocking ``, writes are only blocked for users
8
+ that do not have the :authaction: `bypassWriteBlockingMode ` ActionType. Users
9
+ who have this ActionType are able to perform writes.
10
+
11
+
Original file line number Diff line number Diff line change @@ -21,11 +21,45 @@ Starts the synchronization between a source and destination cluster.
21
21
Requirements
22
22
------------
23
23
24
+ State
25
+ ~~~~~
26
+
24
27
To use the ``start`` endpoint, ``mongosync`` must be in the ``IDLE``
25
28
state.
26
29
30
+ User Write Blocking
31
+ ~~~~~~~~~~~~~~~~~~~
32
+
27
33
.. include:: /includes/fact-write-blocking-requirement.rst
34
+
35
+ To set a custom role for the ``mongosync`` user:
36
+
37
+ #. To create a custom role, use the :dbcommand:`createRole` command:
38
+
39
+ .. code-block:: javascript
40
+
41
+ db.adminCommand( {
42
+ createRole: "reverseSync",
43
+ privileges: [ {
44
+ resource: { db: "", collection: "" },
45
+ actions: [ "setUserWriteBlockMode", "bypassWriteBlockingMode" ]
46
+ } ],
47
+ roles: []
48
+ } )
28
49
50
+ #. To grant the custom role to the ``mongosync`` user, use the :dbcommand:`grantRolesToUser` command:
51
+
52
+ .. code-block:: javascript
53
+
54
+ db.adminCommand( {
55
+ grantRolesToUser: "mongosync-user",
56
+ roles: [ { role: "reverseSync", db: "admin" } ]
57
+ } )
58
+
59
+ Ensure that you use this configured ``mongosync`` user in the connection
60
+ strings for the :setting:`cluster0` or :setting:`cluster1` settings when
61
+ you start ``mongosync``.
62
+
29
63
Request
30
64
-------
31
65
You can’t perform that action at this time.
0 commit comments