Kafka TLS, SASL & ACL Security Hardening Prompt
Harden a Kafka cluster end to end — TLS encryption, SASL authentication, and least-privilege ACLs with per-principal scoping — and produce a phased rollout that avoids locking out clients.
- Target user
- SRE and security engineers
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior Kafka security engineer hardening a cluster, producing a plan to review before any change to a running deployment. I will provide: - Current security posture: whether listeners are plaintext, any existing TLS/SASL, and whether ACLs are enabled - The threat model: internal-only vs. internet-exposed, compliance requirements, and what must be encrypted (in transit, broker-to-broker) - The client landscape: producers, consumers, connectors, and admin tools, with their languages and how many teams own them - Identity infrastructure available (an existing CA/PKI, Kerberos, OIDC, secret manager) - Kafka version and deployment platform Your job: 1. **Design encryption in transit** — recommend TLS on client and inter-broker listeners, certificate issuance and rotation via the available PKI, and whether to require mutual TLS or pair TLS with SASL. 2. **Choose a SASL mechanism** — compare SASL mechanisms (SCRAM, mTLS-based identity, Kerberos, OAuth/OIDC) against the identity infrastructure and operational maturity, and recommend one with credential-rotation handling. 3. **Define principals and ACLs** — map each application to a distinct principal and write least-privilege ACLs (specific topic/group operations, no wildcard super-users for apps), explicitly avoiding shared credentials across teams. 4. **Sequence a safe rollout** — plan additive steps (add secured listeners alongside existing ones, migrate clients, then disable plaintext; enable ACLs in a permissive/allow.everyone bootstrap mode first), so no client is locked out mid-migration. 5. **Protect the control path** — secure the controller/inter-broker traffic and restrict admin operations to dedicated principals. 6. **Verify and audit** — list checks (denied-operation logs, connection authentication metrics) confirming clients authenticate and ACLs enforce as intended, plus a rotation runbook. Output: (a) TLS/encryption design, (b) SASL mechanism choice with rationale, (c) per-principal ACL model, (d) phased non-lockout rollout, (e) control-path hardening, (f) verification and rotation runbook. Advisory only; roll out on a staging cluster and migrate clients onto secured listeners before disabling plaintext or enforcing ACLs in production.
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
-
Kafka ZooKeeper to KRaft Migration Plan Prompt
Plan a staged migration from ZooKeeper-based Kafka to KRaft mode with version prerequisites, controller quorum design, rollback checkpoints, and validation at each phase.
-
Kafka Cluster Sizing & Capacity Planning Prompt
Size a Kafka cluster end to end — broker count, partition counts, retention, disk, memory, and network — for a target throughput, with headroom for spikes and broker failure.
-
Kafka Multi-Tenancy and Topic Naming Governance Prompt
Define a topic naming convention, ACL model, and quota boundaries for a shared multi-tenant Kafka cluster so tenants are isolated, discoverable, and enforceable by prefix.
-
Kafka Client Quota and Throttling Design Prompt
Design produce, fetch, and request-percentage quotas per user/client-id so one noisy tenant cannot saturate broker network or CPU and starve others on a shared cluster.
More Kafka prompts & error guides
Browse every Kafka 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.