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 @@ -29,6 +29,11 @@ Authentication
29
29
30
30
.. include:: /includes/fact-onprem-auth
31
31
32
+ Roles
33
+ -----
34
+
35
+ .. include:: /includes/fact-onprem-roles
36
+
32
37
Behavior
33
38
--------
34
39
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 @@ -22,11 +22,45 @@ Starts the synchronization between a source and destination cluster.
22
22
Requirements
23
23
------------
24
24
25
+ State
26
+ ~~~~~
27
+
25
28
To use the ``start`` endpoint, ``mongosync`` must be in the ``IDLE``
26
29
state.
27
30
31
+ User Write Blocking
32
+ ~~~~~~~~~~~~~~~~~~~
33
+
28
34
.. include:: /includes/fact-write-blocking-requirement.rst
35
+
36
+ To set a custom role for the ``mongosync`` user:
37
+
38
+ #. To create a custom role, use the :dbcommand:`createRole` command:
39
+
40
+ .. code-block:: javascript
41
+
42
+ db.adminCommand( {
43
+ createRole: "reverseSync",
44
+ privileges: [ {
45
+ resource: { db: "", collection: "" },
46
+ actions: [ "setUserWriteBlockMode", "bypassWriteBlockingMode" ]
47
+ } ],
48
+ roles: []
49
+ } )
29
50
51
+ #. To grant the custom role to the ``mongosync`` user, use the :dbcommand:`grantRolesToUser` command:
52
+
53
+ .. code-block:: javascript
54
+
55
+ db.adminCommand( {
56
+ grantRolesToUser: "mongosync-user",
57
+ roles: [ { role: "reverseSync", db: "admin" } ]
58
+ } )
59
+
60
+ Ensure that you use this configured ``mongosync`` user in the connection
61
+ strings for the :setting:`cluster0` or :setting:`cluster1` settings when
62
+ you start ``mongosync``.
63
+
30
64
Request
31
65
-------
32
66
You can’t perform that action at this time.
0 commit comments