...
What doesn't seem right:
- A server interceptor reports that ServerCall.getSecurityLevel() returns NONE,
- When I configure Istio to enforce STRICT mTLS via a namespace wide PeerAuthentication resource, the client's connection to the server fails with: io.grpc.StatusException: UNAVAILABLE: Connection timeout for priority outbound|8443||server.kotlin-grpc-xds.svc.cluster.local[child1]
--
You received this message because you are subscribed to a topic in the Google Groups "grpc.io" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grpc-io/e20VVBIPd7M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/3e513ace-30e7-4a7d-8023-dde3a904be3cn%40googlegroups.com.
Thanks for getting back to me, Sanjay. As far as I can tell, my client and server are both using the appropriate Xds credentials:The client code is at https://github.com/wfhartford/kotlin-grpc-xds/blob/18598a7e9210be7265bc753b136cb424d087ab77/client/src/main/kotlin/ca/cutterslade/kotlingrpcxds/client/main.kt#L26
Grpc.newChannelBuilder(targetUrl, XdsChannelCredentials.create(InsecureChannelCredentials.create())).build()The server code is at https://github.com/wfhartford/kotlin-grpc-xds/blob/18598a7e9210be7265bc753b136cb424d087ab77/server/src/main/kotlin/ca/cutterslade/kotlingrpcxds/server/main.kt#L45XdsServerBuilder.forPort(8443, XdsServerCredentials.create(InsecureServerCredentials.create()))The insecure credentials provided to both a fallback, and it looks like the sample you linked is doing the same thing.
I'm not sure why, but I'm guessing that the secure connection is failing and it is falling back to insecure.
Based on the example you linked, the only other requirement is that the GRPC_XDS_BOOTSTRAP environment variable is set, which is being done by the istio sidecar; kubectl describe pod shows that both the client and server containers have two environment variables injected:GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT: true
GRPC_XDS_BOOTSTRAP: /etc/istio/proxy/grpc-bootstrap.json
There are only two warning lines being logged from both the client and the server:14:51:55.314 [main] WARN i.g.n.s.io.netty.bootstrap.Bootstrap - Unknown channel option 'SO_KEEPALIVE' for channel '[id: 0xba433026]'
14:51:55.314 [main] WARN i.g.n.s.io.netty.bootstrap.Bootstrap - Unknown channel option 'io.grpc.netty.shaded.io.netty.channel.epoll.EpollChannelOption#TCP_USER_TIMEOUT' for channel '[id: 0xba433026]'
Hi,My suggestion that the connection was falling back to insecure was not evidence based, I'm still trying to wrap my head around how all this is working.
The target address on the client side is using the xds:/// prefix.I've enabled trace level logging on the io.grpc.xds logger but I'm not seeing any additional log messages, have I missed something? I'm using slf4j and logback and have the SLF4JBridgeHandler installed.
The grpc-bootstrap.json file seems reasonable, though I don't know just what it all means (I've attached the content). The three pem files referenced in certificate_providers point to real files containing apparently valid PEM content.You've mentioned a couple times enabling vs. disabling mTLS, are you referring to some specific setting on the client and/or server, or in istio somewhere? My understanding has been that with the Xds server and channel, both will use mTLS unless I specifically set the mtls mode to DISABLE in a PeerAuthentication resource, which I haven't done. I've experimented with mtls mode set to PERMISSIVE and STRICT. Is the problem something as simple as not enabling mTLS somewhere?
Thanks again,Wesley
--
You received this message because you are subscribed to a topic in the Google Groups "grpc.io" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grpc-io/e20VVBIPd7M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/5a062461-2c73-4475-b99c-ddfe43a569e6n%40googlegroups.com.