summaryrefslogtreecommitdiffstats
path: root/ms/neng/src
diff options
context:
space:
mode:
Diffstat (limited to 'ms/neng/src')
-rw-r--r--ms/neng/src/main/docker/startService.sh15
-rw-r--r--ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java5
2 files changed, 15 insertions, 5 deletions
diff --git a/ms/neng/src/main/docker/startService.sh b/ms/neng/src/main/docker/startService.sh
index 2e3e454c..17f53ce5 100644
--- a/ms/neng/src/main/docker/startService.sh
+++ b/ms/neng/src/main/docker/startService.sh
@@ -19,11 +19,18 @@
touch /app.jar
APP_ARGS=-Dspring.profiles.active=${SPRING_PROFILE}
-APP_ARGS=${APP_ARGS}" -Dpolicymgr_url="${POLICYMGR_URL}" -Dinstar_aaf_enc_pass="${AAF_PASS_ENC}
-APP_ARGS=${APP_ARGS}" -Daai_cert_pass="${AAI_CERT_PASSWORD}" -Daai_uribase="${AAI_URI_BASE}
-APP_ARGS=${APP_ARGS}" -Dneng_db_user="${NENG_DB_USER}" -Dneng_db_pass="${NENG_DB_PASS}
-APP_ARGS=${APP_ARGS}" -Dneng_db_url="${NENG_DB_URL}
+APP_ARGS=${APP_ARGS}" -Dneng_db_user="${NENG_DB_USER}" -Dneng_db_pass="${NENG_DB_PASS}
+APP_ARGS=${APP_ARGS}" -Dneng_db_url="${NENG_DB_URL}
+APP_ARGS=${APP_ARGS}" -Dpol_client_auth="${POL_CLIENT_AUTH}
+APP_ARGS=${APP_ARGS}" -Dpol_basic_auth="${POL_BASIC_AUTH}
+APP_ARGS=${APP_ARGS}" -Dpol_url="${POL_URL}
+APP_ARGS=${APP_ARGS}" -Dpol_env="${POL_ENV}
+APP_ARGS=${APP_ARGS}" -Dpol_req_id="${POL_REQ_ID}
+APP_ARGS=${APP_ARGS}" -Daai_cert_pass="${AAI_CERT_PASS}
+APP_ARGS=${APP_ARGS}" -Daai_cert_path="${AAI_CERT_PATH}
+APP_ARGS=${APP_ARGS}" -Daai_uri="${AAI_URI}
APP_ARGS=${APP_ARGS}" -cp /opt/etc/config"
echo "APP_ARGS ="${APP_ARGS}
java -Djava.security.egd=file:/dev/./urandom ${APP_ARGS} -Xms1024m -Xmx1024m -jar /app.jar --spring.config.location=/opt/etc/config/ > /tmp/app.out 2> /tmp/app.err
+
diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java
index 392567b7..e93675bf 100644
--- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java
+++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java
@@ -27,7 +27,9 @@ import java.security.cert.X509Certificate;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
+import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.TrustStrategy;
import org.apache.http.impl.client.CloseableHttpClient;
@@ -142,7 +144,8 @@ public class PolicyFinderServiceImpl implements PolicyFinder {
TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> true;
SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom()
.loadTrustMaterial(null, acceptingTrustStrategy).build();
- SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext);
+ HostnameVerifier verifier = (String arg0, SSLSession arg1) -> true;
+ SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext, verifier);
CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(csf).build();
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
requestFactory.setHttpClient(httpClient);