mariosmeim-db commented on a change in pull request #3440:
URL: https://github.com/apache/hadoop/pull/3440#discussion_r741845024



##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
##########
@@ -113,13 +119,14 @@ private AbfsClient(final URL baseUrl, final 
SharedKeyCredentials sharedKeyCreden
     this.retryPolicy = abfsClientContext.getExponentialRetryPolicy();
     this.accountName = abfsConfiguration.getAccountName().substring(0, 
abfsConfiguration.getAccountName().indexOf(AbfsHttpConstants.DOT));
     this.authType = abfsConfiguration.getAuthType(accountName);
+    this.encryptionContextProvider = encryptionContextProvider;
 
     String encryptionKey = this.abfsConfiguration
         .getClientProvidedEncryptionKey();
     if (encryptionKey != null) {
-      this.clientProvidedEncryptionKey = getBase64EncodedString(encryptionKey);
-      this.clientProvidedEncryptionKeySHA = getBase64EncodedString(
-          getSHA256Hash(encryptionKey));
+      this.clientProvidedEncryptionKey = 
EncryptionAdapter.getBase64EncodedString(encryptionKey);

Review comment:
       Shouldn't the encryption key passed in the configuration already be base 
64 encoded? This is how it works e.g. for azCopy. Also, the header will 
required base 64 encoded values. Maybe it would be more consistent if the 
configuration for the global key also expected base 64 encoded key.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to