PeerAuthentication: Enforce mTLS
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: default
namespace: production
spec:
mtls:
mode: STRICT
STRICT: all traffic into the namespace must be mTLS — plain HTTP is rejected.
PERMISSIVE: accept both mTLS and plaintext (migration mode).
DISABLE: no mTLS requirement.
AuthorizationPolicy: add RBAC on top:
spec:
action: ALLOW
rules:
- from: [{ source: { principals: ["cluster.local/ns/payment/sa/checkout"] } }]
to: [{ operation: { methods: ["POST"], paths: ["/v1/charge"] } }]