Skip to content

Commit df31a1d

Browse files
author
Lucas McDonald
committed
m
1 parent c290b04 commit df31a1d

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

TestVectors/dafny/DDBEncryption/src/CreateWrappedItemEncryptor.dfy

+23-23
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,30 @@ module {:extern} CreateWrappedItemEncryptor {
3030
// config.legacyOverride.value.encryptor.Modifies
3131
// else {}
3232
ensures output.Success? ==>
33-
&& output.value is DynamoDbItemEncryptor.DynamoDbItemEncryptorClient
34-
&& fresh(output.value)
35-
&& fresh(output.value.History)
36-
&& output.value.ValidState()
37-
&& var rconfig := (output.value as DynamoDbItemEncryptor.DynamoDbItemEncryptorClient).config;
38-
&& fresh(output.value.Modifies)
39-
&& rconfig.logicalTableName == config.logicalTableName
40-
&& rconfig.partitionKeyName == config.partitionKeyName
41-
&& rconfig.sortKeyName == config.sortKeyName
42-
&& rconfig.attributeActionsOnEncrypt == config.attributeActionsOnEncrypt
43-
&& rconfig.allowedUnsignedAttributes == config.allowedUnsignedAttributes
44-
&& rconfig.allowedUnsignedAttributePrefix == config.allowedUnsignedAttributePrefix
45-
&& rconfig.algorithmSuiteId == config.algorithmSuiteId
33+
&& output.value is DynamoDbItemEncryptor.DynamoDbItemEncryptorClient
34+
&& fresh(output.value)
35+
&& fresh(output.value.History)
36+
&& output.value.ValidState()
37+
&& var rconfig := (output.value as DynamoDbItemEncryptor.DynamoDbItemEncryptorClient).config;
38+
&& fresh(output.value.Modifies)
39+
&& rconfig.logicalTableName == config.logicalTableName
40+
&& rconfig.partitionKeyName == config.partitionKeyName
41+
&& rconfig.sortKeyName == config.sortKeyName
42+
&& rconfig.attributeActionsOnEncrypt == config.attributeActionsOnEncrypt
43+
&& rconfig.allowedUnsignedAttributes == config.allowedUnsignedAttributes
44+
&& rconfig.allowedUnsignedAttributePrefix == config.allowedUnsignedAttributePrefix
45+
&& rconfig.algorithmSuiteId == config.algorithmSuiteId
4646

47-
//= specification/dynamodb-encryption-client/ddb-table-encryption-config.md#attribute-actions
48-
//= type=implication
49-
//# The [Key Action](#key-action)
50-
//# MUST be configured to the partition attribute and, if present, sort attribute.
51-
&& rconfig.version == Operations.VersionFromActions(config.attributeActionsOnEncrypt)
52-
&& config.partitionKeyName in config.attributeActionsOnEncrypt
53-
&& config.attributeActionsOnEncrypt[config.partitionKeyName] == Operations.KeyActionFromVersion(rconfig.version)
54-
&& (config.sortKeyName.Some? ==>
55-
&& config.sortKeyName.value in config.attributeActionsOnEncrypt
56-
&& config.attributeActionsOnEncrypt[config.sortKeyName.value] == Operations.KeyActionFromVersion(rconfig.version))
47+
//= specification/dynamodb-encryption-client/ddb-table-encryption-config.md#attribute-actions
48+
//= type=implication
49+
//# The [Key Action](#key-action)
50+
//# MUST be configured to the partition attribute and, if present, sort attribute.
51+
&& rconfig.version == Operations.VersionFromActions(config.attributeActionsOnEncrypt)
52+
&& config.partitionKeyName in config.attributeActionsOnEncrypt
53+
&& config.attributeActionsOnEncrypt[config.partitionKeyName] == Operations.KeyActionFromVersion(rconfig.version)
54+
&& (config.sortKeyName.Some? ==>
55+
&& config.sortKeyName.value in config.attributeActionsOnEncrypt
56+
&& config.attributeActionsOnEncrypt[config.sortKeyName.value] == Operations.KeyActionFromVersion(rconfig.version))
5757

5858
//= specification/dynamodb-encryption-client/ddb-table-encryption-config.md#plaintext-policy
5959
//# If not specified, encryption and decryption MUST behave according to `FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ`.

0 commit comments

Comments
 (0)