diff options
author | Prudence Au <prudence.au@amdocs.com> | 2018-08-15 18:27:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-15 18:27:38 +0000 |
commit | 4fdbacb857cbfe84001ef354356cca024292f42b (patch) | |
tree | ae2290a6863bb029749613291f45c9b415613b1e /src/main | |
parent | f81acef53a2ff8a7a8289639f27a9681382d0c79 (diff) | |
parent | 898d73492585a43a60f0ae29b5365187189e551d (diff) |
Merge "Add code for password obfuscation"
Diffstat (limited to 'src/main')
-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);
|