Fix SDK vulnerabilities 24/110624/10
authorPiotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>
Mon, 27 Jul 2020 14:28:52 +0000 (16:28 +0200)
committerPiotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>
Thu, 6 Aug 2020 13:29:29 +0000 (15:29 +0200)
- Update spring boot dependencies and fix warnings about deprecations.
- Update testcontainers version to 1.14.3
- Top up patch version to 1.4.1

Issue-ID: DCAEGEN2-2277
Signed-off-by: Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>
Change-Id: I2173e0160728f2d404c7cf65e1869a642db49ece

31 files changed:
pom.xml
rest-services/cbs-client/pom.xml
rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/streams/gson/GsonUtils.java
rest-services/dmaap-client/pom.xml
rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/impl/MessageRouterSubscriberImpl.java
rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/MessageRouterTestsUtils.java
rest-services/http-client/pom.xml
rest-services/model/pom.xml
rest-services/pom.xml
security/crypt-password/pom.xml
security/pom.xml
security/ssl/pom.xml
services/external-schema-manager/pom.xml
services/hv-ves-client/pom.xml
services/hv-ves-client/producer/api/pom.xml
services/hv-ves-client/producer/ct/pom.xml
services/hv-ves-client/producer/impl/pom.xml
services/hv-ves-client/producer/impl/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/impl/HvVesProducerFactoryImpl.java
services/hv-ves-client/producer/pom.xml
services/hv-ves-client/protobuf/pom.xml
services/pom.xml
standardization/api-custom-header/pom.xml
standardization/moher-api/healthstate/pom.xml
standardization/moher-api/metrics/pom.xml
standardization/moher-api/pom.xml
standardization/moher-api/server-adapters/pom.xml
standardization/moher-api/server-adapters/reactor-netty/pom.xml
standardization/moher-api/server-adapters/spring-webflux/pom.xml
standardization/moher-api/server-adapters/spring-webflux/src/main/java/org/onap/dcaegen2/services/sdk/standardization/moher/adapters/springwebflux/HealthController.java
standardization/pom.xml
version.properties

diff --git a/pom.xml b/pom.xml
index 3a06eb5..1032a83 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
 
     <groupId>org.onap.dcaegen2.services</groupId>
     <artifactId>sdk</artifactId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
 
     <name>dcaegen2-services-sdk</name>
     <description>Common SDK repo for all DCAE Services</description>
@@ -74,9 +74,8 @@
         <commons-text.version>1.6</commons-text.version>
         <jetbrains-annotations.version>16.0.3</jetbrains-annotations.version>
         <protoc-jar-maven-plugin.version>3.6.0.2</protoc-jar-maven-plugin.version>
-        <testcontainers.version>1.13.0</testcontainers.version>
-        <spring.boot.version>2.2.1.RELEASE</spring.boot.version>
-        <spring.boot.version>2.1.5.RELEASE</spring.boot.version>
+        <testcontainers.version>1.14.3</testcontainers.version>
+        <spring.boot.version>2.2.9.RELEASE</spring.boot.version>
         <system.rules.version>1.17.2</system.rules.version>
         <openapi4j.version>1.0.3</openapi4j.version>
        <sonar.coverage.jacoco.xmlReportPaths>
index be44724..2ea991f 100644 (file)
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
         <artifactId>dcaegen2-services-sdk-rest-services</artifactId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
index 0881c08..2df6335 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START====================================
  * DCAEGEN2-SERVICES-SDK
  * =========================================================
- * Copyright (C) 2019 Nokia. All rights reserved.
+ * Copyright (C) 2019-2020 Nokia. All rights reserved.
  * =========================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -93,7 +93,7 @@ public final class GsonUtils {
 
     public static JsonElement readFromResource(String resource) throws IOException {
         try (Reader reader = new InputStreamReader(GsonUtils.class.getResourceAsStream(resource))) {
-            return new JsonParser().parse(reader);
+            return JsonParser.parseReader(reader);
         }
     }
 
index c6ac606..586c97e 100644 (file)
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.services.sdk</groupId>
     <artifactId>dcaegen2-services-sdk-rest-services</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <version>1.4.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
@@ -77,4 +77,4 @@
       <artifactId>junit-jupiter</artifactId>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>
index 1edaf72..72c0bad 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START====================================
  * DCAEGEN2-SERVICES-SDK
  * =========================================================
- * Copyright (C) 2019 Nokia. All rights reserved.
+ * Copyright (C) 2019-2020 Nokia. All rights reserved.
  * =========================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -80,12 +80,10 @@ public class MessageRouterSubscriberImpl implements MessageRouterSubscriber {
     }
 
     private List<JsonElement> getAsJsonElements(HttpResponse httpResponse){
-        JsonParser parser = new JsonParser();
-
         JsonArray bodyAsJsonArray = httpResponse
                 .bodyAsJson(StandardCharsets.UTF_8, gson, JsonArray.class);
 
-        return List.ofAll(bodyAsJsonArray).map(arrayElement -> parser.parse(arrayElement.getAsString()));
+        return List.ofAll(bodyAsJsonArray).map(arrayElement -> JsonParser.parseString(arrayElement.getAsString()));
     }
 
     private String buildSubscribeUrl(MessageRouterSubscribeRequest request) {
index 52946f5..8561e0b 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START====================================
  * DCAEGEN2-SERVICES-SDK
  * =========================================================
- * Copyright (C) 2019 Nokia. All rights reserved.
+ * Copyright (C) 2019-2020 Nokia. All rights reserved.
  * =========================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -43,7 +43,6 @@ import reactor.core.publisher.Flux;
 
 
 public final class MessageRouterTestsUtils {
-    private static final JsonParser parser = new JsonParser();
     private MessageRouterTestsUtils() {}
 
     public static MessageRouterPublishRequest createPublishRequest(String topicUrl){
@@ -78,7 +77,7 @@ public final class MessageRouterTestsUtils {
     }
 
     public static List<JsonElement> getAsJsonElements(List<String> messages){
-        return messages.map(parser::parse);
+        return messages.map(JsonParser::parseString);
     }
 
     public static List<JsonObject> getAsJsonObjects(List<String> messages){
index aae9aaf..018bb33 100644 (file)
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
         <artifactId>dcaegen2-services-sdk-rest-services</artifactId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
@@ -88,4 +88,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index bd6d990..962f35b 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
         <artifactId>dcaegen2-services-sdk-rest-services</artifactId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
index 64514c1..679c9da 100644 (file)
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.services</groupId>
     <artifactId>sdk</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <version>1.4.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.onap.dcaegen2.services.sdk</groupId>
index 3ae11bf..8a9fa6d 100644 (file)
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.services.sdk.security</groupId>
         <artifactId>dcaegen2-services-sdk-security</artifactId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -86,4 +86,4 @@
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>
index 046a013..a98d47c 100644 (file)
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.services</groupId>
     <artifactId>sdk</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <version>1.4.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.onap.dcaegen2.services.sdk.security</groupId>
@@ -22,4 +22,4 @@
     <module>ssl</module>
   </modules>
 
-</project>
\ No newline at end of file
+</project>
index 1c2fb15..55b7aa6 100644 (file)
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.services.sdk.security</groupId>
     <artifactId>dcaegen2-services-sdk-security</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <version>1.4.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>ssl</artifactId>
@@ -44,4 +44,4 @@
     </dependency>
   </dependencies>
 
-</project>
\ No newline at end of file
+</project>
index e22ac39..6491a49 100644 (file)
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
         <artifactId>dcaegen2-services-sdk-services</artifactId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>dcaegen2-services-sdk-services-external-schema-manager</artifactId>
@@ -43,4 +43,4 @@
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+</project>
index c4b690a..af045cd 100644 (file)
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.services.sdk</groupId>
     <artifactId>dcaegen2-services-sdk-services</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <version>1.4.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>dcaegen2-services-sdk-services-hvvesclient</artifactId>
index 02e1f70..0388c49 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
         <artifactId>hvvesclient-producer</artifactId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>hvvesclient-producer-api</artifactId>
index ee0db9e..c2a0f38 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
         <artifactId>hvvesclient-producer</artifactId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>hvvesclient-producer-ct</artifactId>
index 8b82fef..79c88b0 100644 (file)
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.services.sdk</groupId>
     <artifactId>hvvesclient-producer</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <version>1.4.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>hvvesclient-producer-impl</artifactId>
index 185fca7..c57f994 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * DCAEGEN2-SERVICES-SDK
  * ================================================================================
- * Copyright (C) 2019 Nokia. All rights reserved.
+ * Copyright (C) 2019-2020 Nokia. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ public class HvVesProducerFactoryImpl extends HvVesProducerFactory {
     @Override
     protected @NotNull HvVesProducer createProducer(ProducerOptions options) {
         TcpClient tcpClient = TcpClient.create()
-                .addressSupplier(() -> options.collectorAddresses().head());
+                .remoteAddress(() -> options.collectorAddresses().head());
         ProducerCore producerCore = new ProducerCore(new EncodersFactory(), options.wireFrameVersion());
 
         if (options.securityKeys() == null) {
index 776ef4d..7dbea41 100644 (file)
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.services.sdk</groupId>
     <artifactId>dcaegen2-services-sdk-services-hvvesclient</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <version>1.4.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>hvvesclient-producer</artifactId>
index 7f2b231..1201467 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <artifactId>dcaegen2-services-sdk-services-hvvesclient</artifactId>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <name>High Volume VES Collector Client :: Protobuf</name>
@@ -93,4 +93,4 @@
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+</project>
index 6bf6411..41998d5 100644 (file)
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.services</groupId>
     <artifactId>sdk</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <version>1.4.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.onap.dcaegen2.services.sdk</groupId>
index a4dbbd9..a50a518 100644 (file)
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.services.sdk</groupId>
     <artifactId>dcaegen2-services-sdk-standardization</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <version>1.4.1-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
   
index dc0b9d3..d08ba48 100644 (file)
@@ -25,7 +25,7 @@
     <parent>
         <artifactId>dcaegen2-sdk-moher-api</artifactId>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <name>Monitoring and Healthcheck :: Health state</name>
@@ -52,4 +52,4 @@
             <artifactId>reactor-core</artifactId>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index 41464f1..11a2318 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <artifactId>dcaegen2-sdk-moher-api</artifactId>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <name>Monitoring and Healthcheck :: Metrics</name>
@@ -63,4 +63,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index 8408e59..6b28232 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <artifactId>dcaegen2-services-sdk-standardization</artifactId>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <name>Monitoring and Healthcheck</name>
@@ -39,4 +39,4 @@
         <module>healthstate</module>
         <module>server-adapters</module>
     </modules>
-</project>
\ No newline at end of file
+</project>
index 8d49538..91479c1 100644 (file)
@@ -25,7 +25,7 @@
     <parent>
         <artifactId>dcaegen2-sdk-moher-api</artifactId>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <name>Monitoring and Healthcheck :: Server Adapters</name>
@@ -38,4 +38,4 @@
         <module>spring-webflux</module>
         <module>reactor-netty</module>
     </modules>
-</project>
\ No newline at end of file
+</project>
index 8828880..f464512 100644 (file)
@@ -25,7 +25,7 @@
     <parent>
         <artifactId>dcaegen2-sdk-moher-server-adapters</artifactId>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <name>Monitoring and Healthcheck :: Server Adapters :: Reactor Netty</name>
@@ -62,4 +62,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index cca6f00..227dbc4 100644 (file)
@@ -25,7 +25,7 @@
     <parent>
         <artifactId>dcaegen2-sdk-moher-server-adapters</artifactId>
         <groupId>org.onap.dcaegen2.services.sdk</groupId>
-        <version>1.4.0-SNAPSHOT</version>
+        <version>1.4.1-SNAPSHOT</version>
     </parent>
 
     <name>Monitoring and Healthcheck :: Server Adapters :: Spring Webflux</name>
@@ -78,4 +78,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index 1f9eb4b..0fcb331 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START====================================
  * DCAEGEN2-SERVICES-SDK
  * =========================================================
- * Copyright (C) 2019 Nokia. All rights reserved.
+ * Copyright (C) 2019-2020 Nokia. All rights reserved.
  * =========================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
 import reactor.core.publisher.Mono;
 
 @RestController
-@RequestMapping(value = "/health", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+@RequestMapping(value = "/health", produces = MediaType.APPLICATION_JSON_VALUE)
 public class HealthController {
     private final Gson gson;
     private final HealthProvider healthProvider;
@@ -55,7 +55,7 @@ public class HealthController {
     public Mono<ResponseEntity<String>> readinessCheck() {
         return healthProvider.currentHealth()
                 .map(health -> responseStatusForHealth(health)
-                        .contentType(MediaType.APPLICATION_JSON_UTF8)
+                        .contentType(MediaType.APPLICATION_JSON)
                         .body(gson.toJson(health)));
     }
 
index 2e68331..ab3d92c 100644 (file)
@@ -8,7 +8,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.services</groupId>
     <artifactId>sdk</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <version>1.4.1-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
 
index 9e0d73d..f352992 100644 (file)
@@ -1,6 +1,6 @@
 major=1
 minor=4
-patch=0
+patch=1
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}
 snapshot_version=${base_version}-SNAPSHOT