openGemini / opengemini-client-go

CNCF openGemini Go Client Library
https://opengemini.org/
Apache License 2.0
24 stars 17 forks source link

config.TlsEnabled 配置歧义 #85

Closed wolfbolin closed 2 months ago

wolfbolin commented 4 months ago

https://github.com/openGemini/opengemini-client-go/blob/49423902a3ca16ac35fa57265f70914d470a964d/opengemini/client_impl.go#L90-L109

TLSClientConfig=nil 即可表示Tls关闭,无需根据TlsEnabled选择性创建Client对象 TlsEnabled=False config.TlsConfig=&tls.Config{InsecureSkipVerify: true} 时行为可能不符合预期

xuthus5 commented 4 months ago

config.TlsEnabled controls the Transport and gives it a tls.Config. If TlsEnable is false, the tls.Config will not be passed to the Transport. also, if TlsEnable is configured, but tls.Config is nil, we will continue to use TCP, which is a client configuration error, not the SDK.

https://github.com/openGemini/opengemini-client-go/blob/49423902a3ca16ac35fa57265f70914d470a964d/opengemini/client_impl.go#L105

wolfbolin commented 4 months ago

If I want use http connect, but http upgrade to https automatic. I need a config to skip verify.

xuthus5 commented 4 months ago

services that can be upgraded to HTTPS services by the gateway or services are considered as HTTPS services ,cannot be configured as HTTP services on the client.

shoothzj commented 4 months ago

I think openGemini server doesn't support startTls yet.

wolfbolin commented 4 months ago

I think openGemini server doesn't support startTls yet.

If my openGemini server is working behind nginx or other reverse proxy server. It will behave differently than a directly connected service.

shoothzj commented 2 months ago

After invest to java,go,cpp code, I am considering to make tlsConfig optional in sdk's implement, so that we can remove tlsEnabled in go sdk @xuthus5 @hiiiik