Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(SearchableEncryption): disable shared cached #1507

Merged
merged 5 commits into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,23 @@ module SearchConfigToInfo {
&& config.multi.keyFieldName in outer.attributeActionsOnEncrypt
&& outer.attributeActionsOnEncrypt[config.multi.keyFieldName] == SE.ENCRYPT_AND_SIGN
==> output.Failure?
// Not in Spec, but for now, SE does not support the Shared Cache Type
ensures
&& config.multi?
&& config.multi.cache.Some?
&& config.multi.cache.value.Shared?
==>
&& output.Failure?
// If the failure was NOT caused by booting up the MPL
&& !output.error.AwsCryptographyMaterialProviders?
==>
&& output.error.DynamoDbEncryptionException?
&& output.error.message == "Searchable Encryption does not support the Shared Cache type at this time."
{
// TODO-FutureCleanUp : https://github.com/aws/aws-database-encryption-sdk-dynamodb/issues/1510
// It is not-good that the MPL is initialized here;
// The MPL has a config object that could hold customer intent that affects behavior.
// Today, it does not. But tomorrow?
var mplR := MaterialProviders.MaterialProviders();
var mpl :- mplR.MapFailure(e => AwsCryptographyMaterialProviders(e));

Expand All @@ -139,7 +155,8 @@ module SearchConfigToInfo {

var cache;
if cacheType.Shared? {
cache := cacheType.Shared;
return Failure(DynamoDbEncryptionException(message:="Searchable Encryption does not support the Shared Cache type at this time."));
// cache := cacheType.Shared;
} 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
Loading