You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deploy-manage/security/encrypt-deployment-with-customer-managed-encryption-key.md
+41-3Lines changed: 41 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,8 +39,11 @@ When a deployment encrypted with a customer-managed key is deleted or terminated
39
39
## Prerequisites [ec_prerequisites_3]
40
40
41
41
:::::::{tab-set}
42
+
:group: csps
42
43
43
44
::::::{tab-item} AWS
45
+
:sync: aws
46
+
44
47
* Have permissions on AWS KMS to [create a symmetric AWS KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks) and to configure AWS IAM roles.
45
48
46
49
:::{tip}
@@ -51,6 +54,8 @@ When a deployment encrypted with a customer-managed key is deleted or terminated
51
54
::::::
52
55
53
56
::::::{tab-item} Azure
57
+
:sync: azure
58
+
54
59
* Have the following permissions on Azure:
55
60
56
61
* Permissions to [create an RSA key](https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys#key-types-and-protection-methods) in the Azure Key Vault where you want to store your key.
@@ -67,6 +72,8 @@ When a deployment encrypted with a customer-managed key is deleted or terminated
67
72
::::::
68
73
69
74
::::::{tab-item} Google Cloud
75
+
:sync: gcp
76
+
70
77
* Consider the cloud regions where you need your deployment to live. Refer to the [list of available regions, deployment templates, and instance configurations](cloud://reference/cloud-hosted/ec-regions-templates-instances.md) supported by {{ecloud}}.
71
78
* Have the following permissions in Google Cloud KMS:
72
79
@@ -93,8 +100,11 @@ At this time, the following features are not supported:
93
100
## Create an encryption key for your deployment [create-encryption-key]
94
101
95
102
:::::::{tab-set}
103
+
:group: csps
96
104
97
105
::::::{tab-item} AWS
106
+
:sync: aws
107
+
98
108
1. Create a symmetric [single-region key](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html) or [multi-region replica key](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-replicate.html). The key must be available in each region in which you have deployments to encrypt. You can use the same key to encrypt multiple deployments. Later, you will need to provide the Amazon Resource Name (ARN) of that key or key alias to {{ecloud}}.
99
109
100
110
::::{note}
@@ -135,6 +145,8 @@ At this time, the following features are not supported:
135
145
::::::
136
146
137
147
::::::{tab-item} Azure
148
+
:sync: azure
149
+
138
150
1. Create an RSA key in your Key Vault. The key must be available in each region in which you have deployments to encrypt. You can use the same key to encrypt multiple deployments.
139
151
2. After the key is created, view the key and note the key identifier. It should look similar to the following:
140
152
@@ -150,6 +162,8 @@ Provide your key identifier without the key version identifier so {{ecloud}} can
150
162
::::::
151
163
152
164
::::::{tab-item} Google Cloud
165
+
:sync: gcp
166
+
153
167
1. [Create a new symmetric key](https://cloud.google.com/kms/docs/create-key) in Google Cloud KMS.
154
168
155
169
The key must be in a key ring that’s in the same region as your deployment. Do not use key ring in a multi-region location.
@@ -166,8 +180,11 @@ Provide your key identifier without the key version identifier so {{ecloud}} can
166
180
## Create a deployment encrypted with your key [ec_create_a_deployment_encrypted_with_your_key]
167
181
168
182
:::::::{tab-set}
183
+
:group: csps
169
184
170
185
::::::{tab-item} AWS
186
+
:sync: aws
187
+
171
188
1. Create a new deployment. You can do it from the [{{ecloud}} Console](https://cloud.elastic.co?page=docs&placement=docs-body), or from the API:
172
189
173
190
* from the [{{ecloud}} Console](https://cloud.elastic.co?page=docs&placement=docs-body):
@@ -211,6 +228,8 @@ The deployment is now created and encrypted using the specified key. Future snap
211
228
::::::
212
229
213
230
::::::{tab-item} Azure
231
+
:sync: azure
232
+
214
233
To create a new deployment with a customer-managed key in Azure, you need to perform actions in {{ecloud}} and in your Azure tenant.
215
234
216
235
**Step 1: Create a service principal for {{ecloud}}**
@@ -285,6 +304,8 @@ The deployment is now created and encrypted using the specified key. Future snap
285
304
::::::
286
305
287
306
::::::{tab-item} Google Cloud
307
+
:sync: gcp
308
+
288
309
**Step 1: Grant service principals access to your key**
289
310
290
311
{{ecloud}} uses two service principals to encrypt and decrypt data using your key. You must grant these services access to your key before you create your deployment.
@@ -313,9 +334,19 @@ The deployment is now created and encrypted using the specified key. Future snap
313
334
* `cloudkms.cryptoKeyVersions.useToEncrypt`
314
335
315
336
316
-
::::{tip}
317
-
The user performing this action needs to belong to the **Owner** or **Cloud KMS Admin** role.
318
-
::::
337
+
The user performing this action needs to belong to the **Owner** or **Cloud KMS Admin** role.
338
+
339
+
340
+
::::{note}
341
+
If [domain restricted sharing](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-domains) is enabled, then you might not be able to grant the service principals access to the key resource directly. Alternatively, you can grant access to a Google group that contains the relevant service accounts.
342
+
343
+
1. Create a new Google group within the allowed domain.
344
+
2. In the Google Workspace administrator panel, [turn off domain restriction for your newly created Google group](https://support.google.com/a/answer/167097).
345
+
3. Add the service principals to the Google group.
346
+
4. Grant the Google group the roles as listed.
347
+
348
+
If you can't use Google Groups for your org, then [contact Elastic Support](https://www.elastic.co/support) for alternatives.
349
+
::::
319
350
320
351
321
352
**Step 2: Create your deployment**
@@ -370,14 +401,19 @@ You can check that your hosted deployment is correctly encrypted with the key yo
370
401
## Rotate a customer-managed key [rotate-a-customer-managed-key]
371
402
372
403
:::::::{tab-set}
404
+
:group: csps
373
405
374
406
::::::{tab-item} AWS
407
+
:sync: aws
408
+
375
409
{{ecloud}} will automatically rotate the keys every 31 days as a security best practice.
376
410
377
411
You can also trigger a manual rotation [in AWS KMS](https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html), which will take effect in {{ecloud}} within 30 minutes. **For manual rotations to work, you must use an alias when creating the deployment. We do not currently support [on-demand rotations](https://docs.aws.amazon.com/kms/latest/APIReference/API_RotateKeyOnDemand.html) but plan on supporting this in the future.**
378
412
::::::
379
413
380
414
::::::{tab-item} Azure
415
+
:sync: azure
416
+
381
417
To rotate your key, you can [update your key version](https://learn.microsoft.com/en-us/azure/container-registry/tutorial-rotate-revoke-customer-managed-keys) or [configure a key rotation policy](https://learn.microsoft.com/en-us/azure/key-vault/keys/how-to-configure-key-rotation) in Azure Key Vault. In both cases, the rotation will take effect in {{ecloud}} within a day.
382
418
383
419
For rotations to work, you must provide your key identifier without the key version identifier when you create your deployment.
@@ -386,6 +422,8 @@ For rotations to work, you must provide your key identifier without the key vers
386
422
::::::
387
423
388
424
::::::{tab-item} Google Cloud
425
+
:sync: gcp
426
+
389
427
Key rotations are triggered in Google Cloud. You can rotate your key [manually](https://cloud.google.com/kms/docs/rotate-key#manual) or [automatically](https://cloud.google.com/kms/docs/rotate-key#automatic). In both cases, the rotation will take effect in {{ecloud}} within a day.
0 commit comments