What is the easiest and fastest way to verify that mTLS is actually happening between the proxies of two services?
I can curl one service from another, but the only access logs I can see are within the receiving service, and at that point, its proxy had already changed it back into a plain HTTP request.
The proxy logs do not show me anything. Is there something I can tweak for their logs to show me the TLS activity happening within them?
You can try something like: istioctl x describe pod echoserver-v1-5f5b64d78-zzzz -n [namespace]
Service: echoserver
Port: http 8080/HTTP targets pod port 8080
DestinationRule: echoserver for “echoserver”
Traffic Policy TLS Mode: ISTIO_MUTUAL
Pod is STRICT and clients are ISTIO_MUTUAL
Changing settings to be Permissive I got (snippet of last 2 lines)
Traffic Policy TLS Mode: DISABLE
Pod is PERMISSIVE and clients are DISABLE
Doh! True. However, I didn’t find UPSTREAM equivalents in the doc. I can try them.
Also, if that’s the case, how would I specify two separate formats? A service can be a client or a server at any given time. And pardon me if the answer is obvious.
Yeah, there are some limitations to the envoy access log (such as lack of conditionals I believe and some upstream TLS properties have not been implemented). One way around that is to customize the access log format using EnvoyFilter (see the wiki).
There are also some subtle differences between upstream and downstream. You cannot check that the server validates certificates on the client side, even if the server requests a client certificate, for example. And similarly, you cannot tell that the client validates the server certificate on the server side.
Did anyone get to the bottom of why the Subjects are missing in the logs? With Istio 1.6.8 I can see the Issuer in the access logs but not the Subjects. Just checked 1.6.14 and I see the same behaviour.