Remove requirement for encryption cipher 30/105930/2
authorTschaen, Brendan <ctschaen@att.com>
Tue, 14 Apr 2020 17:27:20 +0000 (13:27 -0400)
committerBrendan Tschaen <ctschaen@att.com>
Wed, 15 Apr 2020 14:19:20 +0000 (14:19 +0000)
Issue-ID: MUSIC-582
Signed-off-by: Tschaen, Brendan <ctschaen@att.com>
Change-Id: I0ee6b753dea08c02d199410247d6c1f1d06574b7

music-core/src/main/java/org/onap/music/datastore/MusicDataStore.java

index cb22c0f..9ce73cc 100755 (executable)
@@ -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())