Skip to main content
InterviewHubPRO
Section Overview
Q31

Question 31 of 50

Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

62%
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:

  1. 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.
  2. User Authentication (SASL/SCRAM-SHA-512 or SASL/OAUTHBEARER):
    • Clients authenticate using salted hashed credentials or short-lived enterprise OAuth2/OIDC JWT tokens.
  3. 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