Enable the Authorizer
allow.everyone.if.no.acl.found=false, every action needs an explicit ACL (super users excepted). Create ACLs for all applications before switching on, or you will cut them off.
What an ACL Contains
An ACL says: Principal P is Allowed/Denied to perform Operation O on Resource R from Host H.
| Part | Values |
|---|---|
| Principal | User:orders-service (from SASL username or certificate mapping) |
| Resource type | Topic, Group (consumer group), Cluster, TransactionalId, DelegationToken |
| Pattern | LITERAL (exact name) or PREFIXED (all names starting with a prefix) |
| Operation | Read, Write, Create, Delete, Alter, Describe, DescribeConfigs, AlterConfigs, IdempotentWrite, ClusterAction, All |
| Permission | Allow or Deny (deny wins over allow) |
| Host | * or a specific IP |
Recipes
Producer that writes to shop.orders.created.v1 (with idempotence):
Consumer in group email-service reading the topic:
Team namespace with prefixed ACLs, so a team can manage its own topics:
Transactional producer needs rights on its transactional.id:
Inspect and Remove
Least-Privilege Practice
- One principal per application (not a shared account) so you can audit and revoke
- Give producers only
Write, consumers onlyRead, and keep admin rights with a few people and automation - Use prefixed ACLs for team topics, literal ACLs for sensitive topics
- Keep ACLs in code (Terraform, Strimzi
KafkaUser, scripts) and review them like any other change - Keep the number of super users minimal, and protect their credentials
Client Quotas
Quotas protect the cluster from clients that send or fetch too much, or create too many requests. They can be set per user, per client id, or both.
Audit Logging
- Authorizer decisions are logged at INFO/DEBUG level in
kafka-authorizer.log(configure log4j2). Denials are most important - Request logs (
kafka.request.logger) show who sent what - Forward logs to a central system and alert on repeated authorization failures or unexpected principals
- For compliance, add an external audit layer or use a platform that provides audit events
Hardening Checklist
| Area | Action |
|---|---|
| Network | Private subnets, firewall rules allow only needed ports (9092 from app subnets, 9093 only between controllers and brokers), no public IPs |
| Encryption | TLS 1.2 or higher on all listeners including controller and inter-broker. Disk encryption on data volumes |
| Authentication | SASL or mTLS for every client, no anonymous access |
| Authorization | Authorizer on, default deny, least privilege ACLs, few super users |
| Secrets | No passwords in plain config files. Use secrets managers, config providers, short-lived credentials |
| Topics | auto.create.topics.enable=false, creation policy, quotas |
| Software | Supported Kafka and Java versions, security patches applied in rolling fashion |
| Host | Dedicated OS user, minimal permissions on data and config directories, SSH restricted |
| Monitoring | Alerts on auth failures, certificate expiry, unusual traffic, new ACLs |
| Data | Do not put raw secrets or unnecessary personal data in events. Use field encryption or tokenisation for sensitive fields |
Describe or Group Read permissions are the most common surprises.
Conclusion
Enable the authorizer with default deny, create one principal per application, grant only the needed operations (using --producer and --consumer shortcuts and prefixed ACLs), add quotas, log authorization decisions and follow a hardening checklist.

