aboutsummaryrefslogtreecommitdiffstats
path: root/ansible-adapter
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-10-19 10:11:15 -0400
committerDan Timoney <dtimoney@att.com>2020-10-19 19:36:37 +0000
commit6aaa8fe86a92e06d92ca8c9df5a99baf84cb01aa (patch)
tree3c13ea31eedb1ee47cc0fb3c84b39b02be492cc8 /ansible-adapter
parent1d08cbe63f717139116785b6d54c9e068f527396 (diff)
Address security issues
Removed unused Mdsal activator class. Added file name validation for ConnectionBuilder in ansible adaptor Change-Id: I00d6a0c1edccae263520738f7a4685b1ad71b943 Issue-ID: CCSDK-2918 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ansible-adapter')
-rw-r--r--ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java b/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java
index 6295a255..672e0df6 100644
--- a/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java
+++ b/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java
@@ -53,6 +53,8 @@ import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.onap.ccsdk.sli.adaptors.ansible.model.AnsibleResult;
import org.onap.ccsdk.sli.adaptors.ansible.model.AnsibleResultCodes;
+import org.onap.ccsdk.sli.core.utils.PathValidator;
+
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
@@ -104,6 +106,10 @@ public class ConnectionBuilder {
public ConnectionBuilder(String trustStoreFile, char[] trustStorePasswd) throws KeyStoreException, IOException,
KeyManagementException, NoSuchAlgorithmException, CertificateException {
+ if (!PathValidator.isValidFilePath(trustStoreFile)) {
+ throw new IOException("Invalid trust store file path");
+ }
+
/* Load the specified trustStore */
KeyStore keystore = KeyStore.getInstance("JKS");
FileInputStream readStream = new FileInputStream(trustStoreFile);