@@ -19,9 +19,9 @@ Supported Key Management Services
19
19
20
20
Client-side field level encryption requires a Key Management Service
21
21
(KMS) for accessing a Customer Master Key (CMK). MongoDB automatically
22
- encrypts data encryption keys using the specified CMK during
23
- :doc:`data encryption key creation
24
- </reference/method/KeyVault.createKey>`.
22
+ encrypts data encryption keys using the specified CMK during
23
+ :doc:`data encryption key creation
24
+ </reference/method/KeyVault.createKey>`.
25
25
26
26
Deleting the CMK renders all data encryption keys encrypted with that
27
27
CMK as permanently unreadable, which in turn renders all values
@@ -30,7 +30,9 @@ encrypted with those data encryption keys as permanently unreadable.
30
30
Client-side field level encryption supports the following KMS providers:
31
31
32
32
- :ref:`Amazon Web Services KMS <field-level-encryption-aws-kms>`
33
- - :ref:`Locally Managed Keyfile <field-level-encryption-local-kms>`
33
+ - :ref:`Azure Key Vault <field-level-encryption-azure-keyvault>`
34
+ - :ref:`Google Cloud Platform KMS <field-level-encryption-gcp-kms>`
35
+ - :ref:`Locally Managed Key <field-level-encryption-local-kms>`
34
36
35
37
.. _field-level-encryption-aws-kms:
36
38
@@ -39,43 +41,40 @@ Amazon Web Services KMS
39
41
40
42
.. include:: /includes/extracts/csfle-aws-kms-4.2.0-4.2.1-broken.rst
41
43
42
- MongoDB client-side encryption supports using the
43
- `Amazon Web Services Key Management Service
44
+ MongoDB client-side encryption supports using the
45
+ `Amazon Web Services Key Management Service
44
46
<https://aws.amazon.com/kms>`__ for encrypting
45
47
and decrypting data encryption keys. Specifically, MongoDB securely
46
48
transmits the data encryption key to AWS KMS for encrypting or
47
49
decrypting using the specified Customer Master Key (CMK). The CMK never
48
- leaves the AWS KMS.
50
+ leaves the AWS KMS.
49
51
50
- The :binary:`~bin.mongo` shell supports two methods for configuring
52
+ The :binary:`~bin.mongo` shell supports two methods for configuring
51
53
access to an AWS KMS:
52
54
53
- - Use the client-side field level encryption :ref:`command-line options
54
- <mongo-client-side-field-level-encryption-options>`,
55
-
56
- *or*
55
+ - Use the client-side field level encryption :ref:`command-line options
56
+ <mongo-client-side-field-level-encryption-options>`, or
57
57
58
58
- Use the :method:`Mongo()` constructor to create a database connection
59
59
with the required AWS :ref:`KMS configuration options
60
60
<ClientSideFieldLevelEncryptionOptions>`.
61
61
62
- Configuring access to an AWS KMS requires at minimum an AWS access key
63
- and its corresponding secret key. The IAM user associated to the access
64
- key *must* have at least one policy with the following actions:
65
-
66
- - ``kms:Decrypt``
67
- `(reference)
68
- <https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html>`__
62
+ Configuring access to an AWS KMS requires at minimum an AWS Access Key
63
+ and its corresponding Secret Key. The IAM User associated to the Access
64
+ Key must have at least one policy with the following actions:
69
65
70
- - ``kms:Encrypt``
71
- `(reference)
72
- <https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html>`__
66
+ - ``kms:Encrypt``
67
+ `(reference)
68
+ <https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html>`__
73
69
74
- .. note:: Implement Seperation of Least Privilege for KMS Access
70
+ - ``kms:Decrypt``
71
+ `(reference)
72
+ <https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html>`__
75
73
74
+ .. note:: Implement Principle of Least Privilege for KMS Access
76
75
77
- Consider configuring IAM user roles such that MongoDB has only the
78
- access to the actions and resources required to function.
76
+ Consider configuring IAM user roles such that MongoDB has only the
77
+ access to the actions and resources required to function.
79
78
80
79
For example, the following policy JSON scopes the required actions to
81
80
a single CMK:
@@ -97,8 +96,90 @@ key *must* have at least one policy with the following actions:
97
96
]
98
97
}
99
98
100
- For complete documentation on data encryption key management using AWS KMS, see
101
- :doc:`/tutorial/manage-client-side-encryption-data-keys`.
99
+ For complete documentation on data encryption key management using AWS
100
+ KMS, see :doc:`/tutorial/manage-client-side-encryption-data-keys` and
101
+ select the "Amazon Web Services KMS" tab.
102
+
103
+ .. _field-level-encryption-azure-keyvault:
104
+
105
+ Azure Key Vault
106
+ ~~~~~~~~~~~~~~~
107
+
108
+ .. versionadded:: 4.4.5
109
+
110
+ MongoDB client-side encryption supports using the
111
+ `Azure Key Vault Key Management Service
112
+ <https://docs.microsoft.com/en-us/azure/key-vault/>`__ for encrypting
113
+ and decrypting data encryption keys. Specifically, MongoDB securely
114
+ transmits the data encryption key to Azure Key Vault for encrypting or
115
+ decrypting using the specified Customer Master Key (CMK). The CMK never
116
+ leaves the Azure Key Vault.
117
+
118
+ The :binary:`~bin.mongo` shell supports specifying Azure Key Vault
119
+ as a KMS using the :method:`Mongo()` constructor using the
120
+ :ref:`KMS configuration options
121
+ <ClientSideFieldLevelEncryptionOptions>`.
122
+
123
+ Configuring access to Azure Key Vault requires at minimum an Azure
124
+ Tenant ID, Client ID, and Client Secret. The Tenant ID must have the
125
+ ability to perform the following actions:
126
+
127
+ - ``wrap key``
128
+ `(reference)
129
+ <https://docs.microsoft.com/en-us/rest/api/keyvault/wrapkey/wrapkey>`__
130
+
131
+ - ``unwrap key``
132
+ `(reference)
133
+ <https://docs.microsoft.com/en-us/rest/api/keyvault/unwrapkey/unwrapkey>`__
134
+
135
+ .. note::
136
+
137
+ MongoDB does *not* support Azure's client certificate authentication
138
+ (also known as TLS mutual authentication).
139
+
140
+ For complete documentation on data encryption key management using
141
+ Azure Key Vault, see
142
+ :doc:`/tutorial/manage-client-side-encryption-data-keys` and select the
143
+ "Azure Key Vault" tab.
144
+
145
+ .. _field-level-encryption-gcp-kms:
146
+
147
+ Google Cloud Platform KMS
148
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
149
+
150
+ .. versionadded:: 4.4.5
151
+
152
+ MongoDB client-side encryption supports using the
153
+ `Google Cloud KMS <https://cloud.google.com/kms/docs/>`__ for encrypting
154
+ and decrypting data encryption keys. Specifically, MongoDB securely
155
+ transmits the data encryption key to Google Cloud KMS for encrypting or
156
+ decrypting using the specified Customer Master Key (CMK). The CMK never
157
+ leaves the Google Cloud KMS.
158
+
159
+ The :binary:`~bin.mongo` shell supports specifying Google Cloud KMS
160
+ as a KMS using the :method:`Mongo()` constructor using the
161
+ :ref:`KMS configuration options
162
+ <ClientSideFieldLevelEncryptionOptions>`.
163
+
164
+ Configuring access to Google Cloud KMS requires at minimum a Google
165
+ Cloud Email and associated Private Key. The Google Cloud Email account
166
+ must have the following IAM permissions for the specified Private Key:
167
+
168
+ - ``cloudkms.cryptoKeyVersions.useToEncrypt``
169
+
170
+ - ``cloudkms.cryptoKeyVersions.useToDecrypt``
171
+
172
+ These IAM permissions are included in certain
173
+ `Google Cloud predefined roles
174
+ <https://cloud.google.com/kms/docs/reference/permissions-and-roles#predefined>`__
175
+ or can be included in a
176
+ `Google Cloud custom role
177
+ <https://cloud.google.com/kms/docs/reference/permissions-and-roles#custom_roles>`__.
178
+
179
+ For complete documentation on data encryption key management using
180
+ Google Cloud KMS, see
181
+ :doc:`/tutorial/manage-client-side-encryption-data-keys` and select the
182
+ "Google Cloud KMS" tab.
102
183
103
184
.. _field-level-encryption-local-kms:
104
185
@@ -111,7 +192,8 @@ be a 96-byte long string.
111
192
112
193
For complete documentation on data encryption key management using a
113
194
locally managed key, see
114
- :doc:`/tutorial/manage-client-side-encryption-data-keys`.
195
+ :doc:`/tutorial/manage-client-side-encryption-data-keys` and select the
196
+ "Local Keyfile" tab.
115
197
116
198
.. _field-level-encryption-keyvault:
117
199
@@ -147,7 +229,7 @@ encryption key management:
147
229
- :method:`KeyVault.deleteKey()`
148
230
149
231
.. important::
150
-
232
+
151
233
Removing a data encryption key renders all fields encrypted
152
234
using that data encryption key as permanently unreadable.
153
235
@@ -201,4 +283,4 @@ For complete documentation on data encryption key management, see
201
283
:titlesonly:
202
284
:hidden:
203
285
204
- /tutorial/manage-client-side-encryption-data-keys.txt
286
+ /tutorial/manage-client-side-encryption-data-keys.txt
0 commit comments