Updated to Java-17 62/139162/1
authorchandana.g.n <chandana.g.n@accenture.com>
Wed, 9 Oct 2024 13:17:38 +0000 (13:17 +0000)
committerchandana.g.n <chandana.g.n@accenture.com>
Tue, 15 Oct 2024 07:09:06 +0000 (07:09 +0000)
- Updated parent project and fixed security vulnerabilities

Issue-ID: CCSDK-4059
Change-Id: Ie02ae86a578dd7732b7a71b6a9e9d3a5997c17b3
Signed-off-by: chandana.g.n <chandana.g.n@accenture.com>
27 files changed:
components/model-catalog/blueprint-model/archetype-blueprint/pom.xml
components/model-catalog/blueprint-model/test-blueprint-kotlin-parent/pom.xml
ms/blueprintsprocessor/application/pom.xml
ms/blueprintsprocessor/application/src/main/docker/Dockerfile
ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
ms/blueprintsprocessor/functions/pom.xml
ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutor.kt
ms/blueprintsprocessor/functions/restful-executor/pom.xml
ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompileService.kt
ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowService.kt
ms/blueprintsprocessor/modules/blueprints/blueprint-validation/pom.xml
ms/blueprintsprocessor/modules/commons/dmaap-lib/pom.xml
ms/blueprintsprocessor/modules/commons/message-lib/pom.xml
ms/blueprintsprocessor/modules/commons/pom.xml
ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml
ms/blueprintsprocessor/modules/commons/ssh-lib/pom.xml
ms/blueprintsprocessor/modules/inbounds/configs-api/pom.xml
ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt
ms/blueprintsprocessor/modules/inbounds/pom.xml
ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml
ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml
ms/blueprintsprocessor/modules/inbounds/workflow-api/pom.xml
ms/blueprintsprocessor/parent/pom.xml
ms/pom.xml
ms/sdclistener/application/pom.xml
ms/sdclistener/parent/pom.xml
pom.xml

index 4e651a1..48f0050 100644 (file)
@@ -15,7 +15,7 @@
   ~ limitations under the License.
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>org.onap.ccsdk.cds.components.cba</groupId>
index c9fe99c..4ab7711 100644 (file)
             <artifactId>blueprintsprocessor-application</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty.http2</groupId>
+            <artifactId>http2-common</artifactId>
+            <version>11.0.20</version>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
index c44111d..44c3c76 100755 (executable)
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-core</artifactId>
+            <version>6.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty.http2</groupId>
+            <artifactId>http2-common</artifactId>
+            <version>11.0.20</version>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-security</artifactId>
             <groupId>org.yaml</groupId>
             <artifactId>snakeyaml</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+            <version>2.13.9</version>
+        </dependency>
         <dependency>
             <groupId>com.nhaarman.mockitokotlin2</groupId>
             <artifactId>mockito-kotlin</artifactId>
             <artifactId>wiremock-jre8</artifactId>
             <version>2.35.1</version>
             <scope>test</scope>
+            <exclusions>
+            <exclusion>
+                <groupId>commons-fileupload</groupId>
+                <artifactId>commons-fileupload</artifactId>
+            </exclusion>
+        </exclusions>
         </dependency>
+
         <!-- END UAT -->
         <dependency>
             <groupId>ch.qos.logback</groupId>
             <artifactId>logback-classic</artifactId>
+            <version>1.2.13</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.kafka</groupId>
+            <artifactId>spring-kafka</artifactId>
+            <version>2.9.13</version>
+        </dependency>
+        <dependency>
+            <groupId>org.bitbucket.b_c</groupId>
+            <artifactId>jose4j</artifactId>
+            <version>0.9.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+            <version>3.9.2</version>
         </dependency>
     </dependencies>
 
index 9bb56ac..2bbcda9 100755 (executable)
@@ -1,6 +1,6 @@
 # Prepare stage for multistage image build
 ## START OF STAGE0 ##
-FROM onap/ccsdk-alpine-j17-image:1.5.1 AS stage0
+FROM onap/ccsdk-alpine-j17-image:1.6.2 AS stage0
 USER root
 
 # add entrypoint
@@ -22,7 +22,7 @@ RUN tar -xzf /source.tar.gz -C /tmp \
 
 
 ## This will create actual image
-FROM onap/ccsdk-alpine-j17-image:1.5.1
+FROM onap/ccsdk-alpine-j17-image:1.6.2
 USER root
 
 COPY --from=stage0 /opt /opt
index e20e264..29ea46a 100755 (executable)
@@ -75,7 +75,7 @@ blueprintsprocessor.grpcclient.py-executor.trustCertCollection=src/main/resource
 
 
 # db
-blueprintsprocessor.db.url=jdbc:mysql://localhost:3306/sdnctl
+blueprintsprocessor.db.url=jdbc:mariadb://localhost:3306/sdnctl
 blueprintsprocessor.db.username=sdnctl
 blueprintsprocessor.db.password=sdnctl
 blueprintsprocessor.db.driverClassName=org.mariadb.jdbc.Driver
@@ -86,7 +86,7 @@ blueprintsprocessor.db.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialec
 
 # processor-db endpoint
 blueprintsprocessor.db.processor-db.type=maria-db
-blueprintsprocessor.db.processor-db.url=jdbc:mysql://localhost:3306/sdnctl
+blueprintsprocessor.db.processor-db.url=jdbc:mariadb://localhost:3306/sdnctl
 blueprintsprocessor.db.processor-db.username=root
 blueprintsprocessor.db.processor-db.password=secretpassword
 
index 7f81862..7bb4ae0 100755 (executable)
             <groupId>org.mock-server</groupId>
             <artifactId>mockserver-netty</artifactId>
             <scope>test</scope>
+            <exclusions>
+            <exclusion>
+                <groupId>commons-collections</groupId>
+                <artifactId>commons-collections</artifactId>
+            </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.kafka</groupId>
+            <artifactId>spring-kafka</artifactId>
+            <version>2.9.13</version>
         </dependency>
         <dependency>
             <groupId>org.powermock</groupId>
             <artifactId>junit-vintage-engine</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>com.nimbusds</groupId>
+            <artifactId>nimbus-jose-jwt</artifactId>
+            <version>9.37.2</version>
+        </dependency>
         <dependency>
             <groupId>org.jetbrains.kotlin</groupId>
             <artifactId>kotlin-test-junit</artifactId>
index 4b93335..86e4058 100644 (file)
@@ -192,6 +192,9 @@ open class Execute : AbstractScriptComponentFunction() {
                     action.get(ACTION_PAYLOAD)
                         ?: throw BluePrintProcessorException("Failed to load action $actionType payload.")
                 }
+                RestconfRequestType.GET, RestconfRequestType.DELETE -> {
+                    // No payload required for GET or DELETE
+                }
             }
         }
     }
index 2c93853..c779869 100644 (file)
@@ -47,6 +47,7 @@
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
+            <version>5.3.39</version>
         </dependency>
         <dependency>
             <groupId>com.h2database</groupId>
index b093e8e..34c62c6 100644 (file)
@@ -95,7 +95,7 @@ open class BluePrintCompileService {
                     add("-d")
                     add(compiledJarFile.absolutePath)
                     add("-jvm-target")
-                    add("11")
+                    add("17")
                 }
                 val deferredCompile = async {
                     val k2jvmCompiler = K2JVMCompiler()
index f3e4e59..15f0504 100644 (file)
@@ -347,6 +347,7 @@ abstract class AbstractBluePrintWorkFlowService<In, Out> : CoroutineScope, BlueP
                         }
                     }
                 }
+                else -> log.info("Handling other types of Message")
             }
         }
     }
index b8fad8b..710a4a4 100644 (file)
@@ -35,6 +35,7 @@
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
+            <version>6.0.0</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
index 5215c83..6c6116d 100644 (file)
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
+        </dependency>
+         <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <version>20231013</version>
         </dependency>
         <dependency>
             <groupId>org.junit.vintage</groupId>
index 40092b8..d971dae 100644 (file)
         <dependency>
             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
             <artifactId>processor-core</artifactId>
+        </dependency>
+         <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+            <version>2.13.9</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.kafka</groupId>
             <artifactId>spring-kafka</artifactId>
+            <version>2.9.13</version>
         </dependency>
         <dependency>
             <groupId>org.apache.kafka</groupId>
index 3291b02..4eba594 100755 (executable)
             <artifactId>kotlin-test-junit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+           <groupId>org.springframework.kafka</groupId>
+           <artifactId>spring-kafka</artifactId>
+           <version>2.9.13</version>
+        </dependency>
+        <dependency>
+            <groupId>org.bitbucket.b_c</groupId>
+            <artifactId>jose4j</artifactId>
+            <version>0.9.4</version>
+        </dependency>
         <dependency>
             <groupId>org.jetbrains.kotlinx</groupId>
             <artifactId>kotlinx-coroutines-test</artifactId>
index 16c4870..74680ae 100644 (file)
@@ -53,6 +53,7 @@
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
+            <version>5.3.39</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-security</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-core</artifactId>
+            <version>6.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-compiler-embeddable</artifactId>
+        </dependency>
     </dependencies>
 </project>
index 3fcfc7a..002faa6 100644 (file)
             <groupId>org.apache.sshd</groupId>
             <artifactId>sshd-core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.bitbucket.b_c</groupId>
+            <artifactId>jose4j</artifactId>
+            <version>0.9.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+            <version>3.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+            <version>2.13.9</version>
+        </dependency>
     </dependencies>
 </project>
index 64e32ac..82d0bfe 100644 (file)
@@ -38,6 +38,7 @@
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-core</artifactId>
+            <version>6.3.0</version>
         </dependency>
         <dependency>
             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
index c1532cd..dfbacdb 100644 (file)
@@ -77,6 +77,13 @@ open class HealthCheckProperties {
     }
 
     private fun getServiceEndpoint(serviceEndpointInfo: List<String>): ServiceEndpoint {
+        // Ensure the list has at least 2 elements
+        if (serviceEndpointInfo.size < 2) {
+            // Use default values if the list is too short
+            return ServiceEndpoint("", "")
+        }
+
+        // Safely access elements assuming the list has at least 2 elements
         return ServiceEndpoint(
             removeSpecialCharacter(serviceEndpointInfo[0]), removeSpecialCharacter(serviceEndpointInfo[1])
         )
index 3afd50c..ac73ca9 100644 (file)
@@ -44,6 +44,7 @@
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-core</artifactId>
+            <version>6.3.0</version>
         </dependency>
         <dependency>
             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
index 4eceb43..0f763fa 100644 (file)
@@ -34,6 +34,7 @@
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-core</artifactId>
+            <version>6.3.0</version>
         </dependency>
         <dependency>
             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
index 2fa80ef..ddc3e19 100755 (executable)
@@ -63,6 +63,7 @@
         <dependency>
             <groupId>org.springframework.kafka</groupId>
             <artifactId>spring-kafka</artifactId>
+            <version>2.9.13</version>
             <exclusions>
                 <exclusion>
                     <groupId>org.slf4j</groupId>
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.bitbucket.b_c</groupId>
+            <artifactId>jose4j</artifactId>
+            <version>0.9.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+            <version>3.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+            <version>2.13.9</version>
+        </dependency>
         <dependency>
             <groupId>org.springframework.kafka</groupId>
             <artifactId>spring-kafka-test</artifactId>
index 5ca29b7..b956ff9 100644 (file)
@@ -34,6 +34,7 @@
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-core</artifactId>
+            <version>6.3.0</version>
         </dependency>
         <dependency>
             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
index 3d13447..1c0ba32 100755 (executable)
@@ -55,7 +55,7 @@
         <json-smart.version>2.4.9</json-smart.version>
 
         <commons-io-version>2.8.0</commons-io-version>
-        <commons-compress-version>1.21</commons-compress-version>
+        <commons-compress-version>1.24.0</commons-compress-version>
         <commons-collections-version>4.4</commons-collections-version>
     </properties>
 
                 <version>${hazelcast.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>org.springframework.security</groupId>
+                <artifactId>spring-security-core</artifactId>
+                <version>6.3.0</version>
+            </dependency>
+
             <!-- Adaptors -->
             <dependency>
                 <groupId>org.apache.sshd</groupId>
             <dependency>
                 <groupId>org.apache.kafka</groupId>
                 <artifactId>kafka-clients</artifactId>
-                <version>${kafka.version}</version>
+                <version>3.8.0</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.kafka</groupId>
index d13a293..d99558b 100644 (file)
         <module>sdclistener</module>
     </modules>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-text</artifactId>
+            <version>1.10.0</version>
+        </dependency>
+        <dependency>
+           <groupId>org.springframework.kafka</groupId>
+           <artifactId>spring-kafka</artifactId>
+           <version>2.9.13</version>
+        </dependency>
+     </dependencies>
+
     <build>
         <pluginManagement>
             <plugins>
index 54a9e95..7cc3b6e 100644 (file)
         <dependency>
             <groupId>ch.qos.logback</groupId>
             <artifactId>logback-classic</artifactId>
+            <version>1.2.13</version>
         </dependency>
         <dependency>
             <groupId>com.github.stefanbirkner</groupId>
index e318292..a1a0335 100755 (executable)
             <dependency>
                 <groupId>org.apache.commons</groupId>
                 <artifactId>commons-compress</artifactId>
-                <version>1.21</version>
+                <version>1.24.0</version>
             </dependency>
-        <dependency>
+            <dependency>
+                <groupId>org.springframework.security</groupId>
+                <artifactId>spring-security-core</artifactId>
+                <version>6.3.0</version>
+            </dependency>
+            <dependency>
                 <groupId>com.google.guava</groupId>
                 <artifactId>guava</artifactId>
                 <version>${guava.version}</version>
             <dependency>
                 <groupId>org.apache.kafka</groupId>
                 <artifactId>kafka-clients</artifactId>
-                <version>${kafka.version}</version>
+                <version>3.8.0</version>
+            </dependency>
+            <dependency>
+                <groupId>org.json</groupId>
+                <artifactId>json</artifactId>
+                <version>20231013</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.kafka</groupId>
+                <artifactId>spring-kafka</artifactId>
+                <version>2.9.13</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-text</artifactId>
+                <version>1.10.0</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-compiler-embeddable</artifactId>
+                <version>1.7.0</version>
             </dependency>
         </dependencies>
     </dependencyManagement>
diff --git a/pom.xml b/pom.xml
index d63614c..d30c8e2 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -22,8 +22,8 @@ limitations under the License.
 
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
-        <artifactId>spring-boot-27-starter-parent</artifactId>
-        <version>2.8.0</version>
+        <artifactId>spring-boot-27-jdk-17-starter-parent</artifactId>
+        <version>2.8.0-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
@@ -56,13 +56,13 @@ limitations under the License.
         <sonar.inclusions>**/*.java,**/*.kt</sonar.inclusions>
         <!--Specify path to load jacoco XLM report, as Sonar can't load Kotlin coverage from binary report-->
         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
-        <jacoco.version>0.8.7</jacoco.version>
+        <jacoco.version>0.8.12</jacoco.version>
 
         <!-- Properties for POM Format -->
         <format.skipValidate>false</format.skipValidate>
         <format.skipExecute>true</format.skipExecute>
 
-        <java.version>11</java.version>
+        <java.version>17</java.version>
         <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
         <maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
 
@@ -78,19 +78,53 @@ limitations under the License.
         <ccsdk.cds.version>${project.version}</ccsdk.cds.version>
 
         <kotlin.version>1.7.0</kotlin.version>
-        <kotlin.maven.version>1.6.21</kotlin.maven.version>
-        <kotlin.couroutines.version>1.6.4</kotlin.couroutines.version>
+        <kotlin.maven.version>1.7.0</kotlin.maven.version>
+        <kotlin.couroutines.version>1.7.0</kotlin.couroutines.version>
         <kotlinpoet.version>1.11.0</kotlinpoet.version>
-        <apache.httpcomponents.client.version>4.5.13</apache.httpcomponents.client.version>
+        <apache.httpcomponents.client.version>4.5.14</apache.httpcomponents.client.version>
 
         <grpc.version>1.29.0</grpc.version>
-        <netty-ssl>2.0.50.Final</netty-ssl>
-        <protobuff.java.version>3.10.0</protobuff.java.version>
-        <protobuff.java.utils.version>3.16.3</protobuff.java.utils.version>
-        <mockk.version>1.12.8</mockk.version>
+        <netty-ssl>2.0.66.Final</netty-ssl>
+        <protobuff.java.version>3.21.7</protobuff.java.version>
+        <protobuff.java.utils.version>3.21.7</protobuff.java.utils.version>
+        <mockk.version>1.13.12</mockk.version>
 
     </properties>
 
+    <dependencies>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>1.2.13</version>
+        </dependency>
+        <dependency>
+            <groupId>com.squareup.okio</groupId>
+            <artifactId>okio</artifactId>
+            <version>3.4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.yaml</groupId>
+            <artifactId>snakeyaml</artifactId>
+            <version>2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.xerial.snappy</groupId>
+            <artifactId>snappy-java</artifactId>
+            <version>1.1.10.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.kafka</groupId>
+            <artifactId>kafka-clients</artifactId>
+            <version>3.8.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jsoup</groupId>
+            <artifactId>jsoup</artifactId>
+            <version>1.15.3</version>
+        </dependency>
+
+    </dependencies>
+
     <build>
         <pluginManagement>
             <plugins>