Skip to content

Commit 544c480

Browse files
author
Dave
authored
DOCSP-3184 steps to deploy encryption at rest v4.4 (#71) (#78)
* DOCSP-3184 Steps to deploy encryption at rest * Initial pass finished * broken step refs * Update URLs * Clean up * Internal review feedback * Streamline initial synch steps * Fix ref spacing
1 parent bfb79cb commit 544c480

File tree

2 files changed

+110
-18
lines changed

2 files changed

+110
-18
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
title: Prepare a server.
2+
stepnum: 1
3+
ref: "stp-clear-the-data"
4+
level: 4
5+
content: |
6+
7+
Follow these steps to prepare the server:
8+
9+
- Pick one of the secondary servers.
10+
- Stop :binary:`~bin.mongod` on the secondary server.
11+
- Optional: Backup the data in :setting:`~storage.dbPath`. If a full
12+
backup is not required, consider backing up just the
13+
``diagnostic.data`` directory to preserve potentially-useful
14+
troubleshooting data in the event of an issue. See :ref:`Full Time
15+
Diagnostic Data Capture <ftdc-stub>` for more information.
16+
- Remove the files and directories in the
17+
:setting:`~storage.dbPath`.
18+
---
19+
title: Enable encryption.
20+
stepnum: 2
21+
ref: "stp-enable-encryption"
22+
level: 4
23+
content: |
24+
25+
Start the secondary server with :ref:`encryption enabled
26+
<encrypt-with-new-key>`. The :binary:`~bin.mongod` instance creates
27+
a new keystore.
28+
---
29+
title: Synchronize the data.
30+
stepnum: 3
31+
ref: "stp-sync-the-data"
32+
level: 4
33+
content: |
34+
35+
Import the data from the primary. :doc:`Start the mongod process
36+
</tutorial/manage-mongodb-processes>`, specifying
37+
:ref:`cli-mongod-replica-set` as appropriate.
38+
39+
:binary:`~bin.mongod` performs an initial sync and encrypts the data
40+
during the sync up process.
41+
42+
---
43+
title: Repeat the process on the secondaries.
44+
stepnum: 4
45+
ref: "stp-repeat-the-process"
46+
level: 4
47+
content: |
48+
49+
When the first secondary has finished importing and encrypting the
50+
data, repeat the process on the other secondary
51+
:binary:`~bin.mongod` instances.
52+
---
53+
title: Encrypt the primary.
54+
stepnum: 5
55+
ref: "stp-encrypt-the-primary"
56+
level: 4
57+
content: |
58+
59+
When the all the secondaries have been encrypted, :method:`step down
60+
<rs.stepDown>` the primary. Eligible secondaries will elect a new
61+
primary.
62+
63+
The old primary is now a secondary. Repeat the steps to remove the
64+
unencrypted data and then run an :ref:`initial sync
65+
<replica-set-initial-sync>`.
66+
...
67+

source/tutorial/configure-encryption.txt

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,35 @@ Configure Encryption
1515
Overview
1616
--------
1717

18-
.. include:: /includes/fact-enterprise-only-admonition.rst
19-
20-
.. important::
21-
22-
Available for the WiredTiger Storage Engine Only.
23-
24-
.. note:: Changed in version 4.0
25-
26-
27-
.. include:: /includes/fact-aes.rst
18+
This page discusses server configuration to support encryption at rest.
19+
If you use `MongoDB Atlas <https://www.mongodb.com/cloud/atlas>`__,
20+
your data is already encrypted. MongoDB manages Atlas encryption at the
21+
cloud provider level, but you can also use your own key management
22+
solution. See the Atlas `key management documentation
23+
<https://docs.atlas.mongodb.com/security-kms-encryption/>`__ for details.
2824

2925
MongoDB Enterprise 3.2 introduces a native encryption option for the
30-
WiredTiger storage engine. With storage encryption, the secure
31-
management of the encryption keys is critical.
26+
WiredTiger storage engine. Outside Atlas, encryption is only available
27+
for enterprise installations that use the WiredTiger Storage Engine.
28+
29+
Secure management of the encryption keys is a critical requirement for
30+
storage encryption. MongoDB uses a master key that is not stored with
31+
the MongoDB installation. Only the master key is externally managed,
32+
other keys can be stored with your MongoDB instance.
3233

33-
Only the master key is external to the server and requires external
34-
management. To manage the master key, MongoDB's encrypted storage
35-
engine supports two key management options:
34+
MongoDB's encrypted storage engine supports two key management options
35+
for the master key:
3636

3737
- Integration with a third party key management appliance via the Key
3838
Management Interoperability Protocol (KMIP). **Recommended**
39-
4039
- Use of local key management via a keyfile.
4140

42-
The following tutorial outlines the procedures to configure MongoDB for
43-
encryption and key management.
41+
.. important::
42+
43+
MongoDB cannot encrypt existing data. When you enable encryption
44+
with a new key, the MongoDB instance cannot have any pre-existing
45+
data. If your MongoDB installation already has existing data, see
46+
:ref:`encrypt-existing-data` for additional steps.
4447

4548
Key Manager
4649
-----------
@@ -70,6 +73,10 @@ Prerequisites
7073
- To authenticate MongoDB to a KMIP server, you must have a valid
7174
certificate issued by the key management appliance.
7275

76+
.. note:: Changed in version 4.0
77+
78+
.. include:: /includes/fact-aes.rst
79+
7380
.. _encrypt-with-new-key:
7481

7582
Encrypt Using a New Key
@@ -213,3 +220,21 @@ accessible by the owner of the :binary:`~bin.mongod` process.
213220

214221
:ref:`encryption-key-management-options`
215222

223+
.. _encrypt-existing-data:
224+
225+
Encrypt Existing Data at Rest
226+
-----------------------------
227+
228+
MongoDB cannot encrypt existing data. When you enable encryption with a
229+
new key, the MongoDB instance cannot have any pre-existing data.
230+
231+
If you are using a replica set that does have existing data, use a
232+
rolling :ref:`initial sync <replica-set-initial-sync>` to encrypt the
233+
data.
234+
235+
For example, consider a replica set with three members. The replica set
236+
is in use and holds data that you want to encrypt. These are the steps
237+
you would take to encrypt the data at rest:
238+
239+
.. include:: /includes/steps/encrypt-with-rolling-sync.rst
240+

0 commit comments

Comments
 (0)