Apache Kafka Streaming (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)
End-to-End Kafka Security Architecture: mTLS, SASL/SCRAM, and ACLs.
senior LevelCode ExampleSecurity & AuthSystem DesignApache Kafka
In Simple Words: Enterprise production clusters must enforce security at three distinct layers:
- Wire Encryption & Mutual Authentication (mTLS):
- Uses X.509 SSL certificates to encrypt network traffic between clients and brokers and between brokers.
- Brokers authenticate client identity via client certificate subjects.
- User Authentication (SASL/SCRAM-SHA-512 or SASL/OAUTHBEARER):
- Clients authenticate using salted hashed credentials or short-lived enterprise OAuth2/OIDC JWT tokens.
- Authorization via Access Control Lists (ACLs):
- Enforces principle of least privilege using Kafka Authorizer:
bash
kafka-acls.sh --bootstrap-server localhost:9092 --add \ --allow-principal User:billing-service \ --operation Read --operation Describe \ --topic customer-invoices --group billing-group
- Enforces principle of least privilege using Kafka Authorizer: