awscli 1.40.43__py3-none-any.whl → 1.40.44__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- awscli/__init__.py +1 -1
- awscli/examples/kms/create-key.rst +42 -7
- awscli/examples/kms/delete-imported-key-material.rst +8 -2
- awscli/examples/kms/describe-key.rst +2 -0
- awscli/examples/kms/disable-key.rst +1 -1
- awscli/examples/kms/generate-data-key-pair-without-plaintext.rst +1 -0
- awscli/examples/kms/generate-data-key-pair.rst +1 -0
- awscli/examples/kms/generate-data-key-without-plaintext.rst +2 -1
- awscli/examples/kms/generate-data-key.rst +5 -4
- awscli/examples/kms/generate-mac.rst +45 -0
- awscli/examples/kms/generate-random.rst +1 -1
- awscli/examples/kms/get-public-key.rst +2 -3
- awscli/examples/kms/import-key-material.rst +6 -1
- awscli/examples/kms/re-encrypt.rst +3 -3
- awscli/examples/kms/sign.rst +1 -1
- awscli/examples/kms/verify-mac.rst +27 -0
- awscli/examples/kms/verify.rst +5 -1
- {awscli-1.40.43.dist-info → awscli-1.40.44.dist-info}/METADATA +3 -2
- {awscli-1.40.43.dist-info → awscli-1.40.44.dist-info}/RECORD +27 -25
- {awscli-1.40.43.data → awscli-1.40.44.data}/scripts/aws +0 -0
- {awscli-1.40.43.data → awscli-1.40.44.data}/scripts/aws.cmd +0 -0
- {awscli-1.40.43.data → awscli-1.40.44.data}/scripts/aws_bash_completer +0 -0
- {awscli-1.40.43.data → awscli-1.40.44.data}/scripts/aws_completer +0 -0
- {awscli-1.40.43.data → awscli-1.40.44.data}/scripts/aws_zsh_completer.sh +0 -0
- {awscli-1.40.43.dist-info → awscli-1.40.44.dist-info}/LICENSE.txt +0 -0
- {awscli-1.40.43.dist-info → awscli-1.40.44.dist-info}/WHEEL +0 -0
- {awscli-1.40.43.dist-info → awscli-1.40.44.dist-info}/top_level.txt +0 -0
awscli/__init__.py
CHANGED
@@ -17,6 +17,7 @@ Output::
|
|
17
17
|
"AWSAccountId": "111122223333",
|
18
18
|
"Arn": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
19
19
|
"CreationDate": "2017-07-05T14:04:55-07:00",
|
20
|
+
"CurrentKeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6",
|
20
21
|
"CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
|
21
22
|
"Description": "",
|
22
23
|
"Enabled": true,
|
@@ -40,7 +41,7 @@ For more information, see `Creating keys <https://docs.aws.amazon.com/kms/latest
|
|
40
41
|
|
41
42
|
**Example 2: To create an asymmetric RSA KMS key for encryption and decryption**
|
42
43
|
|
43
|
-
The following ``create-key`` example creates a KMS key that contains an asymmetric RSA key pair for encryption and decryption.
|
44
|
+
The following ``create-key`` example creates a KMS key that contains an asymmetric RSA key pair for encryption and decryption. The key spec and key usage can't be changed after the key is created.::
|
44
45
|
|
45
46
|
aws kms create-key \
|
46
47
|
--key-spec RSA_4096 \
|
@@ -75,7 +76,7 @@ For more information, see `Asymmetric keys in AWS KMS <https://docs.aws.amazon.c
|
|
75
76
|
|
76
77
|
**Example 3: To create an asymmetric elliptic curve KMS key for signing and verification**
|
77
78
|
|
78
|
-
To create an asymmetric KMS key that contains an asymmetric elliptic curve (ECC) key pair for signing and verification. The ``--key-usage`` parameter is required even though ``SIGN_VERIFY`` is the only valid value for ECC KMS keys.
|
79
|
+
To create an asymmetric KMS key that contains an asymmetric elliptic curve (ECC) key pair for signing and verification. The ``--key-usage`` parameter is required even though ``SIGN_VERIFY`` is the only valid value for ECC KMS keys. The key spec and key usage can't be changed after the key is created.::
|
79
80
|
|
80
81
|
aws kms create-key \
|
81
82
|
--key-spec ECC_NIST_P521 \
|
@@ -105,10 +106,43 @@ Output::
|
|
105
106
|
}
|
106
107
|
|
107
108
|
|
108
|
-
For more information, see `Asymmetric keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html>`__ in the *AWS Key Management Service Developer Guide*.
|
109
|
+
For more information, see `Asymmetric keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html>`__ in the *AWS Key Management Service Developer Guide*.
|
110
|
+
|
111
|
+
**Example 4: To create an asymmetric ML-DSA KMS key for signing and verification**
|
112
|
+
|
113
|
+
This example creates a module-lattice digital signature algorithm (ML-DSA) key for signing and verification. The key-usage parameter is required even though ``SIGN_VERIFY`` is the only valid value for ML-DSA keys. ::
|
114
|
+
|
115
|
+
aws kms create-key \
|
116
|
+
--key-spec ML_DSA_65 \
|
117
|
+
--key-usage SIGN_VERIFY
|
118
|
+
|
119
|
+
Output::
|
120
|
+
|
121
|
+
{
|
122
|
+
"KeyMetadata": {
|
123
|
+
"Arn": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
124
|
+
"AWSAccountId": "111122223333",
|
125
|
+
"CreationDate": "2019-12-02T07:48:55-07:00",
|
126
|
+
"Description": "",
|
127
|
+
"Enabled": true,
|
128
|
+
"KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
129
|
+
"KeyManager": "CUSTOMER",
|
130
|
+
"KeySpec": "ML_DSA_65",
|
131
|
+
"KeyState": "Enabled",
|
132
|
+
"KeyUsage": "SIGN_VERIFY",
|
133
|
+
"MultiRegion": false,
|
134
|
+
"Origin": "AWS_KMS",
|
135
|
+
"SigningAlgorithms": [
|
136
|
+
"ML_DSA_SHAKE_256"
|
137
|
+
]
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
|
142
|
+
For more information, see `Asymmetric keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html>`__ in the *AWS Key Management Service Developer Guide*.
|
109
143
|
|
110
144
|
|
111
|
-
**Example
|
145
|
+
**Example 5: To create an HMAC KMS key**
|
112
146
|
|
113
147
|
The following ``create-key`` example creates a 384-bit HMAC KMS key. The ``GENERATE_VERIFY_MAC`` value for the ``--key-usage`` parameter is required even though it's the only valid value for HMAC KMS keys. ::
|
114
148
|
|
@@ -142,7 +176,7 @@ Output::
|
|
142
176
|
For more information, see `HMAC keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html>`__ in the *AWS Key Management Service Developer Guide*.
|
143
177
|
|
144
178
|
|
145
|
-
**Example
|
179
|
+
**Example 6: To create a multi-Region primary KMS key**
|
146
180
|
|
147
181
|
The following ``create-key`` example creates a multi-Region primary symmetric encryption key. Because the default values for all parameters create a symmetric encryption key, only the ``--multi-region`` parameter is required for this KMS key. In the AWS CLI, to indicate that a Boolean parameter is true, just specify the parameter name. ::
|
148
182
|
|
@@ -156,6 +190,7 @@ Output::
|
|
156
190
|
"Arn": "arn:aws:kms:us-west-2:111122223333:key/mrk-1234abcd12ab34cd56ef12345678990ab",
|
157
191
|
"AWSAccountId": "111122223333",
|
158
192
|
"CreationDate": "2021-09-02T016:15:21-09:00",
|
193
|
+
"CurrentKeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6",
|
159
194
|
"CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
|
160
195
|
"Description": "",
|
161
196
|
"Enabled": true,
|
@@ -183,7 +218,7 @@ Output::
|
|
183
218
|
For more information, see `Asymmetric keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html>`__ in the *AWS Key Management Service Developer Guide*.
|
184
219
|
|
185
220
|
|
186
|
-
**Example
|
221
|
+
**Example 7: To create a KMS key for imported key material**
|
187
222
|
|
188
223
|
The following ``create-key`` example creates a creates a KMS key with no key material. When the operation is complete, you can import your own key material into the KMS key. To create this KMS key, set the ``--origin`` parameter to ``EXTERNAL``. ::
|
189
224
|
|
@@ -253,7 +288,7 @@ Output::
|
|
253
288
|
For more information, see `AWS CloudHSM key stores <https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html>`__ in the *AWS Key Management Service Developer Guide*.
|
254
289
|
|
255
290
|
|
256
|
-
**Example
|
291
|
+
**Example 8: To create a KMS key in an external key store**
|
257
292
|
|
258
293
|
The following ``create-key`` example creates a creates a KMS key in the specified external key store. The ``--custom-key-store-id``, ``--origin``, and ``--xks-key-id`` parameters are required in this command.
|
259
294
|
|
@@ -5,6 +5,12 @@ The following ``delete-imported-key-material`` example deletes key material that
|
|
5
5
|
aws kms delete-imported-key-material \
|
6
6
|
--key-id 1234abcd-12ab-34cd-56ef-1234567890ab
|
7
7
|
|
8
|
-
This command produces no output. To verify that the key material is deleted, use the ``describe-key`` command to look for a key state of ``PendingImport`` or ``PendingDeletion``.
|
9
8
|
|
10
|
-
|
9
|
+
Output::
|
10
|
+
|
11
|
+
{
|
12
|
+
"KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
13
|
+
"KeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6"
|
14
|
+
}
|
15
|
+
|
16
|
+
For more information, see `Deleting imported key material <https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-delete-key-material.html>`__ in the *AWS Key Management Service Developer Guide*.
|
@@ -14,6 +14,7 @@ Output::
|
|
14
14
|
"AWSAccountId": "846764612917",
|
15
15
|
"KeyId": "b8a9477d-836c-491f-857e-07937918959b",
|
16
16
|
"Arn": "arn:aws:kms:us-west-2:846764612917:key/b8a9477d-836c-491f-857e-07937918959b",
|
17
|
+
"CurrentKeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6",
|
17
18
|
"CreationDate": 2017-06-30T21:44:32.140000+00:00,
|
18
19
|
"Enabled": true,
|
19
20
|
"Description": "Default KMS key that protects my S3 objects when no other key is defined",
|
@@ -80,6 +81,7 @@ Output::
|
|
80
81
|
"AWSAccountId": "111122223333",
|
81
82
|
"Arn": "arn:aws:kms:ap-northeast-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
|
82
83
|
"CreationDate": "2021-06-28T21:09:16.114000+00:00",
|
84
|
+
"CurrentKeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6",
|
83
85
|
"Description": "",
|
84
86
|
"Enabled": true,
|
85
87
|
"KeyId": "mrk-1234abcd12ab34cd56ef1234567890ab",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
**To temporarily disable a KMS key**
|
2
2
|
|
3
|
-
The following
|
3
|
+
The following ``disable-key`` command disables a customer managed KMS key. To re-enable the KMS key, use the ``enable-key`` command. ::
|
4
4
|
|
5
5
|
aws kms disable-key \
|
6
6
|
--key-id 1234abcd-12ab-34cd-56ef-1234567890ab
|
@@ -20,6 +20,7 @@ Output::
|
|
20
20
|
"PrivateKeyCiphertextBlob": "AQIDAHi6LtupRpdKl2aJTzkK6FbhOtQkMlQJJH3PdtHvS/y+hAFFxmiD134doUDzMGmfCEtcAAAHaTCCB2UGCSqGSIb3DQEHBqCCB1...",
|
21
21
|
"PublicKey": "MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA3A3eGMyPrvSn7+LdlJE1oUoQV5HpEuHAVbdOyND+NmYDH/mL1OSIEuLrcdZ5hrMH4pk83r40l...",
|
22
22
|
"KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
23
|
+
"KeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6",
|
23
24
|
"KeyPairSpec": "ECC_NIST_P384"
|
24
25
|
}
|
25
26
|
|
@@ -19,6 +19,7 @@ Output::
|
|
19
19
|
"PrivateKeyPlaintext": "MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQDcDd4YzI+u9Kfv4t2UkTWhShBXkekS4cBVt07I0P42ZgMf+YvU5IgS4ut...",
|
20
20
|
"PublicKey": "MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA3A3eGMyPrvSn7+LdlJE1oUoQV5HpEuHAVbdOyND+NmYDH/mL1OSIEuLrcdZ5hrMH4pk83r40l...",
|
21
21
|
"KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
22
|
+
"KeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6"
|
22
23
|
"KeyPairSpec": "RSA_2048"
|
23
24
|
}
|
24
25
|
|
@@ -14,7 +14,8 @@ Output::
|
|
14
14
|
|
15
15
|
{
|
16
16
|
"CiphertextBlob": "AQEDAHjRYf5WytIc0C857tFSnBaPn2F8DgfmThbJlGfR8P3WlwAAAH4wfAYJKoZIhvcNAQcGoG8wbQIBADBoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDEFogL",
|
17
|
-
"KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
|
17
|
+
"KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
18
|
+
"KeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6"
|
18
19
|
}
|
19
20
|
|
20
21
|
The ``CiphertextBlob`` (encrypted data key) is returned in base64-encoded format.
|
@@ -15,13 +15,13 @@ Output::
|
|
15
15
|
{
|
16
16
|
"Plaintext": "VdzKNHGzUAzJeRBVY+uUmofUGGiDzyB3+i9fVkh3piw=",
|
17
17
|
"KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
18
|
+
"KeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6",
|
18
19
|
"CiphertextBlob": "AQEDAHjRYf5WytIc0C857tFSnBaPn2F8DgfmThbJlGfR8P3WlwAAAH4wfAYJKoZIhvcNAQcGoG8wbQIBADBoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDEFogLqPWZconQhwHAIBEIA7d9AC7GeJJM34njQvg4Wf1d5sw0NIo1MrBqZa+YdhV8MrkBQPeac0ReRVNDt9qleAt+SHgIRF8P0H+7U="
|
19
20
|
}
|
20
21
|
|
21
22
|
The ``Plaintext`` (plaintext data key) and the ``CiphertextBlob`` (encrypted data key) are returned in base64-encoded format.
|
22
23
|
|
23
|
-
For more information, see `Data keys <https://docs.aws.amazon.com/kms/latest/developerguide/
|
24
|
-
|
24
|
+
For more information, see `Data keys <https://docs.aws.amazon.com/kms/latest/developerguide/data-keys.html>`__ in the *AWS Key Management Service Developer Guide*.
|
25
25
|
**Example 2: To generate a 512-bit symmetric data key**
|
26
26
|
|
27
27
|
The following ``generate-data-key`` example requests a 512-bit symmetric data key for encryption and decryption. The command returns a plaintext data key for immediate use and deletion, and a copy of that data key encrypted under the specified KMS key. You can safely store the encrypted data key with the encrypted data.
|
@@ -41,9 +41,10 @@ Output::
|
|
41
41
|
{
|
42
42
|
"CiphertextBlob": "AQIBAHi6LtupRpdKl2aJTzkK6FbhOtQkMlQJJH3PdtHvS/y+hAEnX/QQNmMwDfg2korNMEc8AAACaDCCAmQGCSqGSIb3DQEHBqCCAlUwggJRAgEAMIICSgYJKoZ...",
|
43
43
|
"Plaintext": "ty8Lr0Bk6OF07M2BWt6qbFdNB+G00ZLtf5MSEb4al3R2UKWGOp06njAwy2n72VRm2m7z/Pm9Wpbvttz6a4lSo9hgPvKhZ5y6RTm4OovEXiVfBveyX3DQxDzRSwbKDPk/...",
|
44
|
-
"KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
|
44
|
+
"KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
45
|
+
"KeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6"
|
45
46
|
}
|
46
47
|
|
47
48
|
The ``Plaintext`` (plaintext data key) and ``CiphertextBlob`` (encrypted data key) are returned in base64-encoded format.
|
48
49
|
|
49
|
-
For more information, see `Data keys <https://docs.aws.amazon.com/kms/latest/developerguide/
|
50
|
+
For more information, see `Data keys <https://docs.aws.amazon.com/kms/latest/developerguide/data-keys.html>`__ in the *AWS Key Management Service Developer Guide*.
|
@@ -0,0 +1,45 @@
|
|
1
|
+
**Example 1: To generate an HMAC for a message**
|
2
|
+
|
3
|
+
The following ``generate-mac`` command generates an HMAC for a message, an HMAC KMS key, and a MAC algorithm. The algorithm must be supported by the specified HMAC KMS key.
|
4
|
+
|
5
|
+
In AWS CLI v2, the value of the ``message`` parameter must be Base64-encoded. Or, you can save the message in a file and use the ``fileb://`` prefix, which tells the AWS CLI to read binary data from the file.
|
6
|
+
|
7
|
+
Before running this command, replace the example key ID with a valid key ID from your AWS account. The key ID must represent a HMAC KMS key with a key usage of ``GENERATE_VERIFY_MAC``. ::
|
8
|
+
|
9
|
+
msg=(echo 'Hello World' | base64)
|
10
|
+
|
11
|
+
aws kms generate-mac \
|
12
|
+
--key-id 1234abcd-12ab-34cd-56ef-1234567890ab \
|
13
|
+
--message fileb://Message \
|
14
|
+
--mac-algorithm HMAC_SHA_384
|
15
|
+
|
16
|
+
Output::
|
17
|
+
|
18
|
+
{
|
19
|
+
"KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
20
|
+
"Mac": "<HMAC_TAG>",
|
21
|
+
"MacAlgorithm": "HMAC_SHA_384"
|
22
|
+
}
|
23
|
+
|
24
|
+
For more information about using HMAC KMS keys in AWS KMS, see `HMAC keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html>`__ in the *AWS Key Management Service Developer Guide*.
|
25
|
+
|
26
|
+
**Example 2: To save an HMAC in a file (Linux and macOs)**
|
27
|
+
|
28
|
+
The following ``generate-mac`` example generates an HMAC for a short message stored in a local file. The command also gets the ``Mac`` property from the response, Base64-decodes it and saves it in the ExampleMac file. You can use the MAC file in a ``verify-mac`` command that verifies the MAC.
|
29
|
+
|
30
|
+
The ``generate-mac`` command requires a Base64-encoded message and a MAC algorithm that your HMAC KMS key supports. To get the MAC algorithms that your KMS key supports, use the ``describe-key`` command.
|
31
|
+
|
32
|
+
Before running this command, replace the example key ID with a valid key ID from your AWS account. The key ID must represent an asymmetric KMS key with a key usage of GENERATE_VERIFY_MAC. ::
|
33
|
+
|
34
|
+
echo 'hello world' | base64 > EncodedMessage
|
35
|
+
|
36
|
+
aws kms generate-mac \
|
37
|
+
--key-id 1234abcd-12ab-34cd-56ef-1234567890ab \
|
38
|
+
--message fileb://EncodedMessage \
|
39
|
+
--mac-algorithm HMAC_SHA_384 \
|
40
|
+
--output text \
|
41
|
+
--query Mac | base64 --decode > ExampleMac
|
42
|
+
|
43
|
+
This command produces no output. This example extracts the ``Mac`` property of the output and saves it in a file.
|
44
|
+
|
45
|
+
For more information about using HMAC KMS keys in AWS KMS, see `HMAC keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html>`__ in the *AWS Key Management Service Developer Guide*.
|
@@ -6,7 +6,7 @@ When you run this command, you must use the ``number-of-bytes`` parameter to spe
|
|
6
6
|
|
7
7
|
You don't specify a KMS key when you run this command. The random byte string is unrelated to any KMS key.
|
8
8
|
|
9
|
-
By default, AWS KMS generates the random number. However, if you specify a `custom key store<https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html>`__, the random byte string is generated in the AWS CloudHSM cluster associated with the custom key store.
|
9
|
+
By default, AWS KMS generates the random number. However, if you specify a `custom key store <https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html>`__, the random byte string is generated in the AWS CloudHSM cluster associated with the custom key store.
|
10
10
|
|
11
11
|
This example uses the following parameters and values:
|
12
12
|
|
@@ -20,8 +20,7 @@ Output::
|
|
20
20
|
]
|
21
21
|
}
|
22
22
|
|
23
|
-
For more information about using asymmetric KMS keys in AWS KMS, see `
|
24
|
-
|
23
|
+
For more information about using asymmetric KMS keys in AWS KMS, see `Asymmetric keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html>`__ in the *AWS Key Management Service Developer Guide*.
|
25
24
|
**Example 2: To convert a public key to DER format (Linux and macOS)**
|
26
25
|
|
27
26
|
The following ``get-public-key`` example downloads the public key of an asymmetric KMS key and saves it in a DER file.
|
@@ -37,4 +36,4 @@ Before running this command, replace the example key ID with a valid key ID from
|
|
37
36
|
|
38
37
|
This command produces no output.
|
39
38
|
|
40
|
-
For more information about using asymmetric KMS keys in AWS KMS, see `
|
39
|
+
For more information about using asymmetric KMS keys in AWS KMS, see `Asymmetric keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html>`__ in the *AWS Key Management Service Developer Guide*.
|
@@ -15,6 +15,11 @@ Before running this command, replace the example key ID with a valid key ID or k
|
|
15
15
|
--expiration-model KEY_MATERIAL_EXPIRES \
|
16
16
|
--valid-to 2021-09-21T19:00:00Z
|
17
17
|
|
18
|
-
|
18
|
+
Output::
|
19
|
+
|
20
|
+
{
|
21
|
+
"KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
22
|
+
"KeyMaterialId": "0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6"
|
23
|
+
}
|
19
24
|
|
20
25
|
For more information about importing key material, see `Importing Key Material <https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html>`__ in the *AWS Key Management Service Developer Guide*.
|
@@ -4,7 +4,7 @@ The following ``re-encrypt`` command example demonstrates the recommended way to
|
|
4
4
|
|
5
5
|
* Provide the ciphertext in a file.
|
6
6
|
|
7
|
-
In the value of the ``--ciphertext-blob`` parameter, use the ``fileb://`` prefix, which tells the CLI to read the data from a binary file. If the file is not in the current directory, type the full path to file. For more information about reading AWS CLI parameter values from a file, see `Loading AWS CLI parameters from a file <https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-file.html>` in the *AWS Command Line Interface User Guide* and `Best Practices for Local File Parameters<https://aws.amazon.com/blogs/developer/best-practices-for-local-file-parameters/>` in the *AWS Command Line Tool Blog*.
|
7
|
+
In the value of the ``--ciphertext-blob`` parameter, use the ``fileb://`` prefix, which tells the CLI to read the data from a binary file. If the file is not in the current directory, type the full path to file. For more information about reading AWS CLI parameter values from a file, see `Loading AWS CLI parameters from a file <https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-file.html>`__ in the *AWS Command Line Interface User Guide* and `Best Practices for Local File Parameters <https://aws.amazon.com/blogs/developer/best-practices-for-local-file-parameters/>`__ in the *AWS Command Line Tool Blog*.
|
8
8
|
|
9
9
|
* Specify the source KMS key, which decrypts the ciphertext.
|
10
10
|
|
@@ -34,7 +34,7 @@ Before running this command, replace the example key IDs with valid key identifi
|
|
34
34
|
|
35
35
|
This command produces no output. The output from the ``re-encrypt`` command is base64-decoded and saved in a file.
|
36
36
|
|
37
|
-
For more information, see `ReEncrypt <https://docs.aws.amazon.com/kms/latest/APIReference/API_ReEncrypt.html
|
37
|
+
For more information, see `ReEncrypt <https://docs.aws.amazon.com/kms/latest/APIReference/API_ReEncrypt.html>`__ in the *AWS Key Management Service API Reference*.
|
38
38
|
|
39
39
|
**Example 2: To re-encrypt an encrypted message under a different symmetric KMS key (Windows command prompt).**
|
40
40
|
|
@@ -59,4 +59,4 @@ Output::
|
|
59
59
|
Output Length = 12
|
60
60
|
CertUtil: -decode command completed successfully.
|
61
61
|
|
62
|
-
For more information, see `ReEncrypt <https://docs.aws.amazon.com/kms/latest/APIReference/API_ReEncrypt.html
|
62
|
+
For more information, see `ReEncrypt <https://docs.aws.amazon.com/kms/latest/APIReference/API_ReEncrypt.html>`__ in the *AWS Key Management Service API Reference*.
|
awscli/examples/kms/sign.rst
CHANGED
@@ -4,7 +4,7 @@ The following ``sign`` example generates a cryptographic signature for a short m
|
|
4
4
|
|
5
5
|
You must specify a message to sign and a signing algorithm that your asymmetric KMS key supports. To get the signing algorithms for your KMS key, use the ``describe-key`` command.
|
6
6
|
|
7
|
-
In AWS CLI
|
7
|
+
In AWS CLI v2, the value of the ``message`` parameter must be Base64-encoded. Or, you can save the message in a file and use the ``fileb://`` prefix, which tells the AWS CLI to read binary data from the file.
|
8
8
|
|
9
9
|
Before running this command, replace the example key ID with a valid key ID from your AWS account. The key ID must represent an asymmetric KMS key with a key usage of SIGN_VERIFY. ::
|
10
10
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
**Example 1: To verify an HMAC**
|
2
|
+
|
3
|
+
The following ``verify-mac`` command verifies an HMAC for a particular message, HMAC KMS keys, and MAC algorithm. A value of 'true' in the MacValid value in the response indicates that the HMAC is valid.
|
4
|
+
|
5
|
+
In AWS CLI v2, the value of the ``message`` parameter must be Base64-encoded. Or, you can save the message in a file and use the ``fileb://`` prefix, which tells the AWS CLI to read binary data from the file.
|
6
|
+
|
7
|
+
The MAC that you specify cannot be base64-encoded. For help decoding the MAC that the ``generate-mac`` command returns, see the ``generate-mac`` command examples.
|
8
|
+
|
9
|
+
Before running this command, replace the example key ID with a valid key ID from your AWS account. The key ID must represent a HMAC KMS key with a key usage of ``GENERATE_VERIFY_MAC``. ::
|
10
|
+
|
11
|
+
msg=(echo 'Hello World' | base64)
|
12
|
+
|
13
|
+
aws kms verify-mac \
|
14
|
+
--key-id 1234abcd-12ab-34cd-56ef-1234567890ab \
|
15
|
+
--message fileb://Message \
|
16
|
+
--mac-algorithm HMAC_SHA_384 \
|
17
|
+
--mac fileb://ExampleMac
|
18
|
+
|
19
|
+
Output::
|
20
|
+
|
21
|
+
{
|
22
|
+
"KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
23
|
+
"MacValid": true,
|
24
|
+
"MacAlgorithm": "HMAC_SHA_384"
|
25
|
+
}
|
26
|
+
|
27
|
+
For more information about using HMAC KMS keys in AWS KMS, see `HMAC keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html>`__ in the *AWS Key Management Service Developer Guide*.
|
awscli/examples/kms/verify.rst
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
**To verify a digital signature**
|
2
2
|
|
3
|
-
The following ``verify``
|
3
|
+
The following ``verify`` command verifies a cryptographic signature for a short, Base64-encoded message. The key ID, message, message type, and signing algorithm must be same ones that were used to sign the message.
|
4
|
+
|
5
|
+
In AWS CLI v2, the value of the ``message`` parameter must be Base64-encoded. Or, you can save the message in a file and use the ``fileb://`` prefix, which tells the AWS CLI to read binary data from the file.
|
6
|
+
|
7
|
+
The signature that you specify cannot be base64-encoded. For help decoding the signature that the ``sign`` command returns, see the ``sign`` command examples.
|
4
8
|
|
5
9
|
The output of the command includes a Boolean ``SignatureValid`` field that indicates that the signature was verified. If the signature validation fails, the ``verify`` command fails, too.
|
6
10
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: awscli
|
3
|
-
Version: 1.40.
|
3
|
+
Version: 1.40.44
|
4
4
|
Summary: Universal Command Line Environment for AWS.
|
5
5
|
Home-page: http://aws.amazon.com/cli/
|
6
6
|
Author: Amazon Web Services
|
@@ -20,9 +20,10 @@ Classifier: Programming Language :: Python :: 3.9
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
23
24
|
Requires-Python: >= 3.9
|
24
25
|
License-File: LICENSE.txt
|
25
|
-
Requires-Dist: botocore (==1.38.
|
26
|
+
Requires-Dist: botocore (==1.38.45)
|
26
27
|
Requires-Dist: docutils (<=0.19,>=0.18.1)
|
27
28
|
Requires-Dist: s3transfer (<0.14.0,>=0.13.0)
|
28
29
|
Requires-Dist: PyYAML (<6.1,>=3.10)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
awscli/__init__.py,sha256
|
1
|
+
awscli/__init__.py,sha256=-J1OW2-ugOFTVL7uDVRN5d8e1l1fNn0LcsxduxhGNdA,1534
|
2
2
|
awscli/__main__.py,sha256=iBjOg0tBxNlhzTi_tyc1G0SMGBvHMVvBJzX3JqYaooY,662
|
3
3
|
awscli/alias.py,sha256=Jj2jetpajUMcjqx9tFhHUOKpzLChQygnH2zqDFfmgIM,11315
|
4
4
|
awscli/argparser.py,sha256=3Pxx-vWytdV985Y6MIl9DeutUXyehIvACIs_PDby8GI,7650
|
@@ -3907,30 +3907,31 @@ awscli/examples/kms/connect-custom-key-store.rst,sha256=8lEzgdk0W6mwEJUJ9ldM3HZk
|
|
3907
3907
|
awscli/examples/kms/create-alias.rst,sha256=sEsswzqxDZHiXNRsOjsTIBYxXDgHjIt5VzeoGlXeTgE,729
|
3908
3908
|
awscli/examples/kms/create-custom-key-store.rst,sha256=rfGO0VWX87Iy4HxhRjGd8NsGEScyLFb-s0XspBuMyV0,3838
|
3909
3909
|
awscli/examples/kms/create-grant.rst,sha256=SntoNVAyzGI1jZEWS3NboPpGQAsiWeyuxdX88QY--Xk,1209
|
3910
|
-
awscli/examples/kms/create-key.rst,sha256=
|
3910
|
+
awscli/examples/kms/create-key.rst,sha256=39ZwKfz_sfiwLhPVL_3Rx8bowaHARZc6l8H6A0M0LEo,14063
|
3911
3911
|
awscli/examples/kms/decrypt.rst,sha256=LGLUlzg2kN7Ohv6hUoqMGRAsY-RD4pax1xrVUfYd9l4,4551
|
3912
3912
|
awscli/examples/kms/delete-alias.rst,sha256=D6-ouqnsUth7Je9N--YUWHQaSrRdhVg9VIh-y-1is7M,502
|
3913
3913
|
awscli/examples/kms/delete-custom-key-store.rst,sha256=Tfi9Zw20otPF4BmNW6zrU7nioehLkKIXmJVaw8Qb0mo,1503
|
3914
|
-
awscli/examples/kms/delete-imported-key-material.rst,sha256=
|
3914
|
+
awscli/examples/kms/delete-imported-key-material.rst,sha256=WABose65pvZQ4h6T8AVUhPn6QaKPrzDP2hzFOFc3cUE,650
|
3915
3915
|
awscli/examples/kms/derive-shared-secret.rst,sha256=Ousf6DKTT_jMGnaiqqRLEUzothWthYcGIBS7e1GluZY,1158
|
3916
3916
|
awscli/examples/kms/describe-custom-key-stores.rst,sha256=VyFafEje-Z7447sZYQE_fq24ex6be5OeTFc23F-AF-0,5450
|
3917
|
-
awscli/examples/kms/describe-key.rst,sha256=
|
3917
|
+
awscli/examples/kms/describe-key.rst,sha256=oWv44bQsw_mkvN0474JkYLmCuLHNlBcGyO-xzaNfOso,6105
|
3918
3918
|
awscli/examples/kms/disable-key-rotation.rst,sha256=nCRixoG43u9lcJS-qIZy7noGpDqr5gQJ-WUcYVwbRaI,679
|
3919
|
-
awscli/examples/kms/disable-key.rst,sha256
|
3919
|
+
awscli/examples/kms/disable-key.rst,sha256=JgmfqD1OkADVbm_jejdkpAKGoig8AgRZusqgRk6tEig,484
|
3920
3920
|
awscli/examples/kms/disconnect-custom-key-store.rst,sha256=n7JHEcbG6qwWtyWYMpwvDO57jm6pG2ASTMUUKyYeU8w,1285
|
3921
3921
|
awscli/examples/kms/enable-key-rotation.rst,sha256=K1TERE04TcjkfvX_fcz7Biwky6SFcDo0K80md2hbFZo,1142
|
3922
3922
|
awscli/examples/kms/enable-key.rst,sha256=kRch6rLw9mqzrKefqqh1uVaCcEWI2fBcyLzOepqfXPs,1048
|
3923
3923
|
awscli/examples/kms/encrypt.rst,sha256=8bmOjh07MVLNMkvzXvslsFej6G-80R4pDzTLT4yEAwk,3552
|
3924
|
-
awscli/examples/kms/generate-data-key-pair-without-plaintext.rst,sha256=
|
3925
|
-
awscli/examples/kms/generate-data-key-pair.rst,sha256=
|
3926
|
-
awscli/examples/kms/generate-data-key-without-plaintext.rst,sha256=
|
3927
|
-
awscli/examples/kms/generate-data-key.rst,sha256=
|
3928
|
-
awscli/examples/kms/generate-
|
3924
|
+
awscli/examples/kms/generate-data-key-pair-without-plaintext.rst,sha256=gN7K66TYUddbxIx_KO5U-_jNb1HIO_sxWdaEwKspu1g,1794
|
3925
|
+
awscli/examples/kms/generate-data-key-pair.rst,sha256=SErHatPyndL0NUb-nElLjRWNLoVg2ALBUuJaWWIqokY,1864
|
3926
|
+
awscli/examples/kms/generate-data-key-without-plaintext.rst,sha256=nOir89C7KokaoDu1nrz5nu4EPLZg_dThM_6RlQRLxrg,1475
|
3927
|
+
awscli/examples/kms/generate-data-key.rst,sha256=iwP6qW1QnYy7SWROtQ6c5mNfLD8YiUtSy0P380k_rI8,3414
|
3928
|
+
awscli/examples/kms/generate-mac.rst,sha256=yfMxjLJuP3mspQnKdfMxy8nyPFBkes0f2GmbBjx67jI,2629
|
3929
|
+
awscli/examples/kms/generate-random.rst,sha256=dbDNtokE74zkjmkWyr0KhEUpMC6oDNP-uQfuh2p1eW8,3233
|
3929
3930
|
awscli/examples/kms/get-key-policy.rst,sha256=cPbzGXXI6qWDmtMBmWj3Lr5N340Mqpcj7URt8LE1BkI,956
|
3930
3931
|
awscli/examples/kms/get-key-rotation-status.rst,sha256=jdAwWEi8zQNZ5j34yws2EMxtfWfY45-zzAJ56khStoQ,936
|
3931
3932
|
awscli/examples/kms/get-parameters-for-import.rst,sha256=8haK9p9_iP3gKpMj-iolSGGZXeanuNl7wcmsAHng7FU,1393
|
3932
|
-
awscli/examples/kms/get-public-key.rst,sha256=
|
3933
|
-
awscli/examples/kms/import-key-material.rst,sha256
|
3933
|
+
awscli/examples/kms/get-public-key.rst,sha256=B3vF0Fni1l3-N6HxjPvMcVecpjmdXPIbW5TLsOQYZgs,2352
|
3934
|
+
awscli/examples/kms/import-key-material.rst,sha256=JwHrbmrbjcfM7MDBgeeOYrn8q29SKUmHNS-FvoIjCQ0,1688
|
3934
3935
|
awscli/examples/kms/list-aliases.rst,sha256=Qj8w9X2eRuEvmnfCGAIhArg6m2y1rAG_35EpQl3-8xo,2783
|
3935
3936
|
awscli/examples/kms/list-grants.rst,sha256=sRDRy8GKeqp8IR93Bhcl8mEhrJUo4TVhckdSJoJL3Ac,2611
|
3936
3937
|
awscli/examples/kms/list-key-policies.rst,sha256=DqSoBwSISPTsuYOaPCJVKBCH2WiNyGjOu_e_Eyn1Vis,926
|
@@ -3939,18 +3940,19 @@ awscli/examples/kms/list-keys.rst,sha256=7AU8FcguZhieFBZy1OJLXSVYxD1yeFQsahwct0v
|
|
3939
3940
|
awscli/examples/kms/list-resource-tags.rst,sha256=yxMChbUFcsUMuFHkqg--SnFtXSRDLruJWMBZ5QhwRhc,980
|
3940
3941
|
awscli/examples/kms/list-retirable-grants.rst,sha256=vNwoazokaY0bmd01wmSUU2Z2LAxQuRdI8VqIMeJFqIE,2986
|
3941
3942
|
awscli/examples/kms/put-key-policy.rst,sha256=0RShtw3i2AEeLFqvX-F3Y_4bXclotdNudduzGR57iiE,3550
|
3942
|
-
awscli/examples/kms/re-encrypt.rst,sha256=
|
3943
|
+
awscli/examples/kms/re-encrypt.rst,sha256=gkkckSzbDmFtje-AwGWuzKrIEddhQLBXuQkVr-jrbMM,3917
|
3943
3944
|
awscli/examples/kms/retire-grant.rst,sha256=YfvnDEtF4KkRJwjA1mqE73F6Qlape5yauDzZkkg-kv0,810
|
3944
3945
|
awscli/examples/kms/revoke-grant.rst,sha256=tU7dy1BDcDYOEkgT5TBr35ZkLQKEOdjOTSoxptAeU0A,776
|
3945
3946
|
awscli/examples/kms/rotate-key-on-demand.rst,sha256=vzTAKK9MHfTtCn2thIcolK3tuPG3bDqVWK4owRvVo7c,578
|
3946
3947
|
awscli/examples/kms/schedule-key-deletion.rst,sha256=54Lj5xJSaK1ETKOFvEVbUj08fdtcNPz2dVeuohJrLZ4,1470
|
3947
|
-
awscli/examples/kms/sign.rst,sha256=
|
3948
|
+
awscli/examples/kms/sign.rst,sha256=QlFiaYZ0o_Re6XrflHY5mEg08kf-nA-NezqG7uqCHrM,3150
|
3948
3949
|
awscli/examples/kms/tag-resource.rst,sha256=OL8u89tF_q7W6d9ew_FjfGLXZiGgaO7VTAQytqtey7s,891
|
3949
3950
|
awscli/examples/kms/untag-resource.rst,sha256=IBcUXHx_OPeeFOTBunGqjOGmiQqitdlufDAXdFqDzVg,836
|
3950
3951
|
awscli/examples/kms/update-alias.rst,sha256=EEM-3C8WyBG5CcC5OtscHXCaemkRH0m2j5B8KGYINdA,814
|
3951
3952
|
awscli/examples/kms/update-custom-key-store.rst,sha256=uFft481lH9qEBbmkBZorQkR_VbNLbo_pnZOtBt5OiIA,6772
|
3952
3953
|
awscli/examples/kms/update-key-description.rst,sha256=UjbMlCZUBJUqAgKPWbyZEiaeDmBenYRLkDv3XnQONsI,1896
|
3953
|
-
awscli/examples/kms/verify.rst,sha256=
|
3954
|
+
awscli/examples/kms/verify-mac.rst,sha256=IkhQtgg649HFbk91numIsG6nIIhP-tb6Ah6-WRgFg5c,1451
|
3955
|
+
awscli/examples/kms/verify.rst,sha256=SafCHcjajKsuBTNX8Xv8Ps7DV8WiOIROKwwRT6JlO8Y,1628
|
3954
3956
|
awscli/examples/lakeformation/add-lf-tags-to-resource.rst,sha256=3h-tZiAlsNZZgpAi6l0aBqKphs-m69XBQb0AxbDx9I8,984
|
3955
3957
|
awscli/examples/lakeformation/batch-grant-permissions.rst,sha256=vEruZMKkB-FDtqeIuF9waN7IFLWj8NDFHn9orRODCOY,3267
|
3956
3958
|
awscli/examples/lakeformation/batch-revoke-permissions.rst,sha256=l54CLtj4Fd3vPXjFhb37ntVe_d7LycJDRWgdPV4Wdjs,1962
|
@@ -6162,13 +6164,13 @@ awscli/topics/return-codes.rst,sha256=d9lpNFZwD75IiYcDEADQzu-4QiR8P28UPHkrNwPV5J
|
|
6162
6164
|
awscli/topics/s3-config.rst,sha256=5EIVd4ggLBHtzjtHFvQp9hY415yMGZiG7S_rO9qy2t0,11663
|
6163
6165
|
awscli/topics/s3-faq.rst,sha256=9qO0HFI6F9hx1wVEUDl8Jy6yoCUd9zbtv-Z0Re4dsiw,2934
|
6164
6166
|
awscli/topics/topic-tags.json,sha256=6lUSrs3FKCZNRSQMnjcXNgWyRNGjZIeur1988a4IO5o,1577
|
6165
|
-
awscli-1.40.
|
6166
|
-
awscli-1.40.
|
6167
|
-
awscli-1.40.
|
6168
|
-
awscli-1.40.
|
6169
|
-
awscli-1.40.
|
6170
|
-
awscli-1.40.
|
6171
|
-
awscli-1.40.
|
6172
|
-
awscli-1.40.
|
6173
|
-
awscli-1.40.
|
6174
|
-
awscli-1.40.
|
6167
|
+
awscli-1.40.44.data/scripts/aws,sha256=r24FExgs0-JjILTQ3XZAqXBYE4SV6UMTtALkLGAj86g,805
|
6168
|
+
awscli-1.40.44.data/scripts/aws.cmd,sha256=s46DkC6LNgX63CIkzxxbPnFMJ6DRDBkvc88GnWa8Pvg,1432
|
6169
|
+
awscli-1.40.44.data/scripts/aws_bash_completer,sha256=RRpoEGJRagRzyHZKZZOwpltuVYv2EoiZsdXhmyWPZ54,204
|
6170
|
+
awscli-1.40.44.data/scripts/aws_completer,sha256=oC9kuMDlWE47dWk_4xjPde2PQvN-M0vND0J4YSLabVQ,1126
|
6171
|
+
awscli-1.40.44.data/scripts/aws_zsh_completer.sh,sha256=Qm6Z8ejNAMzpJjaT0pzqxbSDT2zxdmzVe5haRA7qLoc,1808
|
6172
|
+
awscli-1.40.44.dist-info/LICENSE.txt,sha256=o5XhFlwu0OK_BBrijlKCRa7dQAm36UrUB3gCV_cEr8E,549
|
6173
|
+
awscli-1.40.44.dist-info/METADATA,sha256=5UPbmrX0fDLetmsu7Nr3uHW2Pw4lSj5Y7-b-7VV5p8w,11106
|
6174
|
+
awscli-1.40.44.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
6175
|
+
awscli-1.40.44.dist-info/top_level.txt,sha256=vt9wXFr1_nGYK6abhJgt6zY3fULe4JSZedm_5XOM9S0,7
|
6176
|
+
awscli-1.40.44.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|