Never Trust, Always Verify
Traditional Security (Perimeter):
Inside network = trusted
Outside network = untrusted
Problem: Once attacker is inside, they have access to everything.
Zero Trust Security:
Trust nothing by default
Verify every request
Assume breach has occurred
Zero Trust Principles:
| Principle | Implementation |
|---|---|
| Verify explicitly | Authenticate every request |
| Least privilege | Minimal permissions needed |
| Assume breach | Limit blast radius |
| Encrypt everything | TLS everywhere, even internal |
Service-to-Service Authentication (mTLS):
# Istio mTLS configuration
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: default
namespace: production
spec:
mtls:
mode: STRICT # Require mTLS for all traffic
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: order-service-policy
namespace: production
spec:
selector:
matchLabels:
app: order-service
rules:
-from:
-source:
principals:["cluster.local/ns/production/sa/api-gateway"]
to:
-operation:
methods:["GET","POST"]
paths:["/orders/*"]
Only api-gateway service account can call order-service.
Controlling Traffic Flow
Default Deny:
# Deny all ingress by default
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-ingress
namespace: production
spec:
podSelector:{}
policyTypes:
- Ingress