From 96d0852481a6a594f6cdf1ce9f31def50663d6dc Mon Sep 17 00:00:00 2001 From: Ram Krishna Verma Date: Wed, 27 Jan 2021 16:31:45 -0500 Subject: Upgrade io.grpc library in CDS actor Upgrading to latest version of io.grpc 1.35.0 to fix security issues. The methods named loadBalancerFactory and nameResolverFactory have been removed in the latest version. After going through the grpc-java codebase found that the one's we were using to initialize those factories are made default. Confirmed my understanding by posting a query on grpc-java github repo. Issue-ID: POLICY-2936 Change-Id: I238700ac3f384ff8e5fdef6c3f2ccfb54bff7005 Signed-off-by: Ram Krishna Verma --- .../java/org/onap/policy/cds/client/CdsProcessorGrpcClient.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'models-interactions/model-impl/cds/src/main/java') diff --git a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorGrpcClient.java b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorGrpcClient.java index efa8369bc..2dc128fd7 100644 --- a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorGrpcClient.java +++ b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorGrpcClient.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 Bell Canada. + * Copyright (C) 2019-2021 Bell Canada. * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,8 +21,6 @@ package org.onap.policy.cds.client; import com.google.common.base.Preconditions; import io.grpc.ManagedChannel; -import io.grpc.internal.DnsNameResolverProvider; -import io.grpc.internal.PickFirstLoadBalancerProvider; import io.grpc.netty.NettyChannelBuilder; import java.util.concurrent.CountDownLatch; import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput; @@ -65,8 +63,6 @@ public class CdsProcessorGrpcClient implements AutoCloseable { String url = bldr.toString(); this.channel = NettyChannelBuilder.forAddress(props.getHost(), props.getPort()) - .nameResolverFactory(new DnsNameResolverProvider()) - .loadBalancerFactory(new PickFirstLoadBalancerProvider()) .intercept(new BasicAuthClientHeaderInterceptor(props)).usePlaintext().build(); this.handler = new CdsProcessorHandler(listener, url); LOGGER.info("CdsProcessorListener started"); -- cgit 1.2.3-korg