I am trying to implement TLS authentication.
On server side, I have configured gNMI server on mimic(documented here). gNMI is build on top of gRPC.
On client side, I am making use of openconfig's gnmic utility to collect data.
I have root certificate copied on gnmic side and corresponding TLS certificate and key on gNMI server in mimic.
When I use insecure connection, things work fine. But when I use tls-ca option with gnmic command:
gnmic -u admin -p admin --tls-ca /path/to/root-ca -a <ip>:<port> capabilities
I get error:
target ".......", capabilities request failed: failed to create a gRPC client for target ......: context deadline exceeded
Error: one or more requests failed
I am not able to find the root cause. Any input is appreciated.
PS: With -d option, I see this:
transport: authentication handshake failed: tls: first record does not look like a TLS handshake