Commit 765ce51c by Vipin Rathor Committed by Vimal Sharma

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

parent d612d75f
...@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ...@@ -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) ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES: 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-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-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) ATLAS-1357: Fixes for test failures from ATLAS-1307 (apoorvnaik via sumasai)
......
...@@ -145,16 +145,8 @@ public class CredentialProviderUtility { ...@@ -145,16 +145,8 @@ public class CredentialProviderUtility {
String providerPath = textDevice.readLine("Please enter the full path to the credential provider:"); String providerPath = textDevice.readLine("Please enter the full path to the credential provider:");
if (providerPath != null) { 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); 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); return CredentialProviderFactory.getProviders(conf).get(0);
} }
......
...@@ -57,7 +57,7 @@ public class CredentialProviderUtilityIT { ...@@ -57,7 +57,7 @@ public class CredentialProviderUtilityIT {
} }
public String readLine(String fmt, Object... args) { public String readLine(String fmt, Object... args) {
return finalTestPath.toString(); return JavaKeyStoreProvider.SCHEME_NAME + "://file/" + finalTestPath.toString();
} }
@Override @Override
...@@ -113,7 +113,7 @@ public class CredentialProviderUtilityIT { ...@@ -113,7 +113,7 @@ public class CredentialProviderUtilityIT {
} }
public String readLine(String fmt, Object... args) { public String readLine(String fmt, Object... args) {
return finalTestPath.toString(); return JavaKeyStoreProvider.SCHEME_NAME + "://file/" + finalTestPath.toString();
} }
@Override @Override
...@@ -166,7 +166,7 @@ public class CredentialProviderUtilityIT { ...@@ -166,7 +166,7 @@ public class CredentialProviderUtilityIT {
} }
public String readLine(String fmt, Object... args) { public String readLine(String fmt, Object... args) {
return finalTestPath.toString(); return JavaKeyStoreProvider.SCHEME_NAME + "://file/" + finalTestPath.toString();
} }
@Override @Override
...@@ -217,7 +217,7 @@ public class CredentialProviderUtilityIT { ...@@ -217,7 +217,7 @@ public class CredentialProviderUtilityIT {
} }
public String readLine(String fmt, Object... args) { public String readLine(String fmt, Object... args) {
return finalTestPath.toString(); return JavaKeyStoreProvider.SCHEME_NAME + "://file/" + finalTestPath.toString();
} }
@Override @Override
...@@ -239,7 +239,7 @@ public class CredentialProviderUtilityIT { ...@@ -239,7 +239,7 @@ public class CredentialProviderUtilityIT {
} }
public String readLine(String fmt, Object... args) { public String readLine(String fmt, Object... args) {
return i++ == 0 ? finalTestPath.toString() : "y"; return i++ == 0 ? JavaKeyStoreProvider.SCHEME_NAME + "://file/" + finalTestPath.toString() : "y";
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment