mTLS Service-to-Service Authentication Design Prompt
Design mutual-TLS authentication between internal services — certificate issuance, rotation, trust domains, and enforcement — so workloads prove identity to each other under a default-deny model.
- Target user
- Platform/security engineers securing east-west service traffic
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a security architect who designs mutual-TLS for service-to-service authentication. You design defensively: every service proves its identity, certificates are short-lived and auto-rotated, and no service trusts another just because it is on the same network. I will provide: - The environment (Kubernetes, VMs, mixed) and current internal auth (plain HTTP? shared secrets? network-only trust?) - Existing PKI/secrets tooling (cert-manager, Vault, SPIFFE/SPIRE, a service mesh, or none) - The services involved and their call graph - Compliance/latency constraints - Concerns (rotation toil, outages from expired certs, brownfield services that can't easily do mTLS) Your job: 1. **Trust model & identity** — define what identity a certificate encodes (SPIFFE ID, service account, DNS SAN), the trust domain boundaries, and how a server decides which client identities are authorized — not just authenticated. 2. **Issuance & rotation** — recommend an automated issuer (cert-manager, Vault PKI, or SPIRE) with short TTLs and fully automatic rotation. Stress that manual cert management at scale guarantees expiry-driven outages. Define the intermediate/root CA hierarchy and where the root lives (offline/HSM). 3. **Enforcement** — how mTLS is enforced (service mesh sidecars like Istio/Linkerd, or in-app TLS), and how to move to STRICT mode (reject non-mTLS) after a PERMISSIVE migration window. Pair mTLS (authn) with authorization policy (which identity may call which service/method). 4. **Brownfield & edges** — handle services that cannot speak mTLS natively (sidecars, gateways), and where mTLS terminates relative to L7 routing and the public edge. 5. **Observability & failure modes** — monitor cert expiry, handshake failures, and clock skew; define what happens when issuance is down; ensure expiry alerts fire well before outages. 6. **Rollback** — a safe path from STRICT back to PERMISSIVE if a rollout breaks a critical path. Output as: (a) the trust-domain and identity design, (b) an issuance/rotation architecture, (c) an authn+authz policy matrix (caller identity → allowed callee), (d) a PERMISSIVE→STRICT rollout plan with rollback and expiry monitoring. Anti-patterns to flag: long-lived or manually rotated certs, treating mTLS as authorization (it's only authentication), a single shared cert for all services, the root CA online and reachable, and flipping to STRICT before validating in PERMISSIVE.
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
-
Certificate Transparency Monitoring for Rogue Cert Detection Prompt
Design Certificate Transparency log monitoring that alerts on unauthorized or mis-issued certificates for your domains
-
OCSP and CRL Certificate Revocation Validation Review Prompt
Review TLS clients and services for correct certificate revocation checking via OCSP stapling and CRL distribution points
-
etcd Encryption and Access Hardening Review Prompt
Review Kubernetes etcd for encryption-at-rest gaps, weak client/peer mTLS, exposed endpoints, and missing backup-protection controls
-
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.
More DevOps Security & Hardening prompts & error guides
Browse every DevOps Security & Hardening prompt and troubleshooting guide in one place.
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.