openconfig / gnmi

gRPC Network Management Interface
Apache License 2.0
464 stars 196 forks source link

How do i disable TLS in gnmi_cli as tls is not implemented in server side. #10

Closed dparameswarappa closed 6 years ago

dparameswarappa commented 6 years ago

How do i disable TLS in gnmi_cli as tls is not implemented on our telemetry server side yet. I see this error:

*./gnmi_cli --address=10.33.83.104:6702 --query state/port[port-id=]/statistics -qt s -insecure**

E0928 14:27:45.630926 5471 gnmi_cli.go:186] cli.QueryDisplay: sendQueryAndDisplay(ctx, {Addrs:[10.33.83.104:6702] Target: Replica:0 Discard:false Queries:[[state port[port-id=*] statistics]] Type:stream Timeout:30s NotificationHandler: ProtoHandler: Credentials: TLS:0xad55c0 Extra:map[]}, &{PollingInterval:30s StreamingDuration:0s Count:0 countExhausted:false Delimiter:/ Display:0x403ae0 DisplayPrefix: DisplayIndent: DisplayType:group DisplayPeer:false Timestamp: DisplaySize:false Latency:false ClientTypes:[]}): client "gnmi" : Dialer(10.33.83.104:6702, 30s): tls: first record does not look like a TLS handshake client "openconfig" : Dialer(10.33.83.104:6702, 30s): tls: first record does not look like a TLS handshake

gcsl commented 6 years ago

TLS is required by the specification which is why the published tool does not support connecting without it. The -insecure option allows the server to use a self-signed certificate and does not validate. It should be straightforward to enable TLS on the server. For testing, you could disable TLS by modifying the code for the CLI locally, but we don't intend to have this option in the published code to avoid introducing confusion on whether TLS is required or not.

I browsed https://github.com/dparameswarappa/gRPC_CLient_Server briefly and also noticed that it references openconfig.proto. This protocol buffer definition is deprecated in favor of gnmi.proto and will be removed in the future. Please consider migrating to the current definition that matches the specification.