-
Notifications
You must be signed in to change notification settings - Fork 245
Add Customer Managed Keys Docs #15284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
borisschlosser
wants to merge
6
commits into
master
Choose a base branch
from
add-customer-managed-keys-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+228
−1
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
04f29fc
Lint
borisschlosser 29e6e68
Improvements
borisschlosser efc7974
Improvements
borisschlosser 2435ff5
Improvements
borisschlosser 411be2f
Merge remote-tracking branch 'origin/master' into add-customer-manage…
borisschlosser 42dbf36
Remove IAM policy setup as it is not required
borisschlosser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
content/docs/pulumi-cloud/admin/customer-managed-keys/_index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
title_tag: "Pulumi Cloud: Customer Managed Keys" | ||
meta_desc: Bring your own encryption keys to protect data within Pulumi Cloud for enhanced security and compliance. | ||
title: "Customer Managed Keys" | ||
h1: Customer Managed Keys | ||
meta_image: /images/docs/meta-images/docs-meta.png | ||
menu: | ||
cloud: | ||
name: Customer Managed Keys | ||
parent: pulumi-cloud-admin | ||
weight: 4 | ||
identifier: pulumi-cloud-admin-customer-managed-keys | ||
aliases: | ||
- /docs/pulumi-cloud/customer-managed-keys/ | ||
--- | ||
|
||
{{% notes "info" %}} | ||
Customer Managed Keys are available for organizations using the Enterprise and Business Critical editions. | ||
Learn more about editions on the [pricing page](/pricing/). | ||
{{% /notes %}} | ||
|
||
## Overview | ||
|
||
Pulumi Cloud supports Customer Managed Keys (CMKs) to improve the security and compliance of your data. CMKs allow you | ||
to use your own encryption keys to protect sensitive data in Pulumi Cloud through an external | ||
Key Management System (KMS). | ||
|
||
CMKs encrypt data keys, which are used to encrypt data in Pulumi Cloud. When you add your first CMK, all | ||
existing data keys encrypted with the Pulumi-managed key will be automatically re-encrypted with the new CMK. | ||
|
||
Only organization admins can manage CMKs. | ||
|
||
{{% notes "info" %}} | ||
Currently, Customer Managed Keys are only used to encrypt data in Pulumi ESC, and only AWS KMS is | ||
supported. | ||
We are working on adding support for more KMS providers and expanding encryption to additional Pulumi products. If you | ||
have specific requirements, please [contact us](/contact/). | ||
{{% /notes %}} | ||
|
||
## Viewing Customer Managed Keys | ||
|
||
To view Customer Managed Keys: | ||
|
||
1. Go to the organization’s **Settings**. | ||
2. Select **Customer Managed Keys**. | ||
|
||
The Customer Managed Keys page displays the following details for each key: | ||
|
||
- **Name**: The unique name of the key provided by an admin. | ||
- **Type**: The encryption key type, such as AWS KMS. | ||
- **Default**: Indicates if the key is the default encryption key for the organization. All new data keys responsible | ||
for encrypting data created by your organization will be encrypted with this key. | ||
- **Set as default**: A button to set the key as the default encryption key. This option is unavailable for keys already | ||
set as default or undergoing re-encryption. | ||
- **Disable**: A button to disable the key. This option is unavailable for default keys or keys undergoing | ||
re-encryption. | ||
|
||
## Adding a Customer Managed Key | ||
|
||
Adding a Customer Managed Key enables you to use your own encryption key to protect sensitive data in Pulumi Cloud. | ||
|
||
{{% notes "info" %}} | ||
When the first Customer Managed Key is added, all data keys encrypted with the Pulumi-managed key will be automatically | ||
re-encrypted with the new Customer Managed Key. | ||
{{% /notes %}} | ||
|
||
### AWS KMS | ||
|
||
1. Set up a role in AWS IAM and a key in AWS KMS as | ||
described [here](/docs/pulumi-cloud/admin/customer-managed-keys/aws-kms/). | ||
2. Go to the **Customer Managed Keys** settings page in Pulumi Cloud. | ||
3. Click **Add Customer Managed Key**. | ||
4. Enter a unique name for the key. | ||
5. Provide the **Role ARN** with access to the AWS KMS key. | ||
6. Provide the **Key ARN** of the AWS KMS key. Alias ARNs are also supported. | ||
|
||
## Disabling a Customer Managed Key | ||
|
||
Disabling a key prevents it from being used to create new data keys, but existing data keys remain encrypted with the | ||
key until they are re-encrypted. You must specify a re-encryption key to re-encrypt existing data keys. | ||
|
||
Disabling a key is not available for default keys or keys undergoing re-encryption. | ||
|
||
To disable a Customer Managed Key: | ||
|
||
1. Click the three-dot menu next to the key you want to disable. | ||
2. Select **Disable**. | ||
3. Choose a re-encryption key to re-encrypt existing data keys. | ||
4. Click **Disable** to confirm. | ||
5. A banner will appear, showing the re-encryption process status. It disappears once the process is complete. | ||
|
||
## Disabling All Customer Managed Keys | ||
|
||
Disabling all keys prevents them from being used to create new data keys, but existing data keys remain encrypted with | ||
the keys until they are re-encrypted. All data keys will be re-encrypted with the Pulumi-managed key. | ||
|
||
To disable all Customer Managed Keys: | ||
|
||
1. Click **Disable all Customer Managed Keys**. | ||
2. Confirm the re-encryption process in the dialog that appears. | ||
3. Click **Disable all** to confirm. | ||
4. A banner will appear, showing the re-encryption process status. It disappears once the process is complete. |
120 changes: 120 additions & 0 deletions
120
content/docs/pulumi-cloud/admin/customer-managed-keys/aws-kms.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- | ||
title_tag: "AWS KMS" | ||
meta_desc: "Learn how to configure AWS KMS for Pulumi Cloud Customer Managed Keys to enhance security and compliance." | ||
title: "AWS KMS" | ||
h1: "AWS KMS" | ||
meta_image: /images/docs/meta-images/docs-meta.png | ||
menu: | ||
cloud: | ||
name: "AWS KMS" | ||
parent: pulumi-cloud-admin-customer-managed-keys | ||
weight: 1 | ||
identifier: pulumi-cloud-admin-customer-managed-keys-aws-kms | ||
aliases: | ||
- /docs/pulumi-cloud/customer-managed-keys/aws-kms/ | ||
--- | ||
|
||
This guide provides step-by-step instructions for configuring AWS Key Management Service (KMS) to use [Customer Managed | ||
Keys (CMKs) with Pulumi Cloud](/docs/pulumi-cloud/admin/customer-managed-keys/). It covers setting up the necessary AWS | ||
IAM roles, trust policies, and KMS key permissions | ||
to enhance the security and compliance of your Pulumi Cloud environment. | ||
|
||
## Prerequisites | ||
|
||
* You must have sufficient AWS IAM and KMS privileges to create identity providers, IAM roles and KMS keys. | ||
|
||
{{< notes type="warning" >}} | ||
Please note that this guide provides step-by-step instructions based on the official provider documentation which is | ||
subject to change. For the most current and precise information, always refer to | ||
the [official AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html). | ||
{{< /notes >}} | ||
|
||
## Create the identity provider | ||
|
||
1. In the navigation pane of the [IAM console](https://console.aws.amazon.com/iam/), choose **Identity providers**, and | ||
then choose **Add provider**. | ||
2. In the **Provider type** section, click the radio button next to **OpenID Connect**. | ||
3. For the **Provider URL**, provide the following URL: `https://api.pulumi.com/oidc` | ||
4. For the **Audience** field, the value is the name of your Pulumi organization prefixed with `aws:` (e.g. | ||
`aws:{org}`). Then click **Add provider**. | ||
|
||
## Configure the IAM role | ||
|
||
Once you have created the identity provider, you will see a notification at the top of your screen prompting you to | ||
assign an IAM role. | ||
|
||
1. Click the **Assign role** button. | ||
2. Select the **Create a new role** option, then click **Next**. | ||
3. On the IAM **Create role** page, ensure the **Web identity** radio button is selected. | ||
4. In the **Web identity** section: | ||
* Select `api.pulumi.com/oidc` under **Identity provider**. | ||
* Select the name of your Pulumi organization under **Audience**. Then click **Next**. | ||
5. Skip the **Add permissions** page by clicking **Next**. | ||
6. Provide a name and optional description for the IAM role. Then click **Create role**. | ||
|
||
## Review trust policy | ||
|
||
Next, select the **trust relationships** tab, which is where the trust policy of the role is defined. Ensure audience | ||
and subject are configured as shown below: | ||
|
||
```json | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Federated": "arn:aws:iam::123456789012:oidc-provider/api.pulumi.com/oidc" | ||
}, | ||
"Action": "sts:AssumeRoleWithWebIdentity", | ||
"Condition": { | ||
"StringEquals": { | ||
"api.pulumi.com/oidc:aud": "aws:<pulumi-org-name>", | ||
"api.pulumi.com/oidc:sub": "pulumi:cmk:pulumi.organization.login:<pulumi-org-name>" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
Before you log out of the AWS console, make sure to make a note of your role’s ARN value as you will need it to set up | ||
the AWS KMS key as well as the Customer Managed Key in Pulumi Cloud. | ||
|
||
## Create the AWS KMS key | ||
|
||
1. In the navigation pane of the [KMS console](https://console.aws.amazon.com/kms/), choose **Customer managed keys**, | ||
and then choose **Create key**. | ||
2. Select the **Symmetric** key type, the **Encrypt and decrypt** key usage and click **Next**. | ||
3. Add labels as needed, then click **Next**. | ||
4. Define key administrative permissions as needed, then click **Next**. | ||
5. Select the IAM role you created in the previous step under **Key users**, then click **Next**. | ||
borisschlosser marked this conversation as resolved.
Show resolved
Hide resolved
|
||
6. Ensure that the **Key policy** defines the correct actions for the selected role, then finish the wizard. | ||
|
||
```json | ||
{ | ||
"Statement": [ | ||
{ | ||
"Sid": "Allow use of the key", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": "arn:aws:iam::123456789012:role/<role-name>" | ||
}, | ||
"Action": [ | ||
"kms:Encrypt", | ||
"kms:Decrypt", | ||
"kms:GenerateDataKey" | ||
], | ||
"Resource": "*" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
Before you log out of the AWS console, make sure to make a note of your key’s ARN value and or alias ARN value as you | ||
will need it to set up the Customer Managed Key in Pulumi Cloud. | ||
|
||
## Add the Customer Managed Key in Pulumi Cloud | ||
|
||
Now you can add the Customer Managed Key in Pulumi Cloud as described in | ||
the [Customer Managed Keys documentation](/docs/pulumi-cloud/admin/customer-managed-keys/). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.