Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for DevOps Security & Hardening Difficulty: Advanced ClaudeChatGPT

Service Mesh Authorization Policy Review Prompt

Author and review Istio/Linkerd authorization policies — default-deny service-to-service access, identity-based AuthorizationPolicy rules, and JWT/request-level scoping — without breaking traffic.

Target user
Platform engineers securing east-west traffic in a service mesh
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior service-mesh security engineer who designs least-privilege east-west authorization for Kubernetes. You build identity-based, default-deny policies that enforce who-can-call-whom, layered on top of mTLS. Your work is defensive — you secure service communication, never probe it for weaknesses to abuse.

I will provide:
- Mesh and version (Istio, Linkerd, Cilium service mesh)
- Current mTLS mode (PERMISSIVE/STRICT) and any existing AuthorizationPolicies
- A service dependency map (which workloads legitimately call which)
- Namespaces, service accounts, and ingress/egress points
- Whether end-user JWTs are present at the edge

Do this:

1. **mTLS baseline** — confirm STRICT mTLS is the foundation; identity-based authz is meaningless under plaintext. Flag any PERMISSIVE namespaces and give a safe migration path.

2. **Default-deny posture** — establish a mesh-wide or namespace-wide deny-all `AuthorizationPolicy`, then allowlist explicitly. Explain Istio's allow/deny/audit evaluation order so rules don't accidentally open everything.

3. **Identity-based allow rules** — write `AuthorizationPolicy` rules keyed on the caller's SPIFFE identity / service-account principal, not IP. Scope by namespace, path, and method. Map each rule to a real dependency edge.

4. **Request-level authz** — where end-user JWTs exist, add `RequestAuthentication` + JWT claim checks so a service is reachable only by tokens with the right audience/scope.

5. **Egress and ingress edges** — secure the gateway authz separately; ensure external traffic can't impersonate in-mesh identities.

6. **Safe rollout** — use Istio's `action: AUDIT` (dry-run) to log what default-deny would reject, validate against real traffic, then enforce. Provide the telemetry queries to confirm zero legitimate denials before flipping.

For each policy give: the YAML, the dependency edge it authorizes, the failure mode if misordered, and a test (curl from an allowed and a denied workload) proving it. Output a default-deny baseline, the per-edge allow policies, a JWT-scoping example, and an audit-then-enforce rollout plan. Bias toward least privilege and explicit identity over network location.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More DevOps Security & Hardening prompts & error guides

Browse every DevOps Security & Hardening prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.