Skip to content

Commit 8fefdc7

Browse files
authored
Add groups workaround for BYOK GCP config (#2613)
1 parent 0a1a578 commit 8fefdc7

File tree

1 file changed

+41
-3
lines changed

1 file changed

+41
-3
lines changed

deploy-manage/security/encrypt-deployment-with-customer-managed-encryption-key.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ When a deployment encrypted with a customer-managed key is deleted or terminated
3939
## Prerequisites [ec_prerequisites_3]
4040

4141
:::::::{tab-set}
42+
:group: csps
4243

4344
::::::{tab-item} AWS
45+
:sync: aws
46+
4447
* 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.
4548

4649
:::{tip}
@@ -51,6 +54,8 @@ When a deployment encrypted with a customer-managed key is deleted or terminated
5154
::::::
5255

5356
::::::{tab-item} Azure
57+
:sync: azure
58+
5459
* Have the following permissions on Azure:
5560

5661
* 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
6772
::::::
6873

6974
::::::{tab-item} Google Cloud
75+
:sync: gcp
76+
7077
* 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}}.
7178
* Have the following permissions in Google Cloud KMS:
7279

@@ -93,8 +100,11 @@ At this time, the following features are not supported:
93100
## Create an encryption key for your deployment [create-encryption-key]
94101

95102
:::::::{tab-set}
103+
:group: csps
96104

97105
::::::{tab-item} AWS
106+
:sync: aws
107+
98108
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}}.
99109

100110
::::{note}
@@ -135,6 +145,8 @@ At this time, the following features are not supported:
135145
::::::
136146

137147
::::::{tab-item} Azure
148+
:sync: azure
149+
138150
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.
139151
2. After the key is created, view the key and note the key identifier. It should look similar to the following:
140152

@@ -150,6 +162,8 @@ Provide your key identifier without the key version identifier so {{ecloud}} can
150162
::::::
151163

152164
::::::{tab-item} Google Cloud
165+
:sync: gcp
166+
153167
1. [Create a new symmetric key](https://cloud.google.com/kms/docs/create-key) in Google Cloud KMS.
154168

155169
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
166180
## Create a deployment encrypted with your key [ec_create_a_deployment_encrypted_with_your_key]
167181

168182
:::::::{tab-set}
183+
:group: csps
169184

170185
::::::{tab-item} AWS
186+
:sync: aws
187+
171188
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:
172189

173190
* 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
211228
::::::
212229

213230
::::::{tab-item} Azure
231+
:sync: azure
232+
214233
To create a new deployment with a customer-managed key in Azure, you need to perform actions in {{ecloud}} and in your Azure tenant.
215234

216235
**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
285304
::::::
286305

287306
::::::{tab-item} Google Cloud
307+
:sync: gcp
308+
288309
**Step 1: Grant service principals access to your key**
289310

290311
{{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
313334
* `cloudkms.cryptoKeyVersions.useToEncrypt`
314335

315336

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+
::::
319350

320351

321352
**Step 2: Create your deployment**
@@ -370,14 +401,19 @@ You can check that your hosted deployment is correctly encrypted with the key yo
370401
## Rotate a customer-managed key [rotate-a-customer-managed-key]
371402

372403
:::::::{tab-set}
404+
:group: csps
373405

374406
::::::{tab-item} AWS
407+
:sync: aws
408+
375409
{{ecloud}} will automatically rotate the keys every 31 days as a security best practice.
376410

377411
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.**
378412
::::::
379413

380414
::::::{tab-item} Azure
415+
:sync: azure
416+
381417
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.
382418

383419
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
386422
::::::
387423

388424
::::::{tab-item} Google Cloud
425+
:sync: gcp
426+
389427
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.
390428
::::::
391429

0 commit comments

Comments
 (0)