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/10/07 09:44:57 UTC

[GitHub] [dubbo-go] ZLBer opened a new pull request, #2073: tls support: dubbo/dubbo3/grpc protocol

ZLBer opened a new pull request, #2073:
URL: https://github.com/apache/dubbo-go/pull/2073

   <!--  Thanks for sending a pull request!
   Read https://github.com/apache/dubbo-go/blob/master/CONTRIBUTING.md before commit pull request.
   -->
   
   **What this PR does**: 
   
    **dubbo-go tls  support:**
   - [x] dubbo protocol support (getty server&client)  
   - [ ]  dubbo3 protocol support  (triple server&client) ,need to  modify  [triple ](github.com/dubbogo/triple)
   - [x] grpc protocol  support (grpc server&client)  
   
   **test samples for above:**  
   - [x] dubbo protocol
   - [ ] dubbo3 protocol 
   - [x] grpc protocol
   - [ ] using  xds creds 
   
   **next:** 
   - [ ] mTLS support  
   
   **Which issue(s) this PR fixes**: 
   Fixes #2054
   
   **You should pay attention to items below to ensure your pr passes our ci test**
   We do not merge pr with ci tests failed
   
   - [ ] All ut passed (run 'go test ./...' in project root)
   - [ ] After go-fmt ed , run 'go fmt project' using goland.
   - [ ] Golangci-lint passed, run 'sudo golangci-lint run' in project root.
   - [ ] Your new-created file needs to have [apache license](https://raw.githubusercontent.com/dubbogo/resources/master/tools/license/license.txt) at the top, like other existed file does.
   - [ ] All integration test passed. You can run integration test locally (with docker env). Clone our [dubbo-go-samples](https://github.com/apache/dubbo-go-samples) project and replace the go.mod to your dubbo-go, and run 'sudo sh start_integration_test.sh' at root of samples project root. (M1 Slice is not Support)


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


[GitHub] [dubbo-go] AlexStocks commented on a diff in pull request #2073: tls support: dubbo/dubbo3/grpc protocol

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on code in PR #2073:
URL: https://github.com/apache/dubbo-go/pull/2073#discussion_r996295798


##########
config/tls_config.go:
##########
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package config
+
+import (
+	"crypto/tls"
+	"crypto/x509"
+	"io/ioutil"
+)
+import (
+	"google.golang.org/grpc/credentials"
+)
+
+type TLSConfig struct {

Review Comment:
   add comment for this file's struct & funcs



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


[GitHub] [dubbo-go] binbin0325 commented on a diff in pull request #2073: tls support: dubbo/dubbo3/grpc protocol

Posted by GitBox <gi...@apache.org>.
binbin0325 commented on code in PR #2073:
URL: https://github.com/apache/dubbo-go/pull/2073#discussion_r995481117


##########
config/tls_config.go:
##########
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package config
+
+type TLSConfig struct {
+	CACertFile    string ` yaml:"ca_cert_file" json:"ca_cert_file" property:"ca_cert_file"`

Review Comment:
   trim space



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


[GitHub] [dubbo-go] AlexStocks merged pull request #2073: tls support: dubbo/dubbo3/grpc protocol

Posted by GitBox <gi...@apache.org>.
AlexStocks merged PR #2073:
URL: https://github.com/apache/dubbo-go/pull/2073


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


[GitHub] [dubbo-go] AlexStocks commented on a diff in pull request #2073: tls support: dubbo/dubbo3/grpc protocol

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on code in PR #2073:
URL: https://github.com/apache/dubbo-go/pull/2073#discussion_r991821494


##########
protocol/grpc/client.go:
##########
@@ -27,13 +27,16 @@ import (
 import (
 	"github.com/dubbogo/gost/log/logger"
 
-	"github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc"
-
-	"github.com/opentracing/opentracing-go"
-
 	"google.golang.org/grpc"
 
+	"google.golang.org/grpc/credentials"
+	"google.golang.org/grpc/credentials/insecure"
+
 	"gopkg.in/yaml.v2"
+
+	"github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc"

Review Comment:
   把 github.com 相关项目放在一块,google.golang.org 的放在一块,整理下



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


[GitHub] [dubbo-go] codecov-commenter commented on pull request #2073: tls support: dubbo/dubbo3/grpc protocol

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2073:
URL: https://github.com/apache/dubbo-go/pull/2073#issuecomment-1274105443

   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/2073?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2073](https://codecov.io/gh/apache/dubbo-go/pull/2073?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2301238) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/19668c019886bd6b0daa7846bd8aa6f382b203c1?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (19668c0) will **decrease** coverage by `0.17%`.
   > The diff coverage is `19.14%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##              3.0    #2073      +/-   ##
   ==========================================
   - Coverage   44.68%   44.51%   -0.18%     
   ==========================================
     Files         281      281              
     Lines       16836    16876      +40     
   ==========================================
   - Hits         7524     7512      -12     
   - Misses       8522     8574      +52     
     Partials      790      790              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/2073?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [config/protocol\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29uZmlnL3Byb3RvY29sX2NvbmZpZy5nbw==) | `50.00% <ø> (ø)` | |
   | [config/reference\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29uZmlnL3JlZmVyZW5jZV9jb25maWcuZ28=) | `31.03% <0.00%> (-0.95%)` | :arrow_down: |
   | [config/service\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29uZmlnL3NlcnZpY2VfY29uZmlnLmdv) | `52.09% <0.00%> (-0.96%)` | :arrow_down: |
   | [config/ssl\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29uZmlnL3NzbF9jb25maWcuZ28=) | `100.00% <ø> (ø)` | |
   | [remoting/getty/config.go](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3RpbmcvZ2V0dHkvY29uZmlnLmdv) | `66.32% <ø> (ø)` | |
   | [remoting/getty/getty\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3RpbmcvZ2V0dHkvZ2V0dHlfc2VydmVyLmdv) | `47.74% <0.00%> (-3.20%)` | :arrow_down: |
   | [remoting/getty/getty\_client.go](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3RpbmcvZ2V0dHkvZ2V0dHlfY2xpZW50Lmdv) | `43.93% <14.28%> (-2.10%)` | :arrow_down: |
   | [protocol/grpc/client.go](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJvdG9jb2wvZ3JwYy9jbGllbnQuZ28=) | `68.18% <28.57%> (-5.16%)` | :arrow_down: |
   | [protocol/grpc/server.go](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJvdG9jb2wvZ3JwYy9zZXJ2ZXIuZ28=) | `71.60% <41.66%> (-5.54%)` | :arrow_down: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `42.70% <50.00%> (ø)` | |
   | ... and [2 more](https://codecov.io/gh/apache/dubbo-go/pull/2073/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


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