Skip to content

Commit 0d4d63c

Browse files
authored
chore: update for mrk support in keystore (#267)
* update for mrk support in keystore
1 parent a10e0d8 commit 0d4d63c

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

framework/branch-key-store.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,21 @@ The table name of the DynamoDb table that backs this Keystore.
8989
A valid [AWS KMS Key ARN](./aws-kms/aws-kms-key-arn.md#a-valid-aws-kms-arn)
9090
that wraps and unwraps keys stored in Amazon DynamoDB.
9191

92+
The KMS Configuration MUST distinguish between single region ARN compatibility and MRK ARN compatibility.
93+
94+
Both compatibility modes are allowed with both mrk ARN's and single region ARNs.
95+
96+
#### AWS Key ARN Compatibility
97+
98+
For two ARNs to be compatible:
99+
100+
If the [AWS KMS Configuration](#aws-kms-configuration) designates single region ARN compatibility,
101+
then two ARNs are compatible if they are exactly equal.
102+
103+
If the [AWS KMS Configuration](#aws-kms-configuration) designates MRK ARN compatibility,
104+
then two ARNs are compatible if they are equal in all parts other than the region.
105+
That is, they are compatible if [AWS KMS MRK Match for Decrypt](aws-kms/aws-kms-mrk-match-for-decrypt.md#implementation) returns true.
106+
92107
### Logical KeyStore Name
93108

94109
This name is cryptographically bound to all data stored in this table,
@@ -206,7 +221,7 @@ The operation MUST call [AWS KMS API GenerateDataKeyWithoutPlaintext](https://do
206221
The call to AWS KMS GenerateDataKeyWithoutPlaintext MUST use the configured AWS KMS client to make the call.
207222
The operation MUST call AWS KMS GenerateDataKeyWithoutPlaintext with a request constructed as follows:
208223

209-
- `KeyId` MUST be the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore
224+
- `KeyId` MUST be [compatible with](#aws-key-arn-compatibility) the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore.
210225
- `NumberOfBytes` MUST be 32.
211226
- `EncryptionContext` MUST be the [encryption context for beacon keys](#beacon-key-encryption-context).
212227
- `GrantTokens` MUST be this keystore's [grant tokens](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token).
@@ -222,7 +237,7 @@ The operation MUST call [AWS KMS API GenerateDataKeyWithoutPlaintext](https://do
222237
The call to AWS KMS GenerateDataKeyWithoutPlaintext MUST use the configured AWS KMS client to make the call.
223238
The operation MUST call AWS KMS GenerateDataKeyWithoutPlaintext with a request constructed as follows:
224239

225-
- `KeyId` MUST be the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore
240+
- `KeyId` MUST be [compatible with](#aws-key-arn-compatibility) the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore.
226241
- `NumberOfBytes` MUST be 32.
227242
- `EncryptionContext` MUST be the [DECRYPT_ONLY encryption context for branch keys](#decrypt_only-encryption-context).
228243
- GenerateDataKeyWithoutPlaintext `GrantTokens` MUST be this keystore's [grant tokens](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token).
@@ -235,10 +250,10 @@ The operation MUST call [AWS KMS API ReEncrypt](https://docs.aws.amazon.com/kms/
235250
with a request constructed as follows:
236251

237252
- `SourceEncryptionContext` MUST be the [DECRYPT_ONLY encryption context for branch keys](#decrypt_only-encryption-context).
238-
- `SourceKeyId` MUST be the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore
253+
- `SourceKeyId` MUST be [compatible with](#aws-key-arn-compatibility) the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore.
239254
- `CiphertextBlob` MUST be the wrapped DECRYPT_ONLY Branch Key.
240255
- ReEncrypt `GrantTokens` MUST be this keystore's [grant tokens](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token).
241-
- `DestinationKeyId` MUST be the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore
256+
- `DestinationKeyId` MUST be [compatible with](#aws-key-arn-compatibility) the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore.
242257
- `DestinationEncryptionContext` MUST be the [ACTIVE encryption context for branch keys](#active-encryption-context).
243258

244259
If the call to AWS KMS ReEncrypt succeeds,
@@ -361,10 +376,10 @@ The operation MUST call [AWS KMS API ReEncrypt](https://docs.aws.amazon.com/kms/
361376
with a request constructed as follows:
362377

363378
- `SourceEncryptionContext` MUST be the [encryption context](#encryption-context) constructed above
364-
- `SourceKeyId` MUST be the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore
379+
- `SourceKeyId` MUST be [compatible with](#aws-key-arn-compatibility) the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore.
365380
- `CiphertextBlob` MUST be the `enc` attribute value on the AWS DDB response item
366381
- `GrantTokens` MUST be the configured [grant tokens](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token).
367-
- `DestinationKeyId` MUST be the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore
382+
- `DestinationKeyId` MUST be [compatible with](#aws-key-arn-compatibility) the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore.
368383
- `DestinationEncryptionContext` MUST be the [encryption context](#encryption-context) constructed above
369384

370385
### GetActiveBranchKey
@@ -503,7 +518,7 @@ The key `enc` MUST NOT exist in the constructed [encryption context](#encryption
503518
When calling [AWS KMS Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html),
504519
the keystore operation MUST call with a request constructed as follows:
505520

506-
- `KeyId` MUST be the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore
521+
- `KeyId` MUST be [compatible with](#aws-key-arn-compatibility) the configured `AWS KMS Key ARN` in the [AWS KMS Configuration](#aws-kms-configuration) for this keystore.
507522
- `CiphertextBlob` MUST be the `enc` attribute value on the AWS DDB response item
508523
- `EncryptionContext` MUST be the [encryption context](#encryption-context) constructed above
509524
- `GrantTokens` MUST be this keystore's [grant tokens](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token).

0 commit comments

Comments
 (0)