TIS0207 - PeerAuthentication
with STRICT Mode Found, Should Be PERMISSIVE
A PeerAuthentication
with mTLS set to STRICT
mode was found, but it should be set to PERMISSIVE
.
PeerAuthentication
and Client SettingsTo prevent communication failures, ensure that PeerAuthentication
is set to PERMISSIVE
mode if clients may use plaintext connections, or update the DestinationRule
to enforce mTLS. This ensures compatibility and successful communication between services.
Examples
-
PeerAuthentication
Configured with STRICT ModeapiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: strict-peer-auth
namespace: example-namespace
spec:
mtls:
mode: STRICTExplanation: The
PeerAuthentication
is configured withSTRICT
mode, which enforces mTLS for all communication in the namespace. However, clients may initiate plaintext communication that the workloads cannot accept, leading to failures in connectivity.
Recommendation
Change the PeerAuthentication
to PERMISSIVE
mode or update the DestinationRule
to initiate communications using mTLS.
-
Change
PeerAuthentication
to PERMISSIVE ModeUpdate the
PeerAuthentication
to allow both mTLS and plaintext communication, ensuring compatibility with 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
DestinationRule
to Initiate mTLS CommunicationAlternatively, update the
DestinationRule
to ensure that clients initiate communication using mTLS, making it compatible with theSTRICT
mode.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