keith-turner commented on a change in pull request #499: Implement new 
Encryption interface
URL: https://github.com/apache/accumulo/pull/499#discussion_r190603645
 
 

 ##########
 File path: 
core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
 ##########
 @@ -361,21 +326,8 @@ public Writer(FSDataOutputStream fout, RateLimiter 
writeLimiter, String compress
       fsOutputBuffer = new BytesWritable();
       Magic.write(this.out);
 
-      // Set up crypto-related detail, including secret key generation and 
encryption
-
-      this.cryptoModule = 
CryptoModuleFactory.getCryptoModule(accumuloConfiguration);
-      this.cryptoParams = new BCFileCryptoModuleParameters();
-      CryptoModuleFactory.fillParamsObjectFromConfiguration(cryptoParams, 
accumuloConfiguration);
-      this.cryptoParams = (BCFileCryptoModuleParameters) cryptoModule
-          .generateNewRandomSessionKey(cryptoParams);
-
-      this.secretKeyEncryptionStrategy = CryptoModuleFactory
-          .getSecretKeyEncryptionStrategy(accumuloConfiguration);
-      this.cryptoParams = (BCFileCryptoModuleParameters) 
secretKeyEncryptionStrategy
-          .encryptSecretKey(cryptoParams);
-
-      // secretKeyEncryptionStrategy.encryptSecretKey(cryptoParameters);
-
+      this.encryptionStrategy = EncryptionStrategyFactory
+          .setupConfiguredEncryption(accumuloConfiguration, 
EncryptionStrategy.Scope.RFILE);
 
 Review comment:
   I would recommend passing in a `Map<String, String>` containing everything 
that start with `CRYPTO_SENSITIVE_PREFIX` with the prefix stripped off.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to