Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
fix(caching): revert to the original namespacing from the PR for the …
Browse files Browse the repository at this point in the history
…datakey caching so that caching features are controled individually (#206)
  • Loading branch information
fieldju authored Sep 25, 2019
1 parent 2bd227e commit 6399543
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
# limitations under the License.
#

version=3.32.0
version=3.32.1
groupId=com.nike.cerberus
artifactId=cms
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public StaticAssetManager dashboardStaticAssetManager() {
@Singleton
@Named("encryptCryptoMaterialsManager")
public CryptoMaterialsManager encryptCryptoMaterialsManager(@Named("cms.encryption.cmk.arns") String cmkArns,
@Named("cms.cache.enabled") boolean cacheEnabled,
@Named("cms.encryption.cache.enabled") boolean cacheEnabled,
KmsDataKeyCachingOptionalPropertyHolder kmsDataKeyCachingOptionalPropertyHolder,
Region currentRegion) {
MasterKeyProvider<KmsMasterKey> keyProvider = initializeKeyProvider(cmkArns, currentRegion);
Expand Down Expand Up @@ -332,7 +332,7 @@ public CryptoMaterialsManager encryptCryptoMaterialsManager(@Named("cms.encrypti
@Singleton
@Named("decryptCryptoMaterialsManager")
public CryptoMaterialsManager decryptCryptoMaterialsManager(@Named("cms.encryption.cmk.arns") String cmkArns,
@Named("cms.cache.enabled") boolean cacheEnabled,
@Named("cms.encryption.cache.enabled") boolean cacheEnabled,
KmsDataKeyCachingOptionalPropertyHolder kmsDataKeyCachingOptionalPropertyHolder,
Region currentRegion) {
MasterKeyProvider<KmsMasterKey> keyProvider = initializeKeyProvider(cmkArns, currentRegion);
Expand Down Expand Up @@ -377,23 +377,23 @@ public Region currentRegion() {
*/
static class KmsDataKeyCachingOptionalPropertyHolder {
@Inject(optional=true)
@com.google.inject.name.Named("cms.cache.encryption.encrypt.maxSize")
@com.google.inject.name.Named("cms.encryption.cache.encrypt.maxSize")
int encryptMaxSize = 0;

@Inject(optional=true)
@com.google.inject.name.Named("cms.cache.encryption.encrypt.maxAge")
@com.google.inject.name.Named("cms.encryption.cache.encrypt.maxAge")
int encryptMaxAge = 0;

@Inject(optional=true)
@com.google.inject.name.Named("cms.cache.encryption.encrypt.messageUseLimit")
@com.google.inject.name.Named("cms.encryption.cache.encrypt.messageUseLimit")
int encryptMessageUseLimit = 0;

@Inject(optional=true)
@com.google.inject.name.Named("cms.cache.encryption.decrypt.maxSize")
@com.google.inject.name.Named("cms.encryption.cache.decrypt.maxSize")
int decryptMaxSize = 0;

@Inject(optional=true)
@com.google.inject.name.Named("cms.cache.encryption.decrypt.maxAge")
@com.google.inject.name.Named("cms.encryption.cache.decrypt.maxAge")
int decryptMaxAge = 0;
}
}
2 changes: 1 addition & 1 deletion src/main/resources/cms.conf
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,4 @@ cms.iam.token.ttl=1h
# When false, if an SDB grants access to AD group 'Lst-foo', then users in group 'Lst-Foo' will have access
cms.user.groups.caseSensitive=true

cms.cache.enabled=false
cms.encryption.cache.enabled=false

0 comments on commit 6399543

Please sign in to comment.