Skip to content

Commit a425ba1

Browse files
scaleway-botyfodil
andauthored
feat(key_manager): review wording (#4492)
Co-authored-by: Yacine Fodil <[email protected]>
1 parent f56da67 commit a425ba1

18 files changed

+282
-102
lines changed

cmd/scw/testdata/test-all-usage-keymanager-key-create-usage.golden

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Create a key in a given region specified by the `region` parameter. Keys only support symmetric encryption. You can use keys to encrypt or decrypt arbitrary payloads, or to generate data encryption keys that can be used without being stored in Key Manager.
3+
Create a key in a given region specified by the `region` parameter. Keys only support symmetric encryption. You can use keys to encrypt or decrypt arbitrary payloads, or to generate data encryption keys. **Data encryption keys are not stored in Key Manager**.
44

55
USAGE:
66
scw keymanager key create [arg=value ...]
77

88
ARGS:
99
[project-id] Project ID to use. If none is passed the default project ID will be used
1010
[name] (Optional) Name of the key
11-
[usage.symmetric-encryption] (unknown_symmetric_encryption | aes_256_gcm)
11+
[usage.symmetric-encryption] Algorithm used to encrypt and decrypt arbitrary payloads. (unknown_symmetric_encryption | aes_256_gcm)
1212
[description] (Optional) Description of the key
1313
[tags.{index}] (Optional) List of the key's tags
1414
[rotation-policy.rotation-period] Rotation period
1515
[rotation-policy.next-rotation-at] Key next rotation date
1616
[unprotected] (Optional) Defines whether key protection is applied to a key. Protected keys can be used but not deleted
17+
[origin] Key origin (unknown_origin | scaleway_kms | external)
1718
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1819

1920
FLAGS:

cmd/scw/testdata/test-all-usage-keymanager-key-decrypt-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Decrypt data using an existing key, specified by the `key_id` parameter. The maximum payload size that can be decrypted is the result of the encryption of 64KB of data (around 131KB).
3+
Decrypt an encrypted payload using an existing key, specified by the `key_id` parameter. The maximum payload size that can be decrypted is equivalent to the encrypted output of 64 KB of data (around 131 KB).
44

55
USAGE:
6-
scw keymanager key decrypt [arg=value ...]
6+
scw keymanager key decrypt <key-id ...> [arg=value ...]
77

88
ARGS:
99
key-id ID of the key to decrypt
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete previously imported key material. This renders the associated cryptographic key unusable for any operation. The key's origin must be `external`.
4+
5+
USAGE:
6+
scw keymanager key delete-key-material <key-id ...> [arg=value ...]
7+
8+
ARGS:
9+
key-id ID of the key of which to delete the key material
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
11+
12+
FLAGS:
13+
-h, --help help for delete-key-material
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-keymanager-key-delete-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Delete an existing key specified by the `region` and `key_id` parameters. Deleting a key is permanent and cannot be undone. All data encrypted using this key, including data encryption keys, will become unusable.
3+
Permanently delete a key specified by the `region` and `key_id` parameters. This action is irreversible. Any data encrypted with this key, including data encryption keys, will no longer be decipherable.
44

55
USAGE:
6-
scw keymanager key delete [arg=value ...]
6+
scw keymanager key delete <key-id ...> [arg=value ...]
77

88
ARGS:
99
key-id ID of the key to delete

cmd/scw/testdata/test-all-usage-keymanager-key-disable-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Disable a given key to be used for cryptographic operations. Disabling a key renders it unusable. You must specify the `region` and `key_id` parameters.
3+
Disable a given key, preventing it to be used for cryptographic operations. Disabling a key renders it unusable. You must specify the `region` and `key_id` parameters.
44

55
USAGE:
6-
scw keymanager key disable [arg=value ...]
6+
scw keymanager key disable <key-id ...> [arg=value ...]
77

88
ARGS:
99
key-id ID of the key to disable

cmd/scw/testdata/test-all-usage-keymanager-key-enable-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Enable a given key to be used for cryptographic operations. Enabling a key allows you to make a disabled key usable again. You must specify the `region` and `key_id` parameters.
44

55
USAGE:
6-
scw keymanager key enable [arg=value ...]
6+
scw keymanager key enable <key-id ...> [arg=value ...]
77

88
ARGS:
99
key-id ID of the key to enable

cmd/scw/testdata/test-all-usage-keymanager-key-encrypt-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Encrypt data using an existing key, specified by the `key_id` parameter. Only keys with a usage set to **symmetric_encryption** are supported by this method. The maximum payload size that can be encrypted is 64KB of plaintext.
3+
Encrypt a payload using an existing key, specified by the `key_id` parameter. Only keys with a usage set to `symmetric_encryption` are supported by this method. The maximum payload size that can be encrypted is 64 KB of plaintext.
44

55
USAGE:
6-
scw keymanager key encrypt [arg=value ...]
6+
scw keymanager key encrypt <key-id ...> [arg=value ...]
77

88
ARGS:
99
key-id ID of the key to encrypt

cmd/scw/testdata/test-all-usage-keymanager-key-generate-data-key-usage.golden

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Generate a new data encryption key to use for cryptographic operations outside of Key Manager. Note that Key Manager does not store your data encryption key. The data encryption key is encrypted and must be decrypted using the key you have created in Key Manager. The data encryption key's plaintext is returned in the response object, for immediate usage.
3+
Create a new data encryption key for cryptographic operations outside of Key Manager. The data encryption key is encrypted and must be decrypted using the key you have created in Key Manager.
44

5-
Always store the data encryption key's ciphertext, rather than its plaintext, which must not be stored. To retrieve your key's plaintext, call the Decrypt endpoint with your key's ID and ciphertext.
5+
The data encryption key is returned in plaintext and ciphertext but it should only be stored in its encrypted form (ciphertext). Key Manager does not store your data encryption key. To retrieve your key's plaintext, use the `Decrypt` method with your key's ID and ciphertext.
66

77
USAGE:
8-
scw keymanager key generate-data-key [arg=value ...]
8+
scw keymanager key generate-data-key <key-id ...> [arg=value ...]
99

1010
ARGS:
11-
key-id ID of the key
12-
[algorithm] Symmetric encryption algorithm of the data encryption key (unknown_symmetric_encryption | aes_256_gcm)
13-
[without-plaintext] (Optional) Defines whether to return the data encryption key's plaintext in the response object
14-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
11+
key-id ID of the key
12+
[algorithm=aes_256_gcm] Algorithm with which the data encryption key will be used to encrypt and decrypt arbitrary payloads (unknown_symmetric_encryption | aes_256_gcm)
13+
[without-plaintext] (Optional) Defines whether to return the data encryption key's plaintext in the response object
14+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1515

1616
FLAGS:
1717
-h, --help help for generate-data-key

cmd/scw/testdata/test-all-usage-keymanager-key-get-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Retrieve the metadata of a key specified by the `region` and `key_id` parameters.
3+
Retrieve metadata for a specified key using the `region` and `key_id` parameters.
44

55
USAGE:
6-
scw keymanager key get [arg=value ...]
6+
scw keymanager key get <key-id ...> [arg=value ...]
77

88
ARGS:
99
key-id ID of the key to target
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Import externally generated key material into Key Manager to derive a new cryptographic key. The key's origin must be `external`.
4+
5+
USAGE:
6+
scw keymanager key import-key-material <key-id ...> [arg=value ...]
7+
8+
ARGS:
9+
key-id ID of the key in which to import key material
10+
[key-material] The key material The key material is a random sequence of bytes used to derive a cryptographic key.
11+
[salt] (Optional) Salt value to pass the key derivation function
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
13+
14+
FLAGS:
15+
-h, --help help for import-key-material
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use

0 commit comments

Comments
 (0)