You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: framework/kms-keyring.md
+43-45Lines changed: 43 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,16 @@
5
5
6
6
## Version
7
7
8
-
0.2.1
8
+
0.2.2
9
9
10
10
### Changelog
11
11
12
+
- 0.2.2
13
+
14
+
- Rename Key IDs to [Key Names](#key-names) for increased clarity
15
+
- Update [Key Names](#key-names) and [Generator](#generator) sections to reinforce support for all AWS KMS key identifiers
16
+
-[Pull request link for discussions](https://github.com/awslabs/aws-encryption-sdk-specification/pull/123)
17
+
12
18
- 0.2.1
13
19
14
20
-[Clarify naming of KMS to AWS KMS](https://github.com/awslabs/aws-encryption-sdk-specification/issues/67)
@@ -78,7 +84,7 @@ On keyring initialization, a keyring MUST define the following:
78
84
79
85
On keyring initialization, a keyring MAY define the following:
80
86
81
-
-[Key IDs](#key-ids)
87
+
-[Key Names](#key-names)
82
88
-[Generator](#generator)
83
89
-[Grant Tokens](#grant-tokens)
84
90
@@ -100,51 +106,42 @@ and MAY return an AWS KMS Client that can make the following API calls in the gi
100
106
If the client supplier cannot supply a client for the requested region,
101
107
it MUST communicate that fact to the AWS KMS keyring.
102
108
103
-
### Key IDs
104
-
105
-
Key IDs is a list of strings identifying AWS KMS CMKs, in ARN format.
106
-
This list identifies the CMKs to be used for data key encryption and decryption with this keyring.
109
+
### Key Names
107
110
108
-
Each Key ID MUST be one of the following:
111
+
A list of strings identifying the [AWS KMS customer master keys (CMKs)](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id)
112
+
that the AWS KMS keyring uses to encrypt and decrypt data keys.
109
113
110
-
- A CMK [alias](https://docs.aws.amazon.com/kms/latest/developerguide/programming-aliases.html) (e.g. "alias/MyCryptoKey")
111
-
- A well-formed key ARN (e.g. arn:aws:kms:us-east-1:999999999999:key/01234567-89ab-cdef-fedc-ba9876543210)
112
-
- A well-formed alias ARN (e.g. arn:aws:kms:us-east-1:999999999999:alias/MyCryptoKey)
114
+
The AWS KMS keyring accepts any value for a key name that is [accepted by AWS KMS as a key identifer](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id).
115
+
The AWS KMS keyring does not validate any value for a key name and passes this information to AWS KMS.
113
116
114
-
See [AWS Documentation](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms).
115
-
116
-
Note that only key IDs in the key ARN format will ever be used for decryption.
117
-
This is because encrypted data keys constructed by the AWS KMS keyring will always store the ID of the
118
-
CMK used to encrypt it in key ARN format, and [OnDecrypt](#ondecrypt) checks the key ID against that
117
+
Note that only key names in the [key ARN format](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms) are used for decryption
118
+
because encrypted data keys constructed by the AWS KMS keyring always store the ID of the CMK used to encrypt it in the key ARN format
119
+
and [OnDecrypt](#ondecrypt) checks the key name against that
MUST have [kms:Encrypt](https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html#AWS-KMS-API-Operations-and-Permissions) permission
124
+
for each AWS KMS CMK specified in the key names.
124
125
125
126
### Generator
126
127
127
-
A string that identifies an AWS KMS CMK responsible for generating a data key, as well as encrypting and
128
-
decrypting data keys.
129
-
The string MUST be one of the following:
130
-
131
-
- A CMK [alias](https://docs.aws.amazon.com/kms/latest/developerguide/programming-aliases.html) (e.g. "alias/MyCryptoKey")
132
-
- A well-formed key ARN (e.g. arn:aws:kms:us-east-1:999999999999:key/01234567-89ab-cdef-fedc-ba9876543210)
133
-
- A well-formed alias ARN (e.g. arn:aws:kms:us-east-1:999999999999:alias/MyCryptoKey)
128
+
A string that identifies an [AWS KMS customer master key (CMK)](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id)
129
+
that the AWS KMS keyring uses to generate, encrypt, and decrypt data keys.
134
130
135
-
See [AWS Documentation](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms).
131
+
The AWS KMS keyring accepts any value for a generator that is [accepted by AWS KMS as a key identifer](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id).
132
+
The AWS KMS keyring does not validate any value for a generator and passes this information to AWS KMS.
136
133
137
-
Note that only key IDs in the key ARN format will ever be used for decryption.
138
-
This is because encrypted data keys constructed by the AWS KMS keyring will always store the ID of the
139
-
CMK used to encrypt it in key ARN format, and [OnDecrypt](#ondecrypt) checks the key ID against that
134
+
Note that only generators in the [key ARN format](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms) are used for decryption
135
+
because encrypted data keys constructed by the AWS KMS keyring always store the ID of the CMK used to encrypt it in the key ARN format
136
+
and [OnDecrypt](#ondecrypt) checks the generator against that
140
137
value before attempting decryption.
141
138
142
-
The generator SHOULD NOT be included in the [key IDs](#key-ids), otherwise this CMK will be used
143
-
twice to encrypt the plaintext data key.
139
+
The generator SHOULD NOT be included in the [key names](#key-names),
140
+
otherwise this CMK is used to encrypt the plaintext data key twice.
144
141
145
-
The AWS KMS CMK specified by the generator MUST have
MUST have [kms:GenerateDataKey](https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html#AWS-KMS-API-Operations-and-Permissions) permission
144
+
for the AWS KMS CMK specified by the generator.
148
145
149
146
### Grant Tokens
150
147
@@ -162,10 +159,11 @@ The following is a derived property of the AWS KMS keyring:
162
159
### Is Discovery
163
160
164
161
Indicates whether this keyring is a discovery keyring.
165
-
Discovery keyrings do not perform encryption, and on decryption will attempt to decrypt every inputted
166
-
[encrypted data key](structures.md#encrypted-data-key) if the client supplier return a client.
162
+
Discovery keyrings do not perform encryption and on decryption attempt to decrypt
163
+
any [encrypted data key](structures.md#encrypted-data-key) that was encrypted by the AWS KMS keyring,
164
+
if the client supplier returns a client.
167
165
168
-
If this keyring has defined a [generator](#generator) or [key IDs](#key-ids), this value MUST be false.
166
+
If this keyring has defined a [generator](#generator) or [key names](#key-names), this value MUST be false.
169
167
Otherwise, this value MUST be true.
170
168
171
169
If this value is true, the keyring MUST only ever call [AWS KMS Decrypt](#aws-kms-decrypt).
@@ -220,17 +218,17 @@ If verified, OnEncrypt MUST do the following with the response from [AWS KMS Gen
220
218
- the [key provider id](structures.md#key-provider-id) is "aws-kms".
221
219
- the [key provider information](structures.md#key-provider-information) is the response `KeyId`.
222
220
Given a plaintext data key in the [encryption materials](structures.md#encryption-materials),
223
-
OnEncrypt MUST attempt to encrypt the plaintext data key using each CMK specified in it's[key IDs](#key-ids) list.
221
+
OnEncrypt MUST attempt to encrypt the plaintext data key using each CMK specified in its[key names](#key-names) list.
224
222
225
223
If this keyring's [generator](#generator) is defined and was not used to [generate a data key](#aws-kms-generatedatakey)
226
224
as described above, OnEncrypt MUST also attempt to encrypt the plaintext data key using the CMK specified by the [generator](#generator).
227
225
228
226
To attempt to encrypt the plaintext data key with a particular CMK, OnEncrypt MUST call [AWS KMS Encrypt](#aws-kms-encrypt).
229
227
230
-
For each [AWS KMS Encrypt](#aws-kms-encrypt) call, if an AWS region can be extracted from the [Key ID](#key-ids), then the
228
+
For each [AWS KMS Encrypt](#aws-kms-encrypt) call, if an AWS region can be extracted from the [key name](#key-names), then the
231
229
[AWS KMS client](#aws-kms-client) that calls [AWS KMS Encrypt](#aws-kms-encrypt) MUST be the client returned by the
232
230
[client supplier](#client-supplier) when given that region as input.
233
-
If an AWS region cannot be extracted from the Key ID then the AWS KMS Keyring MUST input a value denoting an unknown region.
231
+
If an AWS region cannot be extracted from the key name then the AWS KMS Keyring MUST input a value denoting an unknown region.
234
232
If the [client supplier](#client-supplier) does not provide any client
235
233
for the given region for this [AWS KMS Encrypt](#aws-kms-encrypt) call,
236
234
OnEncrypt MUST NOT modify the [encryption materials](structures.md#encryption-materials)
@@ -277,7 +275,7 @@ in the input encrypted data key list with the following conditions, until it suc
277
275
278
276
- the [key provider ID](structures.md#key-provider-id) field has the value "aws-kms"
279
277
- the [key provider info](structures.md#key-provider-information) has a value equal to one of the
280
-
ARNs in this keyring's [key IDs](#key-ids) or the [generator](#generator).
278
+
ARNs in this keyring's [key names](#key-names) or the [generator](#generator).
281
279
282
280
To attempt to decrypt a particular [encrypted data key](structures.md#encrypted-data-key),
283
281
OnDecrypt MUST call [AWS KMS Decrypt](#aws-kms-decrypt).
@@ -321,7 +319,7 @@ then OnDecrypt MUST output the unmodified input [decryption materials](structure
321
319
322
320
### OnEncrypt Goal
323
321
324
-
When a user configures an AWS KMS keyring with key IDs
322
+
When a user configures an AWS KMS keyring with key names
325
323
and uses that keyring to encrypt a message,
326
324
they are stating their intent that they need each one of those CMKs to be able to
327
325
independently decrypt the resulting encrypted message.
@@ -345,12 +343,12 @@ one from CMK A, one from CMK B, and one from CMK C.
345
343
346
344
When a user configures an AWS KMS keyring for use on decrypt,
347
345
they are stating their intent for which CMKs
348
-
the keyring will _attempt_ to use to decrypt encrypted data keys.
346
+
the keyring _attempts_ to use to decrypt encrypted data keys.
349
347
350
348
For example, if a user configures an AWS KMS keyring with CMK C (using the CMK ARN)
351
349
and uses it to decrypt an encrypted message
352
350
that contains encrypted data keys for CMKs A, B, and C,
353
-
then the keyring will attempt to decrypt using CMK C.
351
+
then the keyring attempts to decrypt using CMK C.
354
352
355
353
However, if the keyring attempts to decrypt using CMK C and cannot,
356
354
this failure still honors the configured intent and MUST NOT halt decryption.
@@ -377,7 +375,7 @@ If the keyring cannot satisfy those requirements it MUST NOT halt message decryp
377
375
No keyring can know if it is the last keyring to attempt decryption.
378
376
If all keyrings are exhausted and none of them were able to decrypt an encrypted data key
379
377
then the cryptographic materials manager that managed those keyrings
380
-
will halt message decryption.
378
+
halts message decryption.
381
379
(See [Default Cryptographic Materials Manager](./default-cmm.md))
0 commit comments