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/11/17 10:37:29 UTC

[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #10947: Support plain text for xds channel

AlbumenJ commented on code in PR #10947:
URL: https://github.com/apache/dubbo/pull/10947#discussion_r1025020672


##########
dubbo-common/src/main/java/org/apache/dubbo/config/RegistryConfig.java:
##########
@@ -184,6 +184,16 @@ public class RegistryConfig extends AbstractConfig {
 
     private Boolean enableEmptyProtection;
 
+    private String secure;
+
+    public String getSecure() {
+        return secure;
+    }
+
+    public void setSecure(String secure) {
+        this.secure = secure;
+    }
+

Review Comment:
   Add definition to spring xsd



##########
dubbo-common/src/main/java/org/apache/dubbo/config/RegistryConfig.java:
##########
@@ -184,6 +184,16 @@ public class RegistryConfig extends AbstractConfig {
 
     private Boolean enableEmptyProtection;
 
+    private String secure;
+
+    public String getSecure() {
+        return secure;
+    }
+
+    public void setSecure(String secure) {
+        this.secure = secure;
+    }
+

Review Comment:
   Also add to dubbo-website



##########
dubbo-xds/src/main/java/org/apache/dubbo/registry/xds/util/XdsChannel.java:
##########
@@ -55,16 +55,21 @@ protected XdsChannel(URL url) {
         ManagedChannel managedChannel = null;
         try {
             if (!url.getParameter(USE_AGENT, false)) {
-                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();
+                if("plaintext".equals(url.getParameter("secure"))){

Review Comment:
   exact to constants



-- 
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