Interview › Istio & Service Mesh
What is a PeerAuthentication policy?
Istio & Service Mesh · Basic level
Answer
A PeerAuthentication policy controls how workloads accept peer connections, especially mTLS mode. It can be applied mesh-wide, namespace-wide, or workload-specific, and it determines whether inbound traffic must use mutual TLS.
Technical explanation
PeerAuthentication is about peer identity and transport authentication, not end-user JWT authentication.
Workload-specific policies use selectors; namespace policies without selectors apply broadly in that namespace.
It is commonly used to move from PERMISSIVE to STRICT mTLS in stages.
Hands-on example
Namespace STRICT example:
apiVersion: security.istio.io/v1
kind: PeerAuthentication
metadata:
name: default
namespace: payments
spec:
mtls:
mode: STRICTValidate:
$ istioctl analyze -n payments
$ istioctl authn tls-check deploy/api -n paymentsPreparing for an interview?
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Istio & Service Mesh interview questions
- What is a RequestAuthentication policy, and how does it validate JWTs?
- What is an AuthorizationPolicy, and how do you enforce service-to-service access control?
- What is mutual TLS (mTLS), and how does Istio provide it automatically?
- What is outlier detection, and how does it eject unhealthy hosts?
- What are timeouts in Istio, and how do they interact with retries?
- How do you inject delays or aborts to test resilience with Istio?
- What is fault injection in Istio, and why would you use it?
- How does Istio do request routing based on headers or paths?