Versions
AWS EKS version: 1.23
istioctl version
client version: 1.10.3
control plane version: 1.16.1
data plane version: 1.14.6
Issue
Mutual TLS connection between istio-ingress-gateway and workloads in other namespaces is not working
Description
We have workloads running in and EKS cluster in a namespace that is called transactions. On the other hand we have istio-ingress-gateway running in istio-system namespace. Traffic entering the cluster comes from an AWS ALB. The traffic path is follows:
client -> Cloudfront -> ALB -> istio-ingress-gateway (istio-system namespace) -> workload (transactions namespace)
In transactions namespace, we have a peerAuthentication policy to enable mTLS with permissive mode:
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: default
spec:
mtls: {}
We also have a destinationrule resource to configure outbound connection to use mTLS
kind: DestinationRule
metadata:
name: istio-mutual
namespace: transactions
spec:
host: '*.transactions.svc.cluster.local'
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
In istio-system namespace, istio-ingress-gateway is configured with TLS termination for inbound traffic coming from the ALB. This is configured with the following Gateway resource:
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*'
port:
name: https-port
number: 443
protocol: HTTPS
tls:
credentialName: credential
minProtocolVersion: TLSV1_2
mode: SIMPLE
Outbound traffic from istio-ingress-gateway is configured with a destinationrule to use mTLS
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: istio-mutual
namespace: istio-system
spec:
host: '*.svc.cluster.local'
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
When we want to enable strict mTLS in transactions namespace by updating the peerAuthentication policy. However, this breaks connections from the istio-ingress-gateway to the workloads in transactions namespace. This the behavior we observe:
- We update the peerAuthentication to strict mode
- Traffic still works fine between workloads in the transactions namespace
- Traffic from istio-ingress-gateway to the workloads in transactions namespace no longer works. Curl commands return the error:
curl: (56) Recv failure: Connection reset by peer
Our expectation here is that istio-ingress-gateway connects to workloads in the other namespace with mTLS, however this isn’t happening. Any idea what is the issue here?