atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svimal2...@apache.org
Subject incubator-atlas git commit: Credential Provider utility does not work with fully qualified local/HDFS jceks path
Date Mon, 12 Dec 2016 07:08:23 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master d612d75f4 -> 765ce51c3


Credential Provider utility does not work with fully qualified local/HDFS jceks path


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/765ce51c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/765ce51c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/765ce51c

Branch: refs/heads/master
Commit: 765ce51c3713ed18ff644949760cc42b891dd2b0
Parents: d612d75
Author: Vipin Rathor <vrathor@hortonworks.com>
Authored: Mon Dec 12 12:37:34 2016 +0530
Committer: Vimal Sharma <svimal2106@apache.org>
Committed: Mon Dec 12 12:37:34 2016 +0530

----------------------------------------------------------------------
 release-log.txt                                           |  1 +
 .../org/apache/atlas/util/CredentialProviderUtility.java  | 10 +---------
 .../org/apache/atlas/CredentialProviderUtilityIT.java     | 10 +++++-----
 3 files changed, 7 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/765ce51c/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index c98727f..270ffeb 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements
for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1340 Credential Provider utility does not work with fully qualified local/HDFS jceks
path (vrathor via svimal2106)
 ATLAS-1363 Upgrade front end maven plugin to 1.0 (sumasai)
 ATLAS-1358 NPE Fix for search filter changes & callAPI related fixes (apoorvnaik via
sumasai)
 ATLAS-1357: Fixes for test failures from ATLAS-1307 (apoorvnaik via sumasai)

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/765ce51c/webapp/src/main/java/org/apache/atlas/util/CredentialProviderUtility.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/util/CredentialProviderUtility.java b/webapp/src/main/java/org/apache/atlas/util/CredentialProviderUtility.java
index aeff989..e9fd204 100755
--- a/webapp/src/main/java/org/apache/atlas/util/CredentialProviderUtility.java
+++ b/webapp/src/main/java/org/apache/atlas/util/CredentialProviderUtility.java
@@ -145,16 +145,8 @@ public class CredentialProviderUtility {
         String providerPath = textDevice.readLine("Please enter the full path to the credential
provider:");
 
         if (providerPath != null) {
-            File file = new File(providerPath);
-            if (file.exists()) {
-                textDevice
-                        .printf("%s already exists.  You will need to specify whether existing
entries should be "
-                                + "overwritten "
-                                + "(default is 'yes')\n", providerPath);
-            }
-            String providerURI = JavaKeyStoreProvider.SCHEME_NAME + "://file/" + providerPath;
             Configuration conf = new Configuration(false);
-            conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, providerURI);
+            conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, providerPath);
             return CredentialProviderFactory.getProviders(conf).get(0);
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/765ce51c/webapp/src/test/java/org/apache/atlas/CredentialProviderUtilityIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/CredentialProviderUtilityIT.java b/webapp/src/test/java/org/apache/atlas/CredentialProviderUtilityIT.java
index 18b9a18..eae7099 100755
--- a/webapp/src/test/java/org/apache/atlas/CredentialProviderUtilityIT.java
+++ b/webapp/src/test/java/org/apache/atlas/CredentialProviderUtilityIT.java
@@ -57,7 +57,7 @@ public class CredentialProviderUtilityIT {
             }
 
             public String readLine(String fmt, Object... args) {
-                return finalTestPath.toString();
+                return JavaKeyStoreProvider.SCHEME_NAME + "://file/" + finalTestPath.toString();
             }
 
             @Override
@@ -113,7 +113,7 @@ public class CredentialProviderUtilityIT {
             }
 
             public String readLine(String fmt, Object... args) {
-                return finalTestPath.toString();
+                return JavaKeyStoreProvider.SCHEME_NAME + "://file/" + finalTestPath.toString();
             }
 
             @Override
@@ -166,7 +166,7 @@ public class CredentialProviderUtilityIT {
             }
 
             public String readLine(String fmt, Object... args) {
-                return finalTestPath.toString();
+                return JavaKeyStoreProvider.SCHEME_NAME + "://file/" + finalTestPath.toString();
             }
 
             @Override
@@ -217,7 +217,7 @@ public class CredentialProviderUtilityIT {
             }
 
             public String readLine(String fmt, Object... args) {
-                return finalTestPath.toString();
+                return JavaKeyStoreProvider.SCHEME_NAME + "://file/" + finalTestPath.toString();
             }
 
             @Override
@@ -239,7 +239,7 @@ public class CredentialProviderUtilityIT {
             }
 
             public String readLine(String fmt, Object... args) {
-                return i++ == 0 ? finalTestPath.toString() : "y";
+                return i++ == 0 ? JavaKeyStoreProvider.SCHEME_NAME + "://file/" + finalTestPath.toString()
: "y";
             }
 
             @Override


Mime
View raw message