Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Merge changes from 3.1.2 #583

Closed
wants to merge 22 commits into from
Closed

feat: Merge changes from 3.1.2 #583

wants to merge 22 commits into from

Conversation

ajewellamz
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ajewellamz and others added 16 commits November 7, 2023 14:31
#560)

* fix: issue when a DynamoDB Set attribute is marked as SIGN_ONLY in the AWS Database Encryption SDK (DB-ESDK) for DynamoDB.

DB-ESDK for DynamoDB supports SIGN_ONLY and ENCRYPT_AND_SIGN attribute actions. In version 3.1.0 and below, when a Set type is assigned a SIGN_ONLY attribute action, there is a chance that signature validation of the record containing a Set will fail on read, even if the Set attributes contain the same values. The probability of a failure depends on the order of the elements in the Set combined with how DynamoDB returns this data, which is undefined.

This update addresses the issue by ensuring that any Set values are canonicalized in the same order while written to DynamoDB as when read back from DynamoDB.

See: https://github.com/aws/aws-database-encryption-sdk-dynamodb-java/DecryptWithPermute/README.md for additional details
* feat: add ResolveAttribute
* feat: implement beacon styles
* feat: dont use internal, because it is reserved in dotnet
* feat: repair dependencies in item encryptor et al
* feat: Global Parts List
* add BeaconStylesSearchableEncryptionExample.java
* feat: repair dotnet build, enable net ci
* chore: update MPL submodule, bouncycastle, Dafny 4.2
* feat: change twinned beacons to shared beacons
@ajewellamz ajewellamz requested a review from a team as a code owner November 14, 2023 19:15
Comment on lines -210 to +212
basket.add("strawberry");
basket.add("blueberry");
basket.add("blackberry");
basket.add("blueberry");
basket.add("strawberry");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this change made?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we changed how things are stored.
Before, encrypted sets maintained their original order.
Now, encrypted sets come back sorted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the order shouldn't semantically matter. If we get a failure in our example when the input set isn't in order, then we are doing something wrong in our example.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that we check equality on L265. It is annoying that the string set attribute type's equality isn't overridden such that order doesn't matter... This is fine as is, as I think it would be too confusing in this example to explain a more complex way to check equality, when that is not the focus of the example.

README.md Outdated
@@ -59,7 +59,7 @@ To use the DB-ESDK for DynamoDB in Java, you must have:
* **Via Gradle Kotlin**
In a Gradle Java Project, add the following to the _dependencies_ section:
```kotlin
implementation("software.amazon.cryptography:aws-database-encryption-sdk-dynamodb:3.1.0")
implementation("software.amazon.cryptography:aws-database-encryption-sdk-dynamodb:3.1.1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
implementation("software.amazon.cryptography:aws-database-encryption-sdk-dynamodb:3.1.1")
implementation("software.amazon.cryptography:aws-database-encryption-sdk-dynamodb:3.1.2")

README.md Outdated
@@ -92,7 +92,7 @@ To use the DB-ESDK for DynamoDB in Java, you must have:
<dependency>
<groupId>software.amazon.cryptography</groupId>
<artifactId>aws-database-encryption-sdk-dynamodb</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<version>3.1.1</version>
<version>3.1.2</version>

@@ -1,4 +1,4 @@
projectJavaVersion=3.1.0
Copy link
Contributor

@lavaleri lavaleri Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update this as well.
(ideally we'd have the README pull from this file, but that doesn't need to block these changes)

Copy link
Contributor

@lavaleri lavaleri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@josecorella
Copy link
Contributor

closing in favor of #588

@ajewellamz ajewellamz deleted the backport-31x branch January 17, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants