KazydubB commented on a change in pull request #1419: DRILL-6662: Access AWS 
access key ID and secret access key using Cred…
URL: https://github.com/apache/drill/pull/1419#discussion_r210559211
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemPlugin.java
 ##########
 @@ -104,6 +109,33 @@ public FileSystemPlugin(FileSystemConfig config, 
DrillbitContext context, String
     }
   }
 
+  private boolean isS3Connection(Configuration conf) {
+    URI uri = FileSystem.getDefaultUri(conf);
+    return uri.getScheme().equals("s3a");
+  }
+
+  /**
+   * Retrieve secret and access keys from configured (with
+   * {@link 
org.apache.hadoop.security.alias.CredentialProviderFactory#CREDENTIAL_PROVIDER_PATH}
 property)
+   * credential providers and set it into {@code conf}. If provider path is 
not configured or credential
+   * is absent in providers, it will conditionally fallback to configuration 
setting. The fallback will occur unless
+   * {@link 
org.apache.hadoop.security.alias.CredentialProvider#CLEAR_TEXT_FALLBACK} is set 
to {@code false}.
+   *
+   * @param conf {@code Configuration} which will be updated with credentials 
from provider
+   * @throws IOException thrown if a credential cannot be retrieved from 
provider
+   */
+  private void handleS3Credentials(Configuration conf) throws IOException {
+    String[] credentialKeys = {"fs.s3a.secret.key", "fs.s3a.access.key"};
 
 Review comment:
   I am aware of the Constants, but artifact (hadoop-aws), containing this 
class is not among the module's dependencies (however it is present in 
distribution's (compile-scope) and drill-root's (test-scope) dependencies). Is 
there a need to add the dependency?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to