Skip to content

Commit 0345d95

Browse files
committed
address feddback
1 parent 3d7c233 commit 0345d95

File tree

3 files changed

+15
-132
lines changed

3 files changed

+15
-132
lines changed

Examples/runtimes/java/DynamoDbEncryption/src/main/java/software/amazon/cryptography/examples/keyring/KmsEcdhKeyringExample.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,8 @@ public static void KmsEcdhKeyringGetItemPutItem(
178178
}
179179

180180
/*
181-
This example takes in the recipient's KMS ECC key ARN,
182-
and the algorithm definition where the ECC keys lie.
183-
The eccRecipientKeyArn parameter takes in the sender's KMS ECC key ARN
181+
This example takes in the recipient's KMS ECC key ARN via
182+
the eccRecipientKeyArn parameter.
184183
185184
This example attempts to decrypt a test item using the provided eccRecipientKeyArn,
186185
it does so by checking if the message header contains the recipient's public key.
@@ -581,6 +580,8 @@ public static void main(final String[] args) {
581580
eccPublicKeyRecipientFilename = EXAMPLE_ECC_PUBLIC_KEY_RECIPIENT_FILENAME;
582581
}
583582
if (args.length == 5) {
583+
eccPublicKeySenderFilename = args[2];
584+
eccPublicKeyRecipientFilename = args[3];
584585
eccRecipientKeyArn = args[4];
585586
} else {
586587
eccRecipientKeyArn = null;

Examples/runtimes/java/DynamoDbEncryption/src/main/java/software/amazon/cryptography/examples/keyring/RawEcdhKeyringExample.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public static void RawEcdhKeyringGetItemPutItem(
195195

196196
/*
197197
This example takes in the recipient's public key located at EXAMPLE_ECC_PUBLIC_KEY_FILENAME_RECIPIENT
198-
as a UTF8 PEM-encoded (PKCS #8 PrivateKeyInfo structures), and the Curve Specification where the key lies.
198+
as a UTF8 PEM-encoded X.509 public key, and the Curve Specification where the key lies.
199199
200200
This examples creates a RawECDH keyring with the EphemeralPrivateKeyToStaticPublicKey key agreement scheme.
201201
This configuration will always create a new key pair as the sender key pair for the key agreement operation.
@@ -252,7 +252,7 @@ public static void EphemeralRawEcdhKeyringPutItem(
252252
// This keyring uses an ephemeral configuration. This configuration will always create a new
253253
// key pair as the sender key pair for the key agreement operation. The ephemeral configuration can only
254254
// encrypt data and CANNOT decrypt messages.
255-
// The DynamoDb encryption client uses this to encrypt and decrypt items.
255+
// The DynamoDb encryption client uses this to encrypt items.
256256
final CreateRawEcdhKeyringInput keyringInput = CreateRawEcdhKeyringInput
257257
.builder()
258258
.curveSpec(ecdhCurveSpec)
@@ -283,7 +283,7 @@ public static void EphemeralRawEcdhKeyringPutItem(
283283

284284
/*
285285
This example takes in the recipient's private key located at EXAMPLE_ECC_PRIVATE_KEY_FILENAME_RECIPIENT
286-
as a UTF8 PEM-encoded X.509 public key, also known as SubjectPublicKeyInfo (SPKI),
286+
as a UTF8 PEM-encoded (PKCS #8 PrivateKeyInfo structures) private key,
287287
and the Curve Specification where the key lies.
288288
289289
This examples creates a RawECDH keyring with the PublicKeyDiscovery key agreement scheme.
@@ -319,7 +319,7 @@ public static void DiscoveryRawEcdhKeyringGetItem(
319319
// This keyring uses a discovery configuration. This configuration will check on decrypt
320320
// if it is meant to decrypt the message by checking if the configured public key is stored on the message.
321321
// The discovery configuration can only decrypt messages and CANNOT encrypt messages.
322-
// The DynamoDb encryption client uses this to encrypt and decrypt items.
322+
// The DynamoDb encryption client uses this to decrypt items.
323323
final CreateRawEcdhKeyringInput keyringInput = CreateRawEcdhKeyringInput
324324
.builder()
325325
.curveSpec(ecdhCurveSpec)

cfn/CI.yaml

+7-125
Original file line numberDiff line numberDiff line change
@@ -64,131 +64,13 @@ Resources:
6464
WriteCapacityUnits: "5"
6565
TableName: !Ref TableName
6666

67-
#BasicTestJavaTable:
68-
# Type: AWS::DynamoDB::Table
69-
# Properties:
70-
# AttributeDefinitions:
71-
# - AttributeName: "partition_key"
72-
# AttributeType: "S"
73-
# - AttributeName: "sort_key"
74-
# AttributeType: "N"
75-
# KeySchema:
76-
# - AttributeName: "partition_key"
77-
# KeyType: "HASH"
78-
# - AttributeName: "sort_key"
79-
# KeyType: "RANGE"
80-
# ProvisionedThroughput:
81-
# ReadCapacityUnits: "5"
82-
# WriteCapacityUnits: "5"
83-
# TableName: !Ref BasicTestJavaTableName
84-
85-
#BasicTestDotnetTable:
86-
# Type: AWS::DynamoDB::Table
87-
# Properties:
88-
# AttributeDefinitions:
89-
# - AttributeName: "partition_key"
90-
# AttributeType: "S"
91-
# - AttributeName: "sort_key"
92-
# AttributeType: "N"
93-
# KeySchema:
94-
# - AttributeName: "partition_key"
95-
# KeyType: "HASH"
96-
# - AttributeName: "sort_key"
97-
# KeyType: "RANGE"
98-
# ProvisionedThroughput:
99-
# ReadCapacityUnits: "5"
100-
# WriteCapacityUnits: "5"
101-
# TableName: !Ref BasicTestDotnetTableName
102-
103-
#SearchTestJavaTable:
104-
# Type: AWS::DynamoDB::Table
105-
# Properties:
106-
# AttributeDefinitions:
107-
# - AttributeName: "aws_dbe_b_inspector_id_last4"
108-
# AttributeType: "S"
109-
# - AttributeName: "aws_dbe_b_last4UnitCompound"
110-
# AttributeType: "S"
111-
# - AttributeName: "aws_dbe_b_unit"
112-
# AttributeType: "S"
113-
# - AttributeName: "inspection_date"
114-
# AttributeType: "S"
115-
# - AttributeName: "work_id"
116-
# AttributeType: "S"
117-
# KeySchema:
118-
# - AttributeName: "work_id"
119-
# KeyType: "HASH"
120-
# - AttributeName: "inspection_date"
121-
# KeyType: "RANGE"
122-
# ProvisionedThroughput:
123-
# ReadCapacityUnits: "5"
124-
# WriteCapacityUnits: "5"
125-
# TableName: !Ref SearchTestJavaTableName
126-
# GlobalSecondaryIndexes:
127-
# - IndexName: "last4-unit-index"
128-
# KeySchema:
129-
# - AttributeName: "aws_dbe_b_inspector_id_last4"
130-
# KeyType: "HASH"
131-
# - AttributeName: "aws_dbe_b_unit"
132-
# KeyType: "RANGE"
133-
# Projection:
134-
# ProjectionType: ALL
135-
# ProvisionedThroughput:
136-
# ReadCapacityUnits: "5"
137-
# WriteCapacityUnits: "5"
138-
# - IndexName: "last4UnitCompound-index"
139-
# KeySchema:
140-
# - AttributeName: "aws_dbe_b_last4UnitCompound"
141-
# KeyType: "HASH"
142-
# Projection:
143-
# ProjectionType: ALL
144-
# ProvisionedThroughput:
145-
# ReadCapacityUnits: "5"
146-
# WriteCapacityUnits: "5"
147-
148-
#SearchTestDotnetTable:
149-
# Type: AWS::DynamoDB::Table
150-
# Properties:
151-
# AttributeDefinitions:
152-
# - AttributeName: "aws_dbe_b_inspector_id_last4"
153-
# AttributeType: "S"
154-
# - AttributeName: "aws_dbe_b_last4UnitCompound"
155-
# AttributeType: "S"
156-
# - AttributeName: "aws_dbe_b_unit"
157-
# AttributeType: "S"
158-
# - AttributeName: "inspection_date"
159-
# AttributeType: "S"
160-
# - AttributeName: "work_id"
161-
# AttributeType: "S"
162-
# KeySchema:
163-
# - AttributeName: "work_id"
164-
# KeyType: "HASH"
165-
# - AttributeName: "inspection_date"
166-
# KeyType: "RANGE"
167-
# ProvisionedThroughput:
168-
# ReadCapacityUnits: "5"
169-
# WriteCapacityUnits: "5"
170-
# TableName: !Ref SearchTestDotnetTableName
171-
# GlobalSecondaryIndexes:
172-
# - IndexName: "last4-unit-index"
173-
# KeySchema:
174-
# - AttributeName: "aws_dbe_b_inspector_id_last4"
175-
# KeyType: "HASH"
176-
# - AttributeName: "aws_dbe_b_unit"
177-
# KeyType: "RANGE"
178-
# Projection:
179-
# ProjectionType: ALL
180-
# ProvisionedThroughput:
181-
# ReadCapacityUnits: "5"
182-
# WriteCapacityUnits: "5"
183-
# - IndexName: "last4UnitCompound-index"
184-
# KeySchema:
185-
# - AttributeName: "aws_dbe_b_last4UnitCompound"
186-
# KeyType: "HASH"
187-
# Projection:
188-
# ProjectionType: ALL
189-
# ProvisionedThroughput:
190-
# ReadCapacityUnits: "5"
191-
# WriteCapacityUnits: "5"
67+
# These tables were manually created but not used in CI
68+
# If we have to start using them in CI we just have to add
69+
# them to the policy below.
70+
# BasicTestJavaTable:
71+
# BasicTestDotnetTable:
72+
# SearchTestJavaTable:
73+
# SearchTestDotnetTable:
19274

19375
TestTableWithSimpleBeaconIndex:
19476
Type: AWS::DynamoDB::Table

0 commit comments

Comments
 (0)