Skip to content

Commit a92f2f9

Browse files
davidhou17jwilliams-mongo
authored andcommitted
(DOCSP-35637): Add KMIP Encryption at Rest tutorial (#1625)
* Add kmip encryption at rest tutorial * tech review feedback * Updated resource definition + notegst * Updated resource definition + notegst * fix spacing * fix spacing * final spacing fix * add facet
1 parent 91bb385 commit a92f2f9

File tree

4 files changed

+137
-2
lines changed

4 files changed

+137
-2
lines changed

snooty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ mdbtools-version = "100.1.0"
4242
mdbagent = "MongoDB Agent"
4343
mdb-ent-db = "MongoDB Enterprise Database"
4444
mdb-support = "`MongoDB Support <https://support.mongodb.com/welcome>`__"
45+
mdb-version = "7.0.0"
4546
version = "1.25"
4647

4748
[substitutions]

source/encryption-at-rest.txt

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
.. _k8s-encryption-at-rest:
2+
3+
===================================
4+
Configure |kmip| Encryption at Rest
5+
===================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. facet::
10+
:name: genre
11+
:values: tutorial
12+
13+
.. contents:: On this page
14+
:local:
15+
:backlinks: none
16+
:depth: 1
17+
:class: singlecol
18+
19+
You can configure :manual:`encryption at rest
20+
</core/security-encryption-at-rest/>`
21+
for a MongoDB deployment managed by the |k8s-op-short|
22+
by using a |kmip| server.
23+
24+
Considerations
25+
--------------
26+
27+
Before configuring encryption at rest, consider the following:
28+
29+
- You must have a running |kmip| server.
30+
- You can't transition your deployment that uses keyfile-based encryption
31+
at rest to |kmip|-based encryption at rest.
32+
- If you want to enable |kmip| encryption at rest for an already deployed MongoDB
33+
resource, contact `MongoDB Support <https://support.mongodb.com/welcome>`_.
34+
35+
Procedure
36+
---------
37+
38+
The following procedure describes how to configure
39+
a sample |kmip| configuration for a MongoDB replica set.
40+
Adjust the file names and paths, |k8s| namespace, resource names,
41+
and MongoDB version as necessary for your deployment.
42+
43+
.. procedure::
44+
:style: normal
45+
46+
.. step:: Create the ConfigMap of the |certauth|.
47+
48+
Run the following command to create a |k8s-configmap|
49+
to hold the |certauth| that signed the |kmip| server's certificate:
50+
51+
.. code-block::
52+
53+
kubectl -n mongodb create configmap mongodb-kmip-certificate-authority-pem --from-file=ca.pem
54+
55+
.. step:: Create the Secret for the Client Certificate and Private Key PEM.
56+
57+
Run the following command to create a |k8s-secret| to hold the
58+
concatenated client certificate and private key for checking out
59+
the master key from the |kmip| server:
60+
61+
.. code-block::
62+
63+
kubectl -n mongodb create secret generic mongodb-kmip-client-pem --from-file=cert.pem
64+
65+
.. step:: Configure the deployment to use the |kmip| server.
66+
67+
Configure the ``additionalMongodConfig`` settings
68+
in your |k8s-custom-resource| specification to use the |kmip|
69+
server. For example:
70+
71+
.. code-block:: yaml
72+
73+
apiVersion: mongodb.com/v1
74+
kind: MongoDB
75+
metadata:
76+
name: kmip
77+
namespace: mongodb
78+
spec:
79+
type: ReplicaSet
80+
members: 3
81+
backup:
82+
encryption:
83+
kmip:
84+
client:
85+
clientCertificatePrefix: "mdb"
86+
additionalMongodConfig:
87+
security:
88+
enableEncryption: true
89+
kmip:
90+
clientCertificateFile: /kmip/cert/cert.pem
91+
serverCAFile: /kmip/ca/ca.pem
92+
serverName: pykmip-server.pymongo
93+
port: 5696
94+
featureCompatibilityVersion: '6.0'
95+
version: 6.0.14-ent
96+
opsManager:
97+
configMapRef:
98+
name: my-project
99+
credentials: my-credentials
100+
podSpec:
101+
podTemplate:
102+
spec:
103+
containers:
104+
- name: mongodb-enterprise-database
105+
volumeMounts:
106+
- name: mongodb-kmip-client-pem
107+
mountPath: /kmip/cert
108+
- name: mongodb-kmip-certificate-authority-pem
109+
mountPath: /kmip/ca
110+
volumes:
111+
- name: mongodb-kmip-client-pem
112+
secret:
113+
secretName: mongodb-kmip-client-pem
114+
- name: mongodb-kmip-certificate-authority-pem
115+
configMap:
116+
name: mongodb-kmip-certificate-authority-pem
117+
items:
118+
- key: ca.pem
119+
path: ca.pem
120+
121+
.. important::
122+
123+
If you set the :opsmgrkube:`spec.backup.encryption.kmip` setting
124+
in your resource, the |api| keys linked with
125+
the value of :setting:`spec.credentials` must have the :authrole:`Global Owner` role.

source/reference/k8s-operator-om-specification.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,11 @@ Optional |onprem| Resource Settings
471471
Object that contains the |kmip| backup encryption configuration
472472
settings. To learn more, see :ref:`configure-kmip-backup-encryption`.
473473

474+
.. note::
475+
476+
If you set this parameter, the API key linked with the value of
477+
:setting:`spec.credentials` must have the :authrole:`Global Owner` role.
478+
474479
.. opsmgrkube:: spec.backup.encryption.kmip.server
475480

476481
*Type*: object

source/security.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ to secure your MongoDB deployments.
2626
Configure |https| and |tls| to encrypt your data over
2727
the network.
2828

29+
:ref:`k8s-encryption-at-rest`
30+
Configure encryption at rest by using a |kmip| server.
31+
2932
:ref:`k8s-authentication`
3033
Set up X.509, LDAP, or SCRAM user authentication.
3134

@@ -36,8 +39,9 @@ to secure your MongoDB deployments.
3639
:titlesonly:
3740
:hidden:
3841

39-
/encryption
40-
/authentication
4142
/permissions
4243
/opa-gatekeeper
44+
/encryption
45+
Configure Encryption at Rest </encryption-at-rest>
46+
/authentication
4347
/tutorial/secret-storage

0 commit comments

Comments
 (0)