Interview › Istio & Service Mesh
What is an AuthorizationPolicy, and how do you enforce service-to-service access control?
Istio & Service Mesh · Basic level
Answer
AuthorizationPolicy enforces access control for workloads. It can allow, deny, or audit traffic based on source workload identity, namespace, principals, HTTP methods, paths, ports, IP blocks, and JWT claims.
Technical explanation
mTLS gives authenticated workload identity; AuthorizationPolicy uses that identity to enforce least privilege.
DENY policies are evaluated carefully because a broad DENY can break traffic across a namespace.
Policies should be tested with dry run or limited scope before production enforcement.
Hands-on example
Allow only frontend to call orders:
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: allow-frontend
namespace: orders
spec:
selector:
matchLabels:
app: orders
action: ALLOW
rules:
- from:
- source:
principals: [cluster.local/ns/frontend/sa/frontend]
to:
- operation:
methods: [GET, POST]Preparing 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 a PeerAuthentication policy?
- 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?