Approach overview
I assess microservice communications by validating authentication, confidentiality, authorization, network controls, and certificate hygiene — in that order — using automated scans, manual review, and runtime tests.
Key areas to evaluate
- mTLS: Verify mutual TLS enforced between pods/services; confirm client and server cert validation, cipher suites, TLS versions, and perfect forward secrecy. Test by attempting connections with invalid/expired certs and TLS downgrade attempts.
- Service mesh considerations: If using Istio/Linkerd/Consul, check mesh-wide mTLS vs. per-namespace, sidecar injection scope, control plane RBAC, and mesh policy enforcement (destination rules, peer authentication). Validate fallback behaviors when sidecars are absent.
- Identity & authorization: Review Kubernetes ServiceAccounts mapped to workloads, use of federated identities (SPIFFE/SPIRE), and short-lived service identity tokens. Test least-privilege RBAC, token audience/exp claims, and impersonation attempts.
- NetworkPolicies: Confirm egress/ingress policies restrict pod-to-pod flows; simulate lateral movement attempts, and ensure default deny where appropriate.
- Ingress/Egress controls: Validate API gateway/TLS termination points, WAF rules, and egress proxies for outbound filtering and DNS/HTTP allowlists.
- Certificate lifecycle management: Assess automated issuance/rotation (cert-manager/SPIRE), CA trust boundaries, revocation processes (CRL/OCSP), and monitoring/alerting for expiry.
Prioritized testing checklist
- Ensure mTLS enforced cluster/namespace-wide; attempt invalid-cert connections.
- Confirm service identity binds to SA and SPIFFE; test token replay/impersonation.
- Validate RBAC least privilege for control plane and service accounts.
- Test NetworkPolicies: default deny, and allow-only-needed paths.
- Inspect sidecar configs: health, restart behavior, bypass risks.
- Verify ingress TLS termination, HTTP->HTTPS redirects, and WAF rules.
- Confirm egress filtering and DNS protection.
- Check cert rotation automation, expiry alerts, and revocation paths.
- Run chaos tests: simulate control-plane failure and certificate expiry to observe fallback.
- Review logging/observability for mTLS failures and audit trails.
Notes on tooling & metrics
Use kube-bench, conftest, Istioctl/Linkerd CLI, cert-manager audits, tls-scan, and custom e2e tests. Measure: percent of encrypted flows, token lifetime, policy coverage, and mean time to rotate/revoke certificates.