You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DynamoDbEncryption/dafny/DynamoDbEncryption/Model/DynamoDbEncryption.smithy
+1-1
Original file line number
Diff line number
Diff line change
@@ -719,7 +719,7 @@ structure SingleKeyStore {
719
719
@required
720
720
@javadoc("How long (in seconds) the beacon key material is cached locally before it is re-retrieved from DynamoDB and re-authed with AWS KMS.")
721
721
cacheTTL: Integer,
722
-
@documentation("Provide the Shared Cache for Searchable Encryption.")
722
+
@documentation("Which type of local cache to use. Please see the [spec](https://github.com/aws/aws-database-encryption-sdk-dynamodb/blob/main/specification/searchable-encryption/search-config.md#key-store-cache) on how to provide a cache for a SingleKeyStore.")
723
723
cache : CacheType,
724
724
@documentation("Partition ID to distinguish Beacon Key Sources writing to a Shared cache. If the Partition ID is the same for two Beacon Key Sources, they can share the same cache entries in the Shared cache.")
//# For a Beacon Key Source a [CMC](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md)
150
152
//# MUST be created.
151
-
//# For a [Single Key Store](#single-key-store-initialization), either the customer provides a cache, or we create a cache that MUST have [Entry Capacity](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md#entry-capacity)
152
-
//# equal to 1.
153
-
//# For a [Multi Key Store](#multi-key-store-initialization), either the customer provides a cache, or we create a cache that MUST have [Entry Capacity](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md#entry-capacity)
153
+
//# For a [Single Key Store](#single-key-store-initialization), either the user provides a cache, or we create a cache that MUST have [Entry Capacity](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md#entry-capacity)
154
+
//# equal to 1. If the user provides a cache which is not `Shared`, they SHOULD set the [Entry Capacity](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md#entry-capacity)
155
+
//# of the provided `CacheType` to 1, because the [Single Key Store](#single-key-store-initialization) only ever caches one entry. Even if the user provides an entryCapacity > 1, the [Single Key Store](#single-key-store-initialization) will only cache one entry.
156
+
//# For a [Multi Key Store](#multi-key-store-initialization), either the user provides a cache, or we create a cache that MUST have [Entry Capacity](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md#entry-capacity)
:-Need(keyId.DontUseKeyId?, E("KeyID should not be supplied with a SingleKeyStore"));
178
176
var now := Time.GetCurrent();
179
-
var theMap :-getKeysCache(client, stdNames, keyLoc.keyId, cacheTTL as MP.PositiveLong, partitionIdBytes, logicalKeyStoreNameBytes, now as MP.PositiveLong);
177
+
var theMap :-getKeysCache(
178
+
client,
179
+
stdNames,
180
+
keyLoc.keyId,
181
+
cacheTTL as MP.PositiveLong,
182
+
partitionIdBytes,
183
+
logicalKeyStoreNameBytes,
184
+
now as MP.PositiveLong
185
+
);
180
186
returnSuccess(Keys(theMap));
181
187
} elseif keyLoc.LiteralLoc? {
182
188
:-Need(keyId.DontUseKeyId?, E("KeyID should not be supplied with a LiteralKeyStore"));
case DontUseKeyId =>returnFailure(E("KeyID must be supplied with a MultiKeyStore"));
188
194
case ShouldHaveKeyId =>returnSuccess(ShouldHaveKeys);
189
-
caseKeyId(id) =>var now := Time.GetCurrent(); var theMap :-getKeysCache(client, stdNames, id, cacheTTL as MP.PositiveLong, partitionIdBytes, logicalKeyStoreNameBytes, now as MP.PositiveLong); returnSuccess(Keys(theMap));
//# If a [cache entry](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md#cache-entry)
249
269
//# exists, get beacon key MUST return the [entry materials](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md#materials).
Copy file name to clipboardExpand all lines: DynamoDbEncryption/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/dbencryptionsdk/dynamodb/model/SingleKeyStore.java
+4-4
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ public class SingleKeyStore {
22
22
privatefinalIntegercacheTTL;
23
23
24
24
/**
25
-
* Provide the Shared Cache for Searchable Encryption.
25
+
* Which type of local cache to use. Please see the [spec](https://github.com/aws/aws-database-encryption-sdk-dynamodb/blob/main/specification/searchable-encryption/search-config.md#key-store-cache) on how to provide a cache for a SingleKeyStore.
26
26
*/
27
27
privatefinalCacheTypecache;
28
28
@@ -53,7 +53,7 @@ public Integer cacheTTL() {
53
53
}
54
54
55
55
/**
56
-
* @return Provide the Shared Cache for Searchable Encryption.
56
+
* @return Which type of local cache to use. Please see the [spec](https://github.com/aws/aws-database-encryption-sdk-dynamodb/blob/main/specification/searchable-encryption/search-config.md#key-store-cache) on how to provide a cache for a SingleKeyStore.
57
57
*/
58
58
publicCacheTypecache() {
59
59
returnthis.cache;
@@ -96,12 +96,12 @@ public interface Builder {
96
96
IntegercacheTTL();
97
97
98
98
/**
99
-
* @param cache Provide the Shared Cache for Searchable Encryption.
99
+
* @param cache Which type of local cache to use. Please see the [spec](https://github.com/aws/aws-database-encryption-sdk-dynamodb/blob/main/specification/searchable-encryption/search-config.md#key-store-cache) on how to provide a cache for a SingleKeyStore.
100
100
*/
101
101
Buildercache(CacheTypecache);
102
102
103
103
/**
104
-
* @return Provide the Shared Cache for Searchable Encryption.
104
+
* @return Which type of local cache to use. Please see the [spec](https://github.com/aws/aws-database-encryption-sdk-dynamodb/blob/main/specification/searchable-encryption/search-config.md#key-store-cache) on how to provide a cache for a SingleKeyStore.
0 commit comments