From fd5224f4aaf68e6ae186ef8a163edd7f5b2966f7 Mon Sep 17 00:00:00 2001 From: "Tschaen, Brendan" Date: Tue, 14 Apr 2020 13:27:20 -0400 Subject: Remove requirement for encryption cipher Issue-ID: MUSIC-582 Signed-off-by: Tschaen, Brendan Change-Id: I0ee6b753dea08c02d199410247d6c1f1d06574b7 --- .../src/main/java/org/onap/music/datastore/MusicDataStore.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/music-core/src/main/java/org/onap/music/datastore/MusicDataStore.java b/music-core/src/main/java/org/onap/music/datastore/MusicDataStore.java index cb22c0f4..9ce73cc8 100755 --- a/music-core/src/main/java/org/onap/music/datastore/MusicDataStore.java +++ b/music-core/src/main/java/org/onap/music/datastore/MusicDataStore.java @@ -159,7 +159,12 @@ public class MusicDataStore { Cluster cluster; if(MusicUtil.getCassName() != null && MusicUtil.getCassPwd() != null) { - String cassPwd = CipherUtil.decryptPKC(MusicUtil.getCassPwd()); + String cassPwd; + if (MusicUtil.getCipherEncKey() != null && !("").equals(MusicUtil.getCipherEncKey())) { + cassPwd = CipherUtil.decryptPKC(MusicUtil.getCassPwd()); + } else { + cassPwd = MusicUtil.getCassPwd(); + } logger.info(EELFLoggerDelegate.applicationLogger, "Building with credentials "+MusicUtil.getCassName()+" & "+ MusicUtil.getCassPwd()); cluster = Cluster.builder().withPort(MusicUtil.getCassandraPort()) -- cgit 1.2.3-korg