aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBansal, Nitin (nb121v) <nitin.bansal@amdocs.com>2019-01-21 09:48:30 -0500
committerBansal, Nitin (nb121v) <nitin.bansal@amdocs.com>2019-01-21 09:49:30 -0500
commita46ee0480358b5c10d6fc3ac3c644b0d3d71f1a8 (patch)
tree1fe4edb390b7385676fdea7b7b97ffd3ee0cb45d
parent61110b0508dbc10d1e925c1f3ee637f61689ffac (diff)
support reading passwords from environment
support reading passwords from environment Change-Id: I713bddf0e6fa2e8c90de7023c8ca13138fcc1fbe Issue-ID: AAI-2083 Signed-off-by: Bansal, Nitin (nb121v) <nitin.bansal@amdocs.com>
-rw-r--r--src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/config/ElasticSearchConfig.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/config/ElasticSearchConfig.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/config/ElasticSearchConfig.java
index f4bc5ef..4680ded 100644
--- a/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/config/ElasticSearchConfig.java
+++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/config/ElasticSearchConfig.java
@@ -209,7 +209,7 @@ public class ElasticSearchConfig {
if(passwordValue.get().startsWith("OBF:")){
setTrustStorePassword(Password.deobfuscate(passwordValue.get()));
}else if(passwordValue.get().startsWith("ENV:")){
- setTrustStorePassword(System.getProperty(StringUtils.removeStart(passwordValue.get(), "ENV:")));
+ setTrustStorePassword(System.getenv(StringUtils.removeStart(passwordValue.get(), "ENV:")));
}
else{
setTrustStorePassword(passwordValue.get());
@@ -226,7 +226,7 @@ public class ElasticSearchConfig {
if(passwordValue.get().startsWith("OBF:")){
setKeyStorePassword(Password.deobfuscate(passwordValue.get()));
}else if(passwordValue.get().startsWith("ENV:")){
- setKeyStorePassword(System.getProperty(StringUtils.removeStart(passwordValue.get(), "ENV:")));
+ setKeyStorePassword(System.getenv(StringUtils.removeStart(passwordValue.get(), "ENV:")));
}
else{
setKeyStorePassword(passwordValue.get());