Skip to content

Commit

Permalink
fix(shared-cache): block shared cache for beacons
Browse files Browse the repository at this point in the history
  • Loading branch information
RitvikKapila committed Dec 16, 2024
1 parent 7b45929 commit 237e4b9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ module SearchConfigToInfo {
&& config.multi.keyFieldName in outer.attributeActionsOnEncrypt
&& outer.attributeActionsOnEncrypt[config.multi.keyFieldName] == SE.ENCRYPT_AND_SIGN
==> output.Failure?
ensures
&& config.multi?
&& config.multi.cache.Some?
&& config.multi.cache.value.Shared?
==> output.Failure?

{
var mplR := MaterialProviders.MaterialProviders();
var mpl :- mplR.MapFailure(e => AwsCryptographyMaterialProviders(e));
Expand All @@ -139,7 +145,7 @@ module SearchConfigToInfo {

var cache;
if cacheType.Shared? {
cache := cacheType.Shared;
return Failure(E("Scan Beacons and Searchable Encryption do NOT support Shared caches."));
} else {
//= specification/searchable-encryption/search-config.md#key-store-cache
//# For a Beacon Key Source a [CMC](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md)
Expand Down

0 comments on commit 237e4b9

Please sign in to comment.