smolnar82 commented on a change in pull request #213: KNOX-2136 - Caching 
credentials in DefaultKeystoreService when an alias is being added (instead of 
the first time someone fetches) and using a different cache implementation
URL: https://github.com/apache/knox/pull/213#discussion_r357216914
 
 

 ##########
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultKeystoreService.java
 ##########
 @@ -333,6 +336,7 @@ public void removeCredentialForCluster(String clusterName, 
String alias) throws
 
         final Path keyStoreFilePath = keyStoreDirPath.resolve(clusterName + 
CREDENTIALS_SUFFIX);
         writeKeyStoreToFile(ks, keyStoreFilePath, 
masterService.getMasterSecret());
+        removeFromCache(clusterName, alias);
 
 Review comment:
   Why? Should not we only remove it from cache only when it was removed from 
the keystore successfully?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to