|
| 1 | +--- |
| 2 | +Title: Self-managed persistent storage encryption |
| 3 | +LinkTitle: Self-managed encryption keys |
| 4 | +alwaysopen: false |
| 5 | +categories: |
| 6 | +- docs |
| 7 | +- operate |
| 8 | +- rc |
| 9 | +description: Learn how to use your own keys for persistent storage encryption on Redis Cloud. |
| 10 | +weight: $weight |
| 11 | +--- |
| 12 | + |
| 13 | +Redis Cloud databases write their data to disk whenever [persistence]({{< relref "/operate/rc/databases/configuration/data-persistence.md" >}}) is enabled. |
| 14 | + |
| 15 | +All data on Redis Cloud is [encrypted at rest]({{< relref "/operate/rc/security/encryption-at-rest" >}}). By default, disk storage is encrypted by keys managed by the cloud provider. |
| 16 | + |
| 17 | +Redis Cloud Pro users can choose to use self-managed encryption keys for persistent storage for all databases in a subscription. |
| 18 | + |
| 19 | +## Self-managed encryption use cases and benefits |
| 20 | + |
| 21 | +Self-managed persistent storage encryption allows you to: |
| 22 | +- **Shield sensitive data**: With Self-managed persistent storage encryption, you can stop sensitive data exposure by revoking key access at any time. |
| 23 | +- **Meet security and compliance requirements**: With self-managed persistent storage encryption, you may be able to easier meet compliance standards for data security and privacy protection. |
| 24 | + |
| 25 | +Consider using self-managed persistent storage encryption if you have specific organizational needs or requirements for data security. |
| 26 | + |
| 27 | +## Prerequisites |
| 28 | + |
| 29 | +Before you set up self-managed encryption, you must have a self-managed encryption key. |
| 30 | + |
| 31 | +The encryption key must be hosted by the same cloud provider as your database and must be available in your database's cloud provider region. |
| 32 | + |
| 33 | +Refer to the provider's documentation to create a key: |
| 34 | +<!-- - [Amazon Web Services - Create a KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html) --> |
| 35 | +- [Google Cloud - Create a key](https://cloud.google.com/kms/docs/create-key) |
| 36 | + |
| 37 | +## Set up self-managed encryption |
| 38 | + |
| 39 | +To set up self-managed encryption: |
| 40 | + |
| 41 | +1. [Activate self-managed encryption](#activate-self-managed-encryption) for a new or existing subscription. |
| 42 | +2. [Grant Redis permission to access your encryption key](#grant-key-permissions). |
| 43 | + |
| 44 | +### Activate self-managed encryption |
| 45 | + |
| 46 | +<!-- You can activate self-managed encryption on a [new](#new-subscription) or [existing](#existing-subscription) Redis Cloud Pro subscription. |
| 47 | +
|
| 48 | +#### New subscription--> |
| 49 | + |
| 50 | +To activate self-managed encryption when you [create a new Pro subscription]({{< relref "/operate/rc/databases/create-database/create-pro-database-new" >}}): |
| 51 | + |
| 52 | +1. Follow the instructions to [create a Pro database with custom settings]({{< relref "/operate/rc/databases/create-database/create-pro-database-new#custom-settings" >}}). |
| 53 | +1. On the **Setup** tab, go to **Advanced options > Security** to select persistent storage encryption options. |
| 54 | +1. Select **Customer managed key** to activate self-managed encryption. |
| 55 | +1. Select **Continue** to go to the [Sizing tab]({{< relref "/operate/rc/databases/create-database/create-pro-database-new#sizing-tab" >}}). Follow the instructions to provision your database(s). |
| 56 | + |
| 57 | +After you set up your subscription and database(s), your subscription will be **Pending** until you [grant Redis access to your encryption key](#grant-key-permissions). You won't be charged for your subscription while it's pending. |
| 58 | + |
| 59 | +If you don't grant key permissions after 7 days, we'll remove your initial setup. |
| 60 | + |
| 61 | +<!-- #### Existing subscription |
| 62 | +
|
| 63 | +To activate self-managed encryption on an existing Redis Cloud Pro subscription: |
| 64 | +
|
| 65 | +1. From the [Redis Cloud console](https://cloud.redis.io/), select the **Subscriptions** menu and then select your subscription from the list. |
| 66 | +
|
| 67 | +1. Open the **Security** tab to view security settings. |
| 68 | +
|
| 69 | +1. In the **Persistent storage encryption** section, select **Edit**. |
| 70 | +
|
| 71 | +1. Select **Customer managed key**. |
| 72 | +
|
| 73 | +1. Select **Save changes** to save your changes. --> |
| 74 | + |
| 75 | +### Grant key permissions |
| 76 | + |
| 77 | +After you activate self-managed encryption, you must grant Redis access to your encryption key so we can use it for storage encryption. |
| 78 | + |
| 79 | +<!-- #### Amazon Web Services |
| 80 | +
|
| 81 | +#### Google Cloud --> |
| 82 | + |
| 83 | +To grant Redis access to a key on Google Cloud: |
| 84 | + |
| 85 | +1. From your subscription page on the Redis Cloud console, copy the provided Redis service account name. |
| 86 | + |
| 87 | + {{<image filename="images/rc/cmek-access-roles-google.png" alt="The Grant Redis your customer-managed key section shows the service account needed to add as a principal." width=80% >}} |
| 88 | + |
| 89 | +1. Go to [Key management](https://console.cloud.google.com/security/kms) on the Google Cloud console and locate your key. |
| 90 | + |
| 91 | +1. Add the provided service account as a principal for your key, with one of the following Role options: |
| 92 | + |
| 93 | + - Add the pre-defined IAM roles [Cloud KMS CryptoKey Encrypter/Decrypter](https://cloud.google.com/kms/docs/reference/permissions-and-roles#cloudkms.cryptoKeyEncrypterDecrypter) and [Cloud KMS Viewer](https://cloud.google.com/kms/docs/reference/permissions-and-roles#cloudkms.viewer), OR |
| 94 | + - [Create a custom IAM role](https://cloud.google.com/iam/docs/creating-custom-roles#creating) with the following minimal permissions needed to use the key, and then assign that custom role to the principal: |
| 95 | + - cloudkms.cryptoKeyVersions.useToDecrypt |
| 96 | + - cloudkms.cryptoKeyVersions.useToEncrypt |
| 97 | + - cloudkms.cryptoKeys.get |
| 98 | + |
| 99 | +1. Return to the Redis Cloud console. In your subscription page, enter your key's resource name in the **Key resource name** field. |
| 100 | + |
| 101 | + {{<image filename="images/rc/cmek-provide-resource-name-google.png" alt="The Provide the name of your customer-managed key section lets you provide your key to Redis." width=80% >}} |
| 102 | + |
| 103 | + At this point, Redis Cloud will check to see if it can access your key. If it can't access your key, make sure that you've added the correct permissions to your key, that the key is available in the database's cloud provider region, and that you have correctly entered your key's resource name. |
| 104 | + |
| 105 | +<!-- 1. Choose a **Deletion grace period** from the list. If Redis Cloud loses access to your key, Redis will notify you and delete your key after the selected grace period. During the grace period, you must provide a new key to prevent data loss. --> |
| 106 | + |
| 107 | +1. After you finish granting access to your key, you can save your changes. For a new subscription, select **Activate** to activate your subscription and start billing. |
| 108 | + |
| 109 | + {{<image filename="images/rc/cmek-new-subscription-activate.png" alt="The Activate button." width=500px >}} |
| 110 | + |
| 111 | +## Revoke key access |
| 112 | + |
| 113 | +When you have set up self-managed encryption, you can revoke Redis's access to your encryption key at any time through your cloud provider. Redis will delete your plan immediately if we can't access your key. |
| 114 | + |
| 115 | +<!-- Redis will delete your plan after the selected grace period if we can't access your key. During the grace period, you must provide a new key to prevent data loss. --> |
| 116 | + |
| 117 | + |
| 118 | + |
0 commit comments