Skip to content

Commit af50d6e

Browse files
authored
docs: Clarify specification (#244)
1 parent 5072e1e commit af50d6e

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

DynamoDbEncryption/dafny/DynamoDbEncryptionTransforms/src/GetItemTransform.dfy

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ module GetItemTransform {
5757

5858
//= specification/dynamodb-encryption-client/ddb-sdk-integration.md#decrypt-after-getitem
5959
//= type=implication
60-
//# The GetItem response's `Item` field MUST be replaced
61-
//# with a value that is equivalent to
62-
//# the resulting item.
60+
//# The GetItem response's `Item` field MUST be
61+
//# replaced by the encrypted DynamoDb Item outputted above.
6362
&& output.value.transformedOutput.Item.Some?
6463
&& (item == output.value.transformedOutput.Item.value)
6564

specification/dynamodb-encryption-client/ddb-sdk-integration.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,8 @@ is the `Item` field in the original response
331331

332332
Beacons MUST be [removed](ddb-support.md#removebeacons) from the result.
333333

334-
The GetItem response's `Item` field MUST be replaced
335-
with a value that is equivalent to
336-
the resulting item.
334+
The GetItem response's `Item` field MUST be
335+
replaced by the encrypted DynamoDb Item outputted above.
337336

338337
### Decrypt after BatchGetItem
339338

specification/dynamodb-encryption-client/ddb-support.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ For any operand in the KeyConditionExpression or FilterExpression which is a bea
154154
the name MUST be replaced by the internal beacon name (i.e. NAME replaced by aws_dbe_b_NAME).
155155

156156
If the name is used directly in the expression, the name MUST be changed in the expression.
157-
For example the expression "MyBeacon < :value" must be changed to "aws_dbe_b_MyBeacon < :value".
157+
For example the expression "MyBeacon = :value" must be changed to "aws_dbe_b_MyBeacon = :value".
158158

159159
If the name is used indirectly through the ExpressionAttributeNames mapping,
160160
the name MUST be changed in the ExpressionAttributeNames. For example if the query is
161-
"#Beacon < :value" and ExpressionAttributeNames holds (#Beacon = MyBeacon),
161+
"#Beacon = :value" and ExpressionAttributeNames holds (#Beacon = MyBeacon),
162162
the query must remain unchanged and ExpressionAttributeNames changed to (#Beacon = aws_dbe_b_MyBeacon).
163163

164164
In this regard, each use of each operand is handled separately.
@@ -171,7 +171,7 @@ MUST be obtained from the [Beacon Key Materials](../searchable-encryption/search
171171
as the key.
172172

173173
For example if the query is
174-
"MyBeacon < :value" and ExpressionAttributeValues holds (:value = banana),
174+
"MyBeacon = :value" and ExpressionAttributeValues holds (:value = banana),
175175
then the ExpressionAttributeValues must be changed to (:value = 13fd),
176176
where "13fd" is the calculated beacon value.
177177

specification/dynamodb-encryption-client/decrypt-item.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ data that was serialized into the header included in the output DynamoDb Item.
135135

136136
### Signature Scope
137137

138+
The Signature Scope is a client-side configuration of what attributes should be
139+
included within signature calculations whenever encrypting or decrypting items.
140+
138141
An Attribute on a DynamoDB Item MUST NOT be considered as within the signature scope
139142
if it's Attribute Name is included in [Unauthenticated Attributes](./ddb-table-encryption-config.md#unauthenticated-attributes)
140143
or if it's Attribute Name begins with the prefix specified in

specification/dynamodb-encryption-client/encrypt-item.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ with the following inputs:
118118
such that the Crypto Action indexed by that attribute name in the Crypto Schema
119119
equals the Crypto Action indexed by that attribute name in the configured Attribute Actions.
120120
- The Crypto Schema MUST NOT contain more Crypto Actions than those specified by the previous point.
121+
E.g. the Crypto Schema must not specify actions for attributes that don't exist on the item.
121122
- If configured, the Algorithm Suite MUST be the
122123
[Algorithm Suite configured on this Item Encryptor](./ddb-table-encryption-config.md#algorithm-suite).
123124
If not configured on the Item Encryptor, Algorithm Suite MUST NOT be specified.

0 commit comments

Comments
 (0)