@@ -130,9 +130,9 @@ module BeaconTestFixtures {
130130 var keyStoreConfig := KTypes. KeyStoreConfig (
131131 id := None,
132132 kmsConfiguration := kmsConfig,
133- logicalKeyStoreName := "foo ",
133+ logicalKeyStoreName := "KeyStoreDdbTable ",
134134 grantTokens := None,
135- ddbTableName := "foo ",
135+ ddbTableName := "KeyStoreDdbTable ",
136136 ddbClient := Some(ddbClient),
137137 kmsClient := Some (kmsClient)
138138 );
@@ -177,6 +177,24 @@ module BeaconTestFixtures {
177177 );
178178 }
179179
180+ method GetLotsaBeaconsMulti () returns (output : BeaconVersion)
181+ ensures output. keyStore. ValidState ()
182+ ensures fresh (output. keyStore. Modifies)
183+ ensures output. version == 1
184+ {
185+ var store := GetKeyStore ();
186+ return BeaconVersion (
187+ version := 1,
188+ keyStore := store,
189+ keySource := multi(MultiKeyStore(keyFieldName := "TheKeyField", cacheTTL := 42)),
190+ standardBeacons := [std2, std4, std6, NameTitleBeacon, NameB, TitleB],
191+ compoundBeacons := Some ([NameTitle, YearName, Mixed, JustSigned]),
192+ virtualFields := Some ([NameTitleField]),
193+ encryptedParts := None,
194+ signedParts := None
195+ );
196+ }
197+
180198 const EmptyTableConfig := DynamoDbTableEncryptionConfig (
181199 logicalTableName := "Foo",
182200 partitionKeyName := "foo",
@@ -200,7 +218,8 @@ module BeaconTestFixtures {
200218 "Title" := SE. ENCRYPT_AND_SIGN,
201219 "TooBad" := SE. ENCRYPT_AND_SIGN,
202220 "Year" := SE. SIGN_ONLY,
203- "Date" := SE. SIGN_ONLY
221+ "Date" := SE. SIGN_ONLY,
222+ "TheKeyField" := SE. SIGN_ONLY
204223 ]
205224 )
206225
@@ -223,6 +242,21 @@ module BeaconTestFixtures {
223242 return SI. KeySource (client, version.keyStore, SI.LiteralLoc(keys), cache, 0);
224243 }
225244
245+ method GetMultiSource (keyName : string , version : BeaconVersion ) returns (output : SI. KeySource)
246+ requires version. keyStore. ValidState ()
247+ ensures output. ValidState ()
248+ ensures version. keyStore == output. store
249+ ensures fresh (output. client. Modifies)
250+ {
251+ var client :- expect Primitives. AtomicPrimitives ();
252+ var mpl :- expect MaterialProviders. MaterialProviders ();
253+ var input := MPT. CreateCryptographicMaterialsCacheInput (
254+ cache := MPT.Default(Default := MPT.DefaultCache(entryCapacity := 3))
255+ );
256+ var cache :- expect mpl. CreateCryptographicMaterialsCache (input);
257+ return SI. KeySource (client, version.keyStore, SI.MultiLoc(keyName, false), cache, 0);
258+ }
259+
226260 const SimpleItem : DDB. AttributeMap := map [
227261 "std2" := Std2String,
228262 "std4" := Std4String,
0 commit comments