[
https://issues.apache.org/jira/browse/DRILL-7547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17047644#comment-17047644
]
ASF GitHub Bot commented on DRILL-7547:
---------------------------------------
arina-ielchiieva commented on pull request #2001: DRILL-7547: Support
credentials store for mongo connections
URL: https://github.com/apache/drill/pull/2001#discussion_r385707455
##########
File path:
contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoStoragePlugin.java
##########
@@ -34,43 +33,68 @@
import org.apache.drill.exec.store.SchemaConfig;
import org.apache.drill.exec.store.StoragePluginOptimizerRule;
import org.apache.drill.exec.store.mongo.schema.MongoSchemaFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.drill.shaded.guava.com.google.common.cache.Cache;
import org.apache.drill.shaded.guava.com.google.common.cache.CacheBuilder;
import org.apache.drill.shaded.guava.com.google.common.cache.RemovalListener;
import
org.apache.drill.shaded.guava.com.google.common.cache.RemovalNotification;
import org.apache.drill.shaded.guava.com.google.common.collect.ImmutableSet;
import org.apache.drill.shaded.guava.com.google.common.collect.Lists;
-import com.mongodb.MongoClient;
-import com.mongodb.MongoClientURI;
-import com.mongodb.MongoCredential;
-import com.mongodb.ServerAddress;
+import org.apache.hadoop.conf.Configuration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
public class MongoStoragePlugin extends AbstractStoragePlugin {
- static final Logger logger = LoggerFactory
- .getLogger(MongoStoragePlugin.class);
+ static final Logger logger =
LoggerFactory.getLogger(MongoStoragePlugin.class);
Review comment:
```suggestion
private static final Logger logger =
LoggerFactory.getLogger(MongoStoragePlugin.class);
```
----------------------------------------------------------------
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]
> More secure storage for mongodb credentials
> -------------------------------------------
>
> Key: DRILL-7547
> URL: https://issues.apache.org/jira/browse/DRILL-7547
> Project: Apache Drill
> Issue Type: Improvement
> Components: Storage - MongoDB
> Affects Versions: 1.17.0
> Reporter: Dobes Vandermeer
> Priority: Major
>
> Currently you can sort of "hide" S3 AWS credentials in core-site.xml, but for
> the mongodb connection the username and password are accessible from the Web
> UI, API, and ZooKeeper API because it is placed in the configuration for the
> storage plugin.
> I wonder if it would be possible to store the username and password used for
> mongodb connection in a more secure manner, maybe it could be encrypted when
> you first save it, then even if you look at the configuration for the mongodb
> storage plugin via the ZooKeeper API you cannot extract the username and
> password.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)