Closed
Description
Problem:
Hello ESDK team 🙏
- How do we migrate from
CachingCryptoMaterialsManager
toICryptographicMaterialsManager
andICryptographicMaterialsCache
? - How to restrict KeyRings to single keys similar to
KmsMasterKeyProvider.builder().buildStrict(keyARN)
?
Our existing code usage looks similar to below
OurCrypto(String keyID, String region, int cacheCapacity, int cacheMaxAgeMinutes, String accountId, RegionalClientSupplier factory) {
this.encryptionKeyProvider = KmsMasterKeyProvider
.builder()
.customRegionalClientSupplier(factory)
.defaultRegion(Region.of(region))
.buildStrict(keyID);
var decryptionKeyProvider = KmsMasterKeyProvider
.builder()
.customRegionalClientSupplier(factory)
.defaultRegion(Region.of(region))
.buildDiscovery(new DiscoveryFilter(PARTITION, List.of(accountId)));
this.manager = CachingCryptoMaterialsManager.newBuilder()
.withMasterKeyProvider(decryptionKeyProvider)
.withCache(new LocalCryptoMaterialsCache(cacheCapacity))
.withMaxAge(cacheMaxAgeMinutes, TimeUnit.MINUTES)
.build();
}
Metadata
Metadata
Assignees
Labels
No labels