summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dcae-analytics/dcae-analytics-model/pom.xml2
-rw-r--r--dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/AnalyticsHttpConstants.java6
-rw-r--r--dcae-analytics/dcae-analytics-tca-core/pom.xml2
-rw-r--r--dcae-analytics/dcae-analytics-tca-model/pom.xml2
-rw-r--r--dcae-analytics/dcae-analytics-tca-web/pom.xml2
-rw-r--r--dcae-analytics/dcae-analytics-test/pom.xml2
-rw-r--r--dcae-analytics/dcae-analytics-web/pom.xml2
-rw-r--r--dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/http/HttpClientPreferencesCustomizer.java28
-rw-r--r--dcae-analytics/pom.xml2
-rw-r--r--eelf-logger/eelf-logger-api/pom.xml2
-rw-r--r--eelf-logger/eelf-logger-logback-impl/pom.xml2
-rw-r--r--eelf-logger/eelf-logger-model/pom.xml2
-rw-r--r--eelf-logger/pom.xml2
-rw-r--r--pom.xml2
-rw-r--r--version.properties2
15 files changed, 44 insertions, 16 deletions
diff --git a/dcae-analytics/dcae-analytics-model/pom.xml b/dcae-analytics/dcae-analytics-model/pom.xml
index 28d2180..669e29a 100644
--- a/dcae-analytics/dcae-analytics-model/pom.xml
+++ b/dcae-analytics/dcae-analytics-model/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>dcae-analytics</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>dcae-analytics-model</artifactId>
diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/AnalyticsHttpConstants.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/AnalyticsHttpConstants.java
index 421e158..17b8cb8 100644
--- a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/AnalyticsHttpConstants.java
+++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/AnalyticsHttpConstants.java
@@ -26,9 +26,9 @@ package org.onap.dcae.analytics.model;
*/
public abstract class AnalyticsHttpConstants {
- public static final String REQUEST_ID_HEADER_KEY = "X-ECOMP-RequestID";
- public static final String REQUEST_TRANSACTION_ID_HEADER_KEY = "X-ECOMP-TransactionID";
- public static final String REQUEST_APP_NAME_HEADER_KEY = "X-ECOMP-FromAppID";
+ public static final String REQUEST_ID_HEADER_KEY = "X-RequestID";
+ public static final String REQUEST_TRANSACTION_ID_HEADER_KEY = "X-TransactionID";
+ public static final String REQUEST_APP_NAME_HEADER_KEY = "X-FromAppID";
public static final String REQUEST_BEGIN_TS_HEADER_KEY = "X-Begin-Timestamp";
public static final String REQUEST_END_TS_HEADER_KEY = "X-End-Timestamp";
diff --git a/dcae-analytics/dcae-analytics-tca-core/pom.xml b/dcae-analytics/dcae-analytics-tca-core/pom.xml
index 9c2b308..09d90e1 100644
--- a/dcae-analytics/dcae-analytics-tca-core/pom.xml
+++ b/dcae-analytics/dcae-analytics-tca-core/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>dcae-analytics</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>dcae-analytics-tca-core</artifactId>
diff --git a/dcae-analytics/dcae-analytics-tca-model/pom.xml b/dcae-analytics/dcae-analytics-tca-model/pom.xml
index b9c820a..a24c3fd 100644
--- a/dcae-analytics/dcae-analytics-tca-model/pom.xml
+++ b/dcae-analytics/dcae-analytics-tca-model/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>dcae-analytics</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>dcae-analytics-tca-model</artifactId>
diff --git a/dcae-analytics/dcae-analytics-tca-web/pom.xml b/dcae-analytics/dcae-analytics-tca-web/pom.xml
index 1d9a89a..fdee04e 100644
--- a/dcae-analytics/dcae-analytics-tca-web/pom.xml
+++ b/dcae-analytics/dcae-analytics-tca-web/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>dcae-analytics</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>dcae-analytics-tca-web</artifactId>
diff --git a/dcae-analytics/dcae-analytics-test/pom.xml b/dcae-analytics/dcae-analytics-test/pom.xml
index 6530e5c..c705e15 100644
--- a/dcae-analytics/dcae-analytics-test/pom.xml
+++ b/dcae-analytics/dcae-analytics-test/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>dcae-analytics</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>dcae-analytics-test</artifactId>
diff --git a/dcae-analytics/dcae-analytics-web/pom.xml b/dcae-analytics/dcae-analytics-web/pom.xml
index e6f7237..c0a20ce 100644
--- a/dcae-analytics/dcae-analytics-web/pom.xml
+++ b/dcae-analytics/dcae-analytics-web/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>dcae-analytics</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>dcae-analytics-web</artifactId>
diff --git a/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/http/HttpClientPreferencesCustomizer.java b/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/http/HttpClientPreferencesCustomizer.java
index c5f66be..73a9539 100644
--- a/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/http/HttpClientPreferencesCustomizer.java
+++ b/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/http/HttpClientPreferencesCustomizer.java
@@ -20,6 +20,7 @@
package org.onap.dcae.analytics.web.http;
+import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.security.KeyManagementException;
@@ -46,6 +47,8 @@ import org.apache.http.ssl.SSLContextBuilder;
import org.onap.dcae.analytics.model.AnalyticsHttpConstants;
import org.onap.dcae.analytics.model.util.function.StringToURLFunction;
import org.onap.dcae.analytics.web.util.AnalyticsWebUtils;
+import org.onap.dcaegen2.services.sdk.security.ssl.Password;
+import org.onap.dcaegen2.services.sdk.security.ssl.Passwords;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.web.client.RestTemplateCustomizer;
@@ -221,6 +224,7 @@ public class HttpClientPreferencesCustomizer<T extends HttpClientPreferences> im
if (!ignoreSSLValidation) {
logger.info("SSL Validation will be enforced for Http Client Id: {}", httpClientId);
+ setSslContextFromEnvironment(httpClientBuilder);
return;
}
@@ -236,6 +240,30 @@ public class HttpClientPreferencesCustomizer<T extends HttpClientPreferences> im
}
+ private void setSslContextFromEnvironment(HttpClientBuilder httpClientBuilder) {
+ final String caCertPath = System.getenv("DCAE_CA_CERTPATH");
+ if (!StringUtils.hasText(caCertPath)) {
+ return;
+ }
+ final SSLContextBuilder sslContextBuilder = new SSLContextBuilder();
+ final String truststoreFilename = "trust.jks";
+ final String truststorePassFilename = "trust.pass";
+ final String certDirPath = caCertPath.substring(0, caCertPath.lastIndexOf("/"));
+ final File truststoreFile = new File(certDirPath, truststoreFilename);
+ final File truststorePassFile = new File(certDirPath, truststorePassFilename);
+ final Password password = Passwords.fromFile(truststorePassFile);
+ password.use(chars -> {
+ try {
+ sslContextBuilder.loadTrustMaterial(truststoreFile, chars);
+ httpClientBuilder.setSSLContext(sslContextBuilder.build());
+ } catch (NoSuchAlgorithmException | KeyStoreException | CertificateException | IOException |
+ KeyManagementException e) {
+ logger.warn("Could not load trusted certificates from environment");
+ }
+ return null;
+ });
+ }
+
/**
* Header Request Interceptor adds defaults headers if not set explicitly
diff --git a/dcae-analytics/pom.xml b/dcae-analytics/pom.xml
index 5a6311e..4b49e2a 100644
--- a/dcae-analytics/pom.xml
+++ b/dcae-analytics/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>tca-gen2-parent</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>dcae-analytics</artifactId>
diff --git a/eelf-logger/eelf-logger-api/pom.xml b/eelf-logger/eelf-logger-api/pom.xml
index d5a9987..c827e98 100644
--- a/eelf-logger/eelf-logger-api/pom.xml
+++ b/eelf-logger/eelf-logger-api/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>eelf-logger</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>eelf-logger-api</artifactId>
diff --git a/eelf-logger/eelf-logger-logback-impl/pom.xml b/eelf-logger/eelf-logger-logback-impl/pom.xml
index cc6e89d..3e1e43b 100644
--- a/eelf-logger/eelf-logger-logback-impl/pom.xml
+++ b/eelf-logger/eelf-logger-logback-impl/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>eelf-logger</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>eelf-logger-logback-impl</artifactId>
diff --git a/eelf-logger/eelf-logger-model/pom.xml b/eelf-logger/eelf-logger-model/pom.xml
index 75038f8..45fd2c2 100644
--- a/eelf-logger/eelf-logger-model/pom.xml
+++ b/eelf-logger/eelf-logger-model/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>eelf-logger</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>eelf-logger-model</artifactId>
diff --git a/eelf-logger/pom.xml b/eelf-logger/pom.xml
index b68d308..c8ab5fd 100644
--- a/eelf-logger/pom.xml
+++ b/eelf-logger/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>tca-gen2-parent</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>eelf-logger</artifactId>
diff --git a/pom.xml b/pom.xml
index e187db9..581c587 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>tca-gen2-parent</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
<name>dcaegen2-analytics-tca-gen2</name>
<packaging>pom</packaging>
diff --git a/version.properties b/version.properties
index 755adf7..152260f 100644
--- a/version.properties
+++ b/version.properties
@@ -1,6 +1,6 @@
major=1
minor=2
-patch=1
+patch=2
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT