Upgraded grpc-netty for vulnerabilities and removed boilerplate code 15/111515/1
authorjitendra007 <jitendra.sharma1@huawei.com>
Fri, 21 Aug 2020 09:11:45 +0000 (14:41 +0530)
committerjitendra007 <jitendra.sharma1@huawei.com>
Fri, 21 Aug 2020 09:20:34 +0000 (14:50 +0530)
Issue-ID: CLI-313

Signed-off-by: jitendra007 <jitendra.sharma1@huawei.com>
Change-Id: I653328c56e49fcaef6dffa3cbd48d89f4a2eafb4

grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenInterfaceGrpcClient.java
grpc/pom.xml

index d50f614..13d2f97 100644 (file)
@@ -62,7 +62,7 @@ public class OpenInterfaceGrpcClient {
         this(ManagedChannelBuilder.forAddress(host, port)
             // Channels are secure by default (via SSL/TLS). For the example we disable TLS to avoid
             // needing certificates.
-            .usePlaintext(true)
+            .usePlaintext()
             .build());
       }
 
index 84a508f..91d5d62 100644 (file)
@@ -31,7 +31,7 @@
   </modules>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <grpc.version>1.8.0</grpc.version>
+    <grpc.version>1.29.0</grpc.version>
   </properties>
   <dependencies>
 <!-- netty-codec-http2 excluded due to Security Issues:- CVE-2019-9512,CVE-2019-9514,CVE-2019-9515,CVE-2019-9518,CVE-2019-16869
       <groupId>io.grpc</groupId>
       <artifactId>grpc-netty</artifactId>
       <version>${grpc.version}</version>
-       <exclusions>
-        <exclusion>
-           <groupId>io.netty</groupId>
-            <artifactId>netty-codec-http2</artifactId>
-            </exclusion>
-      </exclusions>
     </dependency>
-
-    <dependency>
-        <groupId>io.netty</groupId>
-        <artifactId>netty-codec-http2</artifactId>
-        <version>4.1.46.Final</version>
-        <exclusions>
-            <exclusion>
-                <groupId>io.netty</groupId>
-                <artifactId>netty-codec-http</artifactId>
-            </exclusion>
-            <exclusion>
-                <groupId>io.netty</groupId>
-                <artifactId>netty-handler</artifactId>
-            </exclusion>
-        </exclusions>
-    </dependency>
-      <dependency>
-          <groupId>io.netty</groupId>
-          <artifactId>netty-codec-http</artifactId>
-          <version>4.1.48.Final</version>
-      </dependency>
-      <dependency>
-          <groupId>io.netty</groupId>
-          <artifactId>netty-handler</artifactId>
-          <version>4.1.19.Final</version>
-      </dependency>
-
       <dependency>
       <groupId>io.grpc</groupId>
       <artifactId>grpc-protobuf</artifactId>