Fix inconsistent use of encrypt method 25/98825/3
authorPatrick Brady <patrick.brady@att.com>
Mon, 25 Nov 2019 23:04:21 +0000 (15:04 -0800)
committerPatrick Brady <patrick.brady@att.com>
Mon, 16 Dec 2019 19:18:46 +0000 (19:18 +0000)
The appc Configuration class handles decryption of encrypted
passwords with no additional method calls needed.
This change removes the incorrect call the the EncryptionTool
encrypt method.

Change-Id: I3b9664911d087da25919ae96db038008b8427e24
Signed-off-by: Patrick Brady <patrick.brady@att.com>
Issue-ID: APPC-1766

appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ProviderAdapterImpl.java

index 8c0a61b..1d00769 100644 (file)
@@ -33,7 +33,6 @@ import org.onap.appc.adapter.iaas.provider.operation.common.enums.Operation;
 import org.onap.appc.adapter.iaas.provider.operation.impl.EvacuateServer;
 import org.onap.appc.configuration.Configuration;
 import org.onap.appc.configuration.ConfigurationFactory;
-import org.onap.appc.encryption.EncryptionTool;
 import org.onap.appc.exceptions.APPCException;
 import org.onap.appc.util.StructuredPropertyHelper;
 import org.onap.appc.util.StructuredPropertyHelper.Node;
@@ -283,8 +282,9 @@ public class ProviderAdapterImpl implements ProviderAdapter {
                                 ProviderAdapterImpl.DEFAULT_USER = node2.getValue();
                                 break;
                             case Property.PROVIDER_TENANT_PASSWORD:
-                                // convert password from Base64 encrypted string prefixed with 'enc:'
-                                password = EncryptionTool.getInstance().encrypt(node2.getValue());
+                                //The passwords are automatically decrpyted by the appc Configuration
+                                //class and require no additional method calls to decrypt.
+                                password = node2.getValue();
                                 ProviderAdapterImpl.DEFAULT_PASS = node2.getValue();
                                 break;
                             case Property.PROVIDER_TENANT_DOMAIN: