Skip to content

Commit cd1ebb4

Browse files
Improve explanation of issues when not using CLOBBER in AttributeEncryptor
1 parent c1f74d0 commit cd1ebb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/AttributeEncryptor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ public Map<String, AttributeValue> transform(final Parameters<?> parameters) {
7272
return attributeValues;
7373
}
7474

75+
// When AttributeEncryptor is used without SaveBehavior.CLOBBER, it is trying to transform only a subset
76+
// of the actual fields stored in DynamoDB. This means that the generated signature will not cover any
77+
// unmodified fields. Thus, upon untransform, the signature verification will fail as it won't cover all
78+
// expected fields.
7579
if (parameters.isPartialUpdate()) {
7680
LOG.error("Use of AttributeEncryptor without SaveBehavior.CLOBBER is an error and can result in data-corruption. " +
7781
"This occured while trying to save " + parameters.getModelClass());

0 commit comments

Comments
 (0)