@@ -119,7 +119,23 @@ module SearchConfigToInfo {
119119 && config. multi. keyFieldName in outer. attributeActionsOnEncrypt
120120 && outer. attributeActionsOnEncrypt[config. multi. keyFieldName] == SE. ENCRYPT_AND_SIGN
121121 ==> output. Failure?
122+ // Not in Spec, but for now, SE does not support the Shared Cache Type
123+ ensures
124+ && config. multi?
125+ && config. multi. cache. Some?
126+ && config. multi. cache. value. Shared?
127+ ==>
128+ && output. Failure?
129+ // If the failure was NOT caused by booting up the MPL
130+ && ! output. error. AwsCryptographyMaterialProviders?
131+ ==>
132+ && output. error. DynamoDbEncryptionException?
133+ && output. error. message == "Searchable Encryption does not support the Shared Cache type at this time. "
122134 {
135+ // TODO-FutureCleanUp : https://github.com/aws/aws-database-encryption-sdk-dynamodb/issues/1510
136+ // It is not-good that the MPL is initialized here;
137+ // The MPL has a config object that could hold customer intent that affects behavior.
138+ // Today, it does not. But tomorrow?
123139 var mplR := MaterialProviders. MaterialProviders ();
124140 var mpl :- mplR. MapFailure (e => AwsCryptographyMaterialProviders(e));
125141
@@ -139,7 +155,8 @@ module SearchConfigToInfo {
139155
140156 var cache;
141157 if cacheType. Shared? {
142- cache := cacheType. Shared;
158+ return Failure (DynamoDbEncryptionException(message:="Searchable Encryption does not support the Shared Cache type at this time."));
159+ // cache := cacheType.Shared;
143160 } else {
144161 // = specification/searchable-encryption/search-config.md#key-store-cache
145162 // # For a Beacon Key Source a [CMC](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md)
0 commit comments