You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/01/17 17:22:46 UTC

[GitHub] ctubbsii commented on a change in pull request #345: ACCUMULO-4769 Sanity check for valid CryptoModule and KeyEncryptionStrategy in config

ctubbsii commented on a change in pull request #345: ACCUMULO-4769 Sanity check for valid CryptoModule and KeyEncryptionStrategy in config
URL: https://github.com/apache/accumulo/pull/345#discussion_r162120342
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/conf/ConfigSanityCheck.java
 ##########
 @@ -88,6 +90,31 @@ else if (!prop.getType().isValidFormat(value))
       if (key.equals(Property.CRYPTO_CIPHER_KEY_ALGORITHM_NAME.getKey())) {
         keyAlgorithm = Objects.requireNonNull(value);
       }
+      if (key.equals(Property.CRYPTO_SECRET_KEY_ENCRYPTION_STRATEGY_CLASS.getKey()) && !(value == null || value.equals("NullSecretKeyEncryptionStrategy"))) {
+        Class<?> strat = null;
+        try {
+          strat = Class.forName(value);
 
 Review comment:
   We have a "ConfigurationTypeHelper" class with utility methods for loading classes from config properties. Should use that, if possible.

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


With regards,
Apache Git Services