Skip to content

Commit 315c509

Browse files
auto commit
1 parent 25df5b3 commit 315c509

File tree

1 file changed

+6
-4
lines changed
  • Examples/runtimes/net/src/migration/PlaintextToAWSDBE/awsdbe

1 file changed

+6
-4
lines changed

Examples/runtimes/net/src/migration/PlaintextToAWSDBE/awsdbe/Common.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ public static Dictionary<string, DynamoDbTableEncryptionConfig> CreateTableConfi
2323
// - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature
2424
// - SIGN_ONLY: The attribute not encrypted, but is still included in the signature
2525
// - DO_NOTHING: The attribute is not encrypted and not included in the signature
26+
var partitionKeyName = "partition_key";
27+
var sortKeyName = "sort_key";
2628
var attributeActionsOnEncrypt = new Dictionary<string, CryptoAction>
2729
{
28-
["partition_key"] = CryptoAction.SIGN_ONLY,
29-
["sort_key"] = CryptoAction.SIGN_ONLY,
30+
[partitionKeyName] = CryptoAction.SIGN_ONLY,
31+
[sortKeyName] = CryptoAction.SIGN_ONLY,
3032
["attribute1"] = CryptoAction.ENCRYPT_AND_SIGN,
3133
["attribute2"] = CryptoAction.SIGN_ONLY,
3234
["attribute3"] = CryptoAction.DO_NOTHING
@@ -65,8 +67,8 @@ public static Dictionary<string, DynamoDbTableEncryptionConfig> CreateTableConfi
6567
var tableConfig = new DynamoDbTableEncryptionConfig
6668
{
6769
LogicalTableName = ddbTableName,
68-
PartitionKeyName = "partition_key",
69-
SortKeyName = "sort_key",
70+
PartitionKeyName = partitionKeyName,
71+
SortKeyName = sortKeyName,
7072
AttributeActionsOnEncrypt = attributeActionsOnEncrypt,
7173
Keyring = kmsKeyring,
7274
AllowedUnsignedAttributes = unsignedAttributes,

0 commit comments

Comments
 (0)