TIS0208 - PeerAuthentication Enabling mTLS Found, Permissive Mode Needed
A PeerAuthentication enabling mTLS was found, but PERMISSIVE mode is required.
To ensure compatibility between services and clients that may not use mTLS, set PeerAuthentication to PERMISSIVE mode. Alternatively, update the DestinationRule to enforce mTLS with ISTIO_MUTUAL mode to maintain secure communication across the mesh.
Examples
-
PeerAuthenticationConfigured with STRICT ModeapiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: strict-peer-auth
namespace: example-namespace
spec:
mtls:
mode: STRICTExplanation: The
PeerAuthenticationis set toSTRICTmode, which enforces mTLS for all communication in the mesh. However, in this scenario,PERMISSIVEmode is required to allow both mTLS and plaintext communication, ensuring compatibility with clients that may not use mTLS.
Recommendation
Change the PeerAuthentication to enable PERMISSIVE mode for all workloads in the mesh or update the DestinationRule to enable mTLS with ISTIO_MUTUAL mode.
-
Change
PeerAuthenticationto PERMISSIVE ModeUpdate the
PeerAuthenticationto allow both mTLS and plaintext communication, providing flexibility for clients that do not use mTLS.apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: permissive-peer-auth
namespace: example-namespace
spec:
mtls:
mode: PERMISSIVE -
Update
DestinationRuleto Enforce mTLSAlternatively, update the
DestinationRuleto ensure clients initiate mTLS communication, making it compatible with the existingSTRICTmode.apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: mtls-destination-rule
namespace: example-namespace
spec:
host: "my-service.example-namespace.svc.cluster.local"
trafficPolicy:
tls:
mode: ISTIO_MUTUAL