Skip to content

Commit e7a10d0

Browse files
committed
fix(tutorial): doc review 1
1 parent f424f9a commit e7a10d0

File tree

1 file changed

+27
-27
lines changed
  • tutorials/object-storage-sse-c-with-secret-manager

1 file changed

+27
-27
lines changed

tutorials/object-storage-sse-c-with-secret-manager/index.mdx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dates:
1616
---
1717
import Requirements from '@macros/iam/requirements.mdx'
1818

19-
In this tutorial you'll learn how to use the Secret manager to store the encryption key used with [SSE-C](/object-storage/api-cli/enable-sse-c/).
19+
In this tutorial you will learn how to use the Secret manager to store the encryption key used with [SSE-C](/object-storage/api-cli/enable-sse-c/).
2020

2121
<Requirements />
2222

@@ -25,11 +25,11 @@ In this tutorial you'll learn how to use the Secret manager to store the encrypt
2525
- An [Object Storage bucket](/object-storage/how-to/create-a-bucket/)
2626
- Installed and initialized the [AWS CLI](/object-storage/api-cli/object-storage-aws-cli/)
2727

28-
The goal here, is to use the Key Manager to generate the encryption key, store the encryption key in the Secret Manager, then use it for Object Storage SSE-C.
28+
The goal here is to use Key Manager to generate the encryption key, store the encryption key in Secret Manager, then use it to encrypt Object Storage objects SSE-C.
2929

3030
### Generating the encryption key
3131

32-
With the following commands, you will create a key in the Key Manager, generate the encryption key and then store it in the Secret Manager.
32+
Run the following commands to create a key in Key Manager, generate the encryption key, then store it in Secret Manager.
3333

3434
```bash
3535
KEY_ID=$(scw keymanager key create -o template="{{.ID}}")
@@ -40,7 +40,7 @@ scw secret version create "$SECRET_ID" data="@ssec.key"
4040

4141
### Encryption key and digest preparation
4242

43-
First you access the secret version to get the encryption key, then you need to encode it to base64 and calculate the digest of the key, also encoded in base64.
43+
Run the following command to access the secret version to get the encryption key, encode it to base64, calculate the digest of the key (also encoded in base64), and store the outputs in environment variables.
4444

4545
```bash
4646
scw secret version access "$SECRET_ID" revision=latest raw=true > ssec.key
@@ -54,26 +54,26 @@ If you delete the secret containing the encryption key, you also lose the data e
5454

5555
### Upload and download object with SSE-C
5656

57-
Run the command below to upload an object and encrypt it. Make sure to replace `<your-bucket-name>`, `<your-object-key>`, and `<path/to/your/file>` with the correct values.
58-
59-
```bash
60-
aws s3api put-object \
61-
--bucket <your-bucket-name> \
62-
--key <your-object-key> \
63-
--body <path/to/your/file> \
64-
--sse-customer-algorithm AES256 \
65-
--sse-customer-key $ENCRYPTION_KEY \
66-
--sse-customer-key-md5 $KEY_DIGEST
67-
```
68-
69-
Run the command below to download the previously uploaded object and decrypt it. Make sure to replace `<your-bucket-name>`, `<your-object-key>`, and `<path/to/destination/file>` with the correct values.
70-
71-
```bash
72-
aws s3api get-object \
73-
--bucket <your-bucket-name> \
74-
--key <your-object-key> \
75-
<path/to/destination/file> \
76-
--sse-customer-algorithm AES256 \
77-
--sse-customer-key $ENCRYPTION_KEY \
78-
--sse-customer-key-md5 $KEY_DIGEST
79-
```
57+
1. Run the command below to upload an object and encrypt it. Make sure to replace `<your-bucket-name>`, `<your-object-key>`, and `<path/to/your/file>` with the correct values.
58+
59+
```bash
60+
aws s3api put-object \
61+
--bucket <your-bucket-name> \
62+
--key <your-object-key> \
63+
--body <path/to/your/file> \
64+
--sse-customer-algorithm AES256 \
65+
--sse-customer-key $ENCRYPTION_KEY \
66+
--sse-customer-key-md5 $KEY_DIGEST
67+
```
68+
69+
2. Run the command below to download the previously uploaded object and decrypt it. Make sure to replace `<your-bucket-name>`, `<your-object-key>`, and `<path/to/destination/file>` with the correct values.
70+
71+
```bash
72+
aws s3api get-object \
73+
--bucket <your-bucket-name> \
74+
--key <your-object-key> \
75+
<path/to/destination/file> \
76+
--sse-customer-algorithm AES256 \
77+
--sse-customer-key $ENCRYPTION_KEY \
78+
--sse-customer-key-md5 $KEY_DIGEST
79+
```

0 commit comments

Comments
 (0)