You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/09/08 04:08:09 UTC

[GitHub] [dubbo] chickenlj commented on a diff in pull request #10567: Add Support For Istio-Agent

chickenlj commented on code in PR #10567:
URL: https://github.com/apache/dubbo/pull/10567#discussion_r965482265


##########
dubbo-xds/src/main/java/org/apache/dubbo/registry/xds/util/XdsChannel.java:
##########
@@ -46,17 +49,30 @@ public class XdsChannel {
     protected XdsChannel(URL url) {
         ManagedChannel managedChannel = null;
         try {
-            XdsCertificateSigner signer = url.getOrDefaultApplicationModel().getExtensionLoader(XdsCertificateSigner.class)
-                .getExtension(url.getParameter("signer", "istio"));
-            XdsCertificateSigner.CertPair certPair = signer.GenerateCert(url);
-            SslContext context = GrpcSslContexts.forClient()
-                .trustManager(InsecureTrustManagerFactory.INSTANCE)
-                .keyManager(new ByteArrayInputStream(certPair.getPublicKey().getBytes(StandardCharsets.UTF_8)),
-                    new ByteArrayInputStream(certPair.getPrivateKey().getBytes(StandardCharsets.UTF_8)))
-                .build();
-            managedChannel = NettyChannelBuilder.forAddress(url.getHost(), url.getPort()).sslContext(context)
-                .build();
-        } catch (SSLException e) {
+            if(!url.getParameter("useAgent",false)) {

Review Comment:
   Please use the dash formatted variable name `use-agent` and define it as a constant.
   
   Also, we need a demo and documentation introducing the usage of this key and the whole bootstrap file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org