# dabz/kafka-security-playbook architecture

> Architecture diagram of the GitHub repository dabz/kafka-security-playbook, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dabz/kafka-security-playbook
- Repository: https://github.com/dabz/kafka-security-playbook

## Overview

This repository is a Kafka security playbook: runnable Docker-based examples and configuration for authentication, TLS, authorization, and related platform features, rather than a single application. The principal documented workflow is to start an example environment, configure a Kafka client with that scenario’s credentials or certificates, and produce or consume messages through the broker. The graph preserves major scenarios visible in the tree; only the plain, SCRAM, and TLS flows are linked where the README excerpt documents them. Other scenario relationships are not verified from the sampled text.

Main entry points: [`scram`](https://github.com/dabz/kafka-security-playbook/tree/master/scram) (SCRAM auth), [`tls`](https://github.com/dabz/kafka-security-playbook/tree/master/tls) (TLS example)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Authentication examples"]
  node_plain["PLAIN auth"]
  node_scram["SCRAM auth"]
  node_kerberos["Kerberos auth"]
  node_multi_sasl["Multi-SASL"]
  node_ldap_auth["LDAP auth"]
  node_oauth["OAuth auth"]
end

subgraph group_transport["TLS and certificates"]
  node_tls["TLS example"]
  node_mtls_connect["Connect mTLS"]
  node_tls_ocrl["TLS with OC/CRL"]
  node_cert_builder["Certificate tools"]
end

subgraph group_authorization["Authorization examples"]
  node_acls["ACL examples"]
  node_rbac["RBAC example"]
  node_ldap["LDAP directory"]
end

subgraph group_platform["Platform features"]
  node_audit["Audit logging"]
  node_quotas["Quotas and metrics"]
  node_schema_registry["Schema Registry"]
  node_secure_jmx["Secure JMX"]
end

subgraph group_runtime["Example infrastructure"]
  node_broker["Kafka broker"]
  node_client["Kafka client"]
end

node_user(("Kafka user"))

node_user -->|"starts example"| node_plain
node_user -->|"starts example"| node_scram
node_user -->|"starts example"| node_tls
node_plain -->|"configures auth"| node_broker
node_plain -->|"configures client"| node_client
node_scram -->|"configures auth"| node_broker
node_scram -->|"configures client"| node_client
node_tls -->|"configures TLS"| node_broker
node_tls -->|"configures client"| node_client
node_user -->|"produces or consumes"| node_broker

click node_scram "https://github.com/dabz/kafka-security-playbook/tree/master/scram"
click node_kerberos "https://github.com/dabz/kafka-security-playbook/tree/master/kerberos"
click node_multi_sasl "https://github.com/dabz/kafka-security-playbook/tree/master/multi-sasl"
click node_ldap_auth "https://github.com/dabz/kafka-security-playbook/tree/master/ldap-auth"
click node_oauth "https://github.com/dabz/kafka-security-playbook/tree/master/oauth/kafka"
click node_tls "https://github.com/dabz/kafka-security-playbook/tree/master/tls"
click node_mtls_connect "https://github.com/dabz/kafka-security-playbook/tree/master/kafka-connect-mtls"
click node_tls_ocrl "https://github.com/dabz/kafka-security-playbook/tree/master/tls-with-ocrl"
click node_cert_builder "https://github.com/dabz/kafka-security-playbook/tree/master/ca-builder-scripts"
click node_acls "https://github.com/dabz/kafka-security-playbook/tree/master/acls"
click node_rbac "https://github.com/dabz/kafka-security-playbook/tree/master/rbac"
click node_ldap "https://github.com/dabz/kafka-security-playbook/tree/master/ldap"
click node_audit "https://github.com/dabz/kafka-security-playbook/tree/master/auditlog"
click node_quotas "https://github.com/dabz/kafka-security-playbook/tree/master/quotas"
click node_schema_registry "https://github.com/dabz/kafka-security-playbook/tree/master/schema-registry"
click node_secure_jmx "https://github.com/dabz/kafka-security-playbook/tree/master/secure-jmx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plain,node_scram,node_kerberos,node_multi_sasl,node_ldap_auth,node_oauth,node_user toneBlue
class node_tls,node_mtls_connect,node_tls_ocrl,node_cert_builder toneAmber
class node_acls,node_rbac,node_ldap toneMint
class node_audit,node_quotas,node_schema_registry,node_secure_jmx toneRose
class node_broker,node_client toneIndigo
```

## Components

### Authentication examples

- **PLAIN auth**
- [SCRAM auth](https://github.com/dabz/kafka-security-playbook/tree/master/scram): `scram`
- [Kerberos auth](https://github.com/dabz/kafka-security-playbook/tree/master/kerberos): `kerberos`
- [Multi-SASL](https://github.com/dabz/kafka-security-playbook/tree/master/multi-sasl): `multi-sasl`
- [LDAP auth](https://github.com/dabz/kafka-security-playbook/tree/master/ldap-auth): `ldap-auth`
- [OAuth auth](https://github.com/dabz/kafka-security-playbook/tree/master/oauth/kafka): `oauth/kafka`

### TLS and certificates

- [TLS example](https://github.com/dabz/kafka-security-playbook/tree/master/tls): `tls`
- [Connect mTLS](https://github.com/dabz/kafka-security-playbook/tree/master/kafka-connect-mtls): `kafka-connect-mtls`
- [TLS with OC/CRL](https://github.com/dabz/kafka-security-playbook/tree/master/tls-with-ocrl): `tls-with-ocrl`
- [Certificate tools](https://github.com/dabz/kafka-security-playbook/tree/master/ca-builder-scripts): `ca-builder-scripts`

### Authorization examples

- [ACL examples](https://github.com/dabz/kafka-security-playbook/tree/master/acls): `acls`
- [RBAC example](https://github.com/dabz/kafka-security-playbook/tree/master/rbac): `rbac`
- [LDAP directory](https://github.com/dabz/kafka-security-playbook/tree/master/ldap): `ldap`

### Platform features

- [Audit logging](https://github.com/dabz/kafka-security-playbook/tree/master/auditlog): `auditlog`
- [Quotas and metrics](https://github.com/dabz/kafka-security-playbook/tree/master/quotas): `quotas`
- [Schema Registry](https://github.com/dabz/kafka-security-playbook/tree/master/schema-registry): `schema-registry`
- [Secure JMX](https://github.com/dabz/kafka-security-playbook/tree/master/secure-jmx): `secure-jmx`

### Example infrastructure

- **Kafka broker**
- **Kafka client**

### Other components

- **Kafka user**

## Connections

- Kafka user → PLAIN auth: starts example (evidence: `README.md`)
- Kafka user → SCRAM auth: starts example (evidence: `README.md`)
- Kafka user → TLS example: starts example (evidence: `README.md`)
- PLAIN auth → Kafka broker: configures auth (evidence: `README.md`)
- PLAIN auth → Kafka client: configures client (evidence: `README.md`)
- SCRAM auth → Kafka broker: configures auth (evidence: `README.md`)
- SCRAM auth → Kafka client: configures client (evidence: `README.md`)
- TLS example → Kafka broker: configures TLS (evidence: `README.md`)
- TLS example → Kafka client: configures client (evidence: `README.md`)
- Kafka user → Kafka broker: produces or consumes (evidence: `README.md`)
