Skip to content

Commit 888b093

Browse files
committed
DOCS-8616: Kay CR
1 parent be171b8 commit 888b093

6 files changed

+47
-49
lines changed

source/includes/steps-enable-authentication-in-shardcluster-nodowntime-auth-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ source:
2121
ref: restart-mongod
2222
post: |
2323
24-
At the end of this section, the config server replica set should be up and
25-
running fully enforcing authentication.
24+
At the end of this section the config server replica set should be up and
25+
running, fully enforcing authentication.
2626
2727
Users and client applications *must* specify authentiation credentials when
2828
connecting to the config server replica set.

source/includes/steps-enable-authentication-in-shardcluster-nodowntime-auth-mongos.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,12 @@ pre: |
3232
3333
db.getSiblingDB("admin").shutdownServer()
3434
35-
You can then start the :program:`mongos` specifying the updated
36-
configuration file, specifying the path to the config file using
37-
:option:`--config`.. This configuration file no longer contains the
38-
:setting:`security.transitionToAuth` setting, but retains the
39-
:setting:`security.keyFile` setting.
35+
You can then restart the :program:`mongos specifying the path to the updated
36+
config file using :option:`--config`.
4037
4138
.. example::
4239
43-
The following operation starts the :program:`mongos` specifying
40+
The following operation restarts the :program:`mongos` specifying
4441
the updated configuration file, here named ``mongos-secure.conf``.
4542
The ``<path>`` represents the system path to the folder containing
4643
the configuration file.
@@ -52,4 +49,5 @@ pre: |
5249
.. note::
5350
5451
MongoDB deployments running on :abbr:`Windows (Microsoft Windows)` use
55-
the ``.cfg`` file extension instead of ``.conf``.
52+
the ``.cfg`` file extension instead of ``.conf``, and
53+
:program:`mongos.exe` instead of :program:`mongos`.

source/includes/steps-enable-authentication-in-shardcluster-nodowntime-transition-config.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ title: "Add ``transitionToAuth: true`` to the ``mongod`` configuration file."
44
ref: modify-config-files
55
pre: |
66
7-
Copy the existing {{program}} configuration file and name the copy to
8-
distinguish it, for example, by adding ``-secure`` to the filename. You will
9-
use this new configuration file to transition the {{program}} to enforce
10-
authentication in the sharded cluster. Retain the original configuration
11-
file for backup purposes.
7+
Copy the existing {{program}} configuration file, giving it a distinct
8+
name such as ``<filename>-secure``.
9+
10+
You will use this new configuration file to transition the {{program}} to
11+
enforce authentication in the sharded cluster. Retain the original
12+
configuration file for backup purposes.
1213
1314
Add the following settings to the new configuration file.
1415
@@ -25,8 +26,8 @@ pre: |
2526
* - :setting:`security.keyFile`
2627
- Path to the keyfile.
2728
28-
If using a different internal authentication mechanism, specify that
29-
mechanism instead of :setting:`security.keyFile`.
29+
If using a different internal authentication mechanism, specify
30+
settings appropriate for the mechanism.
3031
3132
The new configuration file should contain all of the configuration settings
3233
previously used by the {{program}}, as well as the new security
@@ -59,15 +60,15 @@ pre: |
5960
down the primary and trigger an election. You can use the
6061
:method:`rs.status()` method to ensure the replica set elected a new primary.
6162
62-
Once you step down the primary, you can then shut it down using the
63+
Once you step down the primary, you shut it down using the
6364
:method:`db.shutdownServer()` method against the ``admin`` database.
6465
6566
.. code-block:: javascript
6667
6768
db.getSiblingDB("admin").rs.stepDown()
6869
db.getSiblingDB("admin").shutdownServer()
6970
70-
You can then restart the :program:`mongod` with the {{status}} configuration
71+
Restart the :program:`mongod` with the {{status}} configuration
7172
file, specifying the path to the config file using :option:`--config`.
7273
7374
.. example::

source/includes/steps-enable-authentication-in-shardcluster-nodowntime-transition-mongos.yaml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ title: "Add ``transitionToAuth: true`` to the ``mongos`` configuration file"
44
ref: modify-config-files
55
pre: |
66
7-
Copy the existing {{program}} configuration file and name the copy to
8-
distinguish it, for example, by adding ``-secure`` to the filename. You will
9-
use this new configuration file to transition the {{program}} to enforce
10-
authentication in the sharded cluster. Retain the original configuration
11-
file for backup purposes.
7+
Copy the existing {{program}} configuration file, giving it a distinct
8+
name such as ``<filename>-secure``.
9+
10+
You will use this new configuration file to transition the {{program}} to
11+
enforce authentication in the sharded cluster. Retain the original
12+
configuration file for backup purposes.
1213
1314
Add the following settings to the new configuration file.
1415
@@ -25,8 +26,8 @@ pre: |
2526
* - :setting:`security.keyFile`
2627
- Path to the keyfile.
2728
28-
If using a different internal authentication mechanism, specify that
29-
mechanism instead of :setting:`security.keyFile`.
29+
If using a different internal authentication mechanism, specify
30+
settings appropriate for the mechanism.
3031
3132
The new configuration file should contain all of the configuration settings
3233
previously used by the {{program}}, as well as the new security
@@ -50,17 +51,20 @@ pre: |
5051
method against the ``admin`` database to safely shut down the
5152
:program:`mongos`.
5253
53-
Restart one :program:`mongos` at a time to ensure that clients
54-
can connect to the sharded cluster. If your cluster has only one
55-
:program:`mongos`, this step results in downtime while the :program:`mongos`
56-
is offline.
54+
Restart one :program:`mongos` at a time to ensure that clients can connect
55+
to the sharded cluster. If your cluster has only one :program:`mongos`, this
56+
step results in downtime while the :program:`mongos` is offline.
57+
58+
Connect to the :program:`mongos` and use the :method:`db.shutdownServer()`
59+
method against the ``admin`` database to safely shut down the
60+
:program:`mongos`.
5761
5862
.. code-block:: javascript
5963
6064
db.getSiblingDB("admin").shutdownServer()
6165
62-
You can then start the :program:`mongos` with the new configuration
63-
file, specifying the path to the config file using :option:`--config`.
66+
Restart :program:`mongos` with the new configuration file, specifying the
67+
path to the config file using :option:`--config`.
6468
6569
.. example::
6670

source/includes/steps-enable-authentication-in-shardcluster-nodowntime-uac.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pre: |
77
Clients performing maintenance operations or user administrative
88
operations on the {{CLUSTER}} must authenticate as this user
99
at the completion of this tutorial. Create this user now to ensure
10-
that you have seamless access to the cluster after enforcing authentication.
10+
that you have access to the cluster after enforcing authentication.
1111
1212
Create a user with the :method:`db.createUser()` method and assign it the
1313
following roles:
@@ -35,12 +35,7 @@ post: |
3535
.. important::
3636
3737
Passwords should be random, long, and complex to ensure system security
38-
and to prevent or delay malicious access.
39-
40-
While this tutorial uses a single administrative user, you should
41-
consider applying the `principle of least privilege
42-
<https://www.us-cert.gov/bsi/articles/knowledge/principles/least-privilege>`_
43-
when configuring MongoDB users in your deployment.
38+
and to prevent or hinder malicious access.
4439
4540
replacement:
4641
CLUSTER: "sharded cluster"
@@ -50,23 +45,23 @@ title: "Create users for client applications to authenticate with."
5045
optional: true
5146
pre: |
5247
53-
You can create users for your client applications to authenticate with prior
48+
You can create users for your client applications to authenticate prior
5449
to enforcing authentication in the sharded cluster. This ensures
55-
seamless access to the sharded cluster once you fully enforce authentication.
50+
access to the sharded cluster once you fully enforce authentication.
5651
5752
.. example::
5853
59-
The following operation creates the user ``joe`` on the ``analytics``
54+
The following operation creates the user ``joe`` on the ``marketing``
6055
database, assigning it the :authrole:`readWrite` :ref:`built-in role
61-
<built-in-roles>`.
56+
<built-in-roles>` on the ``marketing`` database`.
6257
6358
.. code-block:: javascript
6459
6560
db.getSiblingDB("marketing").createUser(
6661
{
6762
"user": "joe",
6863
"pwd": "<password>",
69-
"roles": [ { "role" : "readWrite", "db" : "analytics" } ]
64+
"roles": [ { "role" : "readWrite", "db" : "marketing" } ]
7065
}
7166
)
7267

source/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster-no-downtime.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
==========================================================================
2-
Enable mandatory user authentication in a sharded cluster without downtime
2+
Enable Mandatory User Authentication in a Sharded Cluster Without Downtime
33
==========================================================================
44

55
.. default-domain:: mongodb
@@ -32,7 +32,7 @@ A MongoDB sharded cluster can enforce :ref:`user authentication
3232
authentication <inter-process-auth>` among the sharded cluster
3333
:program:`mongod` and :program:`mongos` components.
3434

35-
This tutorial describes a correct procedure for using
35+
This tutorial describes a procedure for using
3636
:setting:`security.transitionToAuth` to enable access control in an existing
3737
MongoDB sharded cluster without incurring downtime.
3838

@@ -194,7 +194,7 @@ Procedure
194194
Repeat these steps for each shard replica set in the sharded cluster.
195195

196196
Perform these steps on one shard replica set at a time, and one member in the
197-
shard replica set at a time. Work on the :term:`secondary` or :term:`arbiter`
197+
shard replica set at a time. Work on the :term:`secondary`
198198
members *first*, and the :term:`primary` *last*.
199199

200200
.. include:: /includes/steps/enable-authentication-in-shardcluster-nodowntime-transition-shards.rst
@@ -244,8 +244,8 @@ sharded cluster, you must restart each :program:`mongod` instance without
244244
the :setting:`security.transitionToAuth` setting.
245245

246246
Perform these steps for each :program:`mongod` in the config server replica
247-
set, one member at a time. Work on the :term:`secondary` or
248-
:term:`arbiter` members *first*, and the :term:`primary` *last*.
247+
set, one member at a time. Work on the :term:`secondary` or members *first*,
248+
and the :term:`primary` *last*.
249249

250250
.. include:: /includes/steps/enable-authentication-in-shardcluster-nodowntime-auth-config.rst
251251

@@ -269,7 +269,7 @@ sharded cluster without the :setting:`security.transitionToAuth` setting.
269269
Repeat these steps for each shard replica set in the sharded cluster.
270270

271271
Perform these steps on one shard replica set at a time, and one member in the
272-
shard replica set at a time. Work on the :term:`secondary` or :term:`arbiter`
272+
shard replica set at a time. Work on the :term:`secondary`
273273
members *first*, and the :term:`primary` *last*.
274274

275275
.. include:: /includes/steps/enable-authentication-in-shardcluster-nodowntime-auth-shard.rst

0 commit comments

Comments
 (0)