Skip to content

Commit 90ac3d7

Browse files
committed
docs(EnhancedClient): Document Scan for Ignored Tags
This addresses feedback to PR #248. Links: - #248 (comment) - #248 (comment)
1 parent 160ac9a commit 90ac3d7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

DynamoDbEncryption/runtimes/java/src/main/java/software/amazon/cryptography/dbencryptionsdk/dynamodb/enhancedclient/DynamoDbEnhancedClientEncryption.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ private static DynamoDbTableEncryptionConfig getTableConfig(DynamoDbEnhancedTabl
8686
actions.put(attributeName, CryptoAction.ENCRYPT_AND_SIGN);
8787
}
8888

89+
// Detect Encryption Flags that are Ignored b/c they are in a Nested Class
8990
scanForIgnoredEncryptionTagsShallow(configWithSchema, attributeName);
9091
}
9192

@@ -128,7 +129,14 @@ private static DynamoDbTableEncryptionConfig getTableConfig(DynamoDbEnhancedTabl
128129
* DynamoDB Encryption Tags in Nested Classes are IGNORED by the
129130
* Database Encryption SDK for DynamoDB.<p>
130131
* As such, Detection of a nested DynamoDB Encryption Tag on a Nested Type
131-
* triggers a Runtime Exception that MUST NOT BE ignored.
132+
* triggers a Runtime Exception that MUST NOT BE ignored.<p>
133+
* CAVEAT: Encryption Tags on fields of Nested Classes that are
134+
* Flattened onto the top record are Respected.<p>
135+
* The behavior of Flatten pushes the Attributes onto the top level record,
136+
* making the "flattened sub-fields" equivalent to any other DynamoDB Attribute.<p>
137+
* However, there still exists a possibility for IGNORED Encryption Tags,
138+
* as any Encryption Tag on the field that will be "flattened" is ignored.<p>
139+
* This method DOES NOT detect these "ignored-by-flattened" tags.
132140
*/
133141
private static void scanForIgnoredEncryptionTagsShallow(
134142
final DynamoDbEnhancedTableEncryptionConfig configWithSchema,

0 commit comments

Comments
 (0)