In this example https://github.com/grpc/grpc-java/blob/master/interop-testing/src/test/java/io/grpc/testing/integration/TlsTest.java you see that the TLS client connection has various TLS parameters such as
.negotiationType(NegotiationType.TLS)
.sslContext(sslContext)
But my app has thus far used https://github.com/grpc/grpc-java/blob/master/core/src/main/java/io/grpc/ManagedChannelBuilder.java which by default seems to support TLS. The only parameter it takes is "usePlaintext" which can turn off TLS.
Note: I have installed OpenSSL on the machine, as recommended by https://grpc.io/docs/guides/auth.html
This page does state:
If the issuing certificate authority is not known to the client then a properly configured SslContext or SSLSocketFactory should be provided to the NettyChannelBuilder or OkHttpChannelBuilder, respectively.
So perhaps you can only use ManagedChannelBuilder
when the issuing ca is known to the client... but I'm not sure what that means. Perhaps it means the cacert is on the jvm's keystore?
Why do I not have to specify TLS parameters on a Managed
channel builder?