TIS0502 - Namespace-Wide DestinationRule
Disabling mTLS is Missing
A DestinationRule
disabling namespace-wide mTLS is missing.
DestinationRule
and PeerAuthentication
for mTLSTo prevent unintended secure communication, either add a DestinationRule
disabling mTLS at the namespace level or update PeerAuthentication
to a compatible mode (STRICT
or PERMISSIVE
) to allow proper connectivity between services.
Examples
-
No Namespace-Wide
DestinationRule
Configured to Disable mTLS# No namespace-wide `DestinationRule` disabling mTLS present in the namespace configuration
Explanation: Without a
DestinationRule
explicitly disabling mTLS, services in the namespace may inadvertently attempt to use mTLS for communication, causing connectivity issues if the workloads are not prepared for secure communication.
Recommendation
Change the namespace/mesh-wide DestinationRule
to DISABLE
mode or update the PeerAuthentication
to allow mTLS with STRICT
or PERMISSIVE
mode.
-
Add Namespace-Wide
DestinationRule
to Disable mTLSCreate a
DestinationRule
in the target namespace to explicitly disable mTLS, ensuring that services communicate in plaintext.apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: namespace-disable-mtls
namespace: example-namespace
spec:
host: "*.example-namespace.svc.cluster.local"
trafficPolicy:
tls:
mode: DISABLEExplanation: This
DestinationRule
ensures that mTLS is disabled for all services within theexample-namespace
, allowing them to communicate in plaintext. -
Update
PeerAuthentication
to Allow mTLSIf the intention is to support both mTLS and plaintext communication, update the
PeerAuthentication
to usePERMISSIVE
mode.apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: permissive-peer-auth
namespace: example-namespace
spec:
mtls:
mode: PERMISSIVEExplanation: Setting the
PeerAuthentication
mode toPERMISSIVE
allows services to accept both mTLS and plaintext connections, making the communication flexible depending on the client capabilities.