diff options
author | Tait,Trevor(rt0435) <rtait@amdocs.com> | 2018-08-09 15:12:38 -0400 |
---|---|---|
committer | Tait,Trevor(rt0435) <rtait@amdocs.com> | 2018-08-10 11:35:44 -0400 |
commit | 898d73492585a43a60f0ae29b5365187189e551d (patch) | |
tree | 270d56bc8ec6af397162758d02e2e62288d02f22 /src/main/java | |
parent | 76c55b6805cb8a6ab274c2e7723be1efbaaeb294 (diff) |
Add code for password obfuscation
Issue-ID: LOG-602
Change-Id: Ia35966d14c232e1381a8cd4cfb831bdc4921e491
Signed-off-by: Tait,Trevor(rt0435) <rtait@amdocs.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/onap/pomba/contextbuilder/sdc/SDCClientConfiguration.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/onap/pomba/contextbuilder/sdc/SDCClientConfiguration.java b/src/main/java/org/onap/pomba/contextbuilder/sdc/SDCClientConfiguration.java index 51b5031..28157d1 100644 --- a/src/main/java/org/onap/pomba/contextbuilder/sdc/SDCClientConfiguration.java +++ b/src/main/java/org/onap/pomba/contextbuilder/sdc/SDCClientConfiguration.java @@ -19,6 +19,7 @@ package org.onap.pomba.contextbuilder.sdc; import java.util.Base64;
import lombok.Data;
+import org.eclipse.jetty.util.security.Password;
import org.openecomp.sdc.http.SdcConnectorClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -56,7 +57,7 @@ public class SDCClientConfiguration { @Bean(name="httpBasicAuthorization")
public String getHttpBasicAuth() {
- String auth = new String(this.httpUserId + ":" + this.httpPassword);
+ String auth = new String(this.httpUserId + ":" + Password.deobfuscate(this.httpPassword));
String encodedAuth = Base64.getEncoder().encodeToString(auth.getBytes());
return ("Basic " + encodedAuth);
@@ -69,7 +70,7 @@ public class SDCClientConfiguration { SDCContextConfig sdcContextConfig = new SDCContextConfig();
sdcContextConfig.setUser(username);
sdcContextConfig.setAsdcAddress(sdcAddress);
- sdcContextConfig.setPassword(password);
+ sdcContextConfig.setPassword(Password.deobfuscate(password));
sdcContextConfig.setUseHttpsWithDmaap(false);
sdcContextConfig.setConsumerId(consumerID);
sdcContextConfig.setActivateServerTLSAuth(false);
|