Skip to content

Commit 85d6220

Browse files
committed
Add secret creation steps
1 parent ef27ef6 commit 85d6220

File tree

1 file changed

+74
-32
lines changed
  • content/operate/rc/databases/rdi

1 file changed

+74
-32
lines changed

content/operate/rc/databases/rdi/setup.md

Lines changed: 74 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ You need to share your source database credentials and certificates in an Amazon
198198
199199
To do this, you need to:
200200
1. [Create an encryption key](#create-encryption-key) using AWS Key Management Service with the right permissions.
201-
1. [Create a secret](#create-database-credentials-secret) containing the source database credentials encrypted using that key.
201+
1. [Create secrets](#create-database-credentials-secrets) containing the source database credentials encrypted using that key.
202202
203203
### Create encryption key
204204
@@ -216,44 +216,86 @@ In the [AWS Management Console](https://console.aws.amazon.com/), use the **Serv
216216
217217
Review the key policy and key settings, and then select **Finish** to create the key.
218218
219-
### Create database credentials secret
219+
### Create database credentials secrets
220+
221+
To let Redis Cloud access your source database, you need to create AWS secrets for the source database's credentials and certificates.
222+
223+
The required secrets depend on your source database's security configuration. The following table shows the required secrets for each configuration:
224+
225+
| Security configuration | Required secrets |
226+
| :-- | :-- |
227+
| Username and password only | <ul><li>Credentials secret (username and password)</li></ul> |
228+
| TLS connection | <ul><li>Credentials secret (username and password)</li><li>CA Certificate secret (server certificate)</li></ul> |
229+
| mTLS connection | <ul><li>Credentials secret (username and password)</li><li>CA Certificate secret (server certificate)</li><li>Client certificate secret</li><li>Client key secret</li></ul> |
230+
| mTLS connection with client key passphrase | <ul><li>Credentials secret with username and password</li><li>CA Certificate secret (server certificate)</li><li>Client certificate secret</li><li>Client key secret</li><li>Client key passphrase secret</li></ul> |
231+
232+
Select a tab to learn how to create the required secret.
233+
234+
{{< multitabs id="rdi-cloud-secrets"
235+
tab1="Credentials secret"
236+
tab2="CA Certificate secret"
237+
tab3="Client certificate secret"
238+
tab4="Client key secret"
239+
tab5="Client key passphrase secret" >}}
220240
221241
In the [AWS Management Console](https://console.aws.amazon.com/), use the **Services** menu to locate and select **Security, Identity, and Compliance** > **Secrets Manager**. [Create a secret](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_secret.html) of type **Other type of secret** with the following settings:
222242
223243
- **Key/value pairs**: Enter the following key/value pairs.
224244
225245
- `username`: Database username
226246
- `password`: Database password
227-
- `trust_certificate`: Server certificate in PEM format *(TLS only)*
228-
- `client_public_key`: [X.509 client certificate](https://en.wikipedia.org/wiki/X.509) or chain in PEM format *(mTLS only)*
229-
- `client_private_key`: Key for the client certificate or chain in PEM format *(mTLS only)*
230-
- `client_private_key_passphrase`: Passphrase or password for the client certificate or chain in PEM format *(mTLS only)*
231-
232-
{{<note>}}
233-
If your source database has TLS or mTLS enabled, we recommend that you enter the `trust_certificate`, `client_public_key`, and `client_private_key` into the secret editor using the **Key/Value** input method instead of the **JSON** input method. Pasting directly into the JSON editor may cause an error.
234-
{{</note>}}
235-
236-
- **Encryption key**: Select the [encryption key](#create-encryption-key) you created earlier.
237-
238-
- **Resource permissions**: Add the following permissions to your secret to allow the Redis data pipeline to access your secret. Replace `<AWS ACCOUNT ID>` with the AWS account ID for the Redis Cloud cluster that you saved earlier.
239-
240-
```json
241-
{
242-
"Version" : "2012-10-17",
243-
"Statement" : [ {
244-
"Sid" : "RedisDataIntegrationRoleAccess",
245-
"Effect" : "Allow",
246-
"Principal" : "*",
247-
"Action" : [ "secretsmanager:GetSecretValue", "secretsmanager:DescribeSecret" ],
248-
"Resource" : "*",
249-
"Condition" : {
250-
"StringLike" : {
251-
"aws:PrincipalArn" : "arn:aws:iam::<AWS ACCOUNT ID>:role/redis-data-pipeline-secrets-role"
252-
}
253-
}
254-
} ]
255-
}
256-
```
247+
248+
{{< embed-md "rc-rdi-secrets-encryption-permissions.md" >}}
249+
250+
--tab-sep--
251+
252+
In the [AWS Management Console](https://console.aws.amazon.com/), use the **Services** menu to locate and select **Security, Identity, and Compliance** > **Secrets Manager**. [Create a secret](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_secret.html) of type **Other type of secret** with the following settings:
253+
254+
- **Key/value pairs**: Select **Plaintext** and enter the server certificate.
255+
256+
{{< embed-md "rc-rdi-secrets-encryption-permissions.md" >}}
257+
258+
--tab-sep--
259+
260+
In the [AWS Management Console](https://console.aws.amazon.com/), use the **Services** menu to locate and select **Security, Identity, and Compliance** > **Secrets Manager**. [Create a secret](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_secret.html) of type **Other type of secret** with the following settings:
261+
262+
- **Key/value pairs**: Select **Plaintext** and enter the client certificate.
263+
264+
{{< embed-md "rc-rdi-secrets-encryption-permissions.md" >}}
265+
266+
--tab-sep--
267+
268+
Use the [AWS CLI create-secret command](https://docs.aws.amazon.com/cli/latest/reference/secretsmanager/create-secret.html) or the [AWS CreateSecret API endpoint](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_CreateSecret.html) to create a binary secret containing the client key.
269+
270+
For example, using the AWS CLI, run the following command:
271+
272+
```sh
273+
aws secretsmanager create-secret \
274+
--name <secret-name> \
275+
--secret-binary fileb://<path-to-client-key> \
276+
--kms-key-id <encryption-key-arn>
277+
```
278+
279+
Where:
280+
- `<secret-name>` - Name of the secret
281+
- `<path-to-client-key>` - Path to the client key file
282+
- `<encryption-key-arn>` - ARN of the [encryption key](#create-encryption-key) you created earlier
283+
284+
After you create the secret, you need to add permissions to allow the data pipeline to access it. In the [AWS Management Console](https://console.aws.amazon.com/), use the **Services** menu to locate and select **Security, Identity, and Compliance** > **Secrets Manager**. Select the private key secret you just created and then select **Edit permissions**. Add the following permissions to your secret:
285+
286+
{{< embed-md "rc-rdi-secrets-permissions.md" >}}
287+
288+
Replace `<AWS ACCOUNT ID>` with the AWS account ID for the Redis Cloud cluster that you saved earlier.
289+
290+
--tab-sep--
291+
292+
In the [AWS Management Console](https://console.aws.amazon.com/), use the **Services** menu to locate and select **Security, Identity, and Compliance** > **Secrets Manager**. [Create a secret](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_secret.html) of type **Other type of secret** with the following settings:
293+
294+
- **Key/value pairs**: Select **Plaintext** and enter the client key passphrase.
295+
296+
{{< embed-md "rc-rdi-secrets-encryption-permissions.md" >}}
297+
298+
{{< /multitabs >}}
257299
258300
After you store this secret, you can view and copy the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#iam-resources) of your secret on the secret details page.
259301

0 commit comments

Comments
 (0)