Kafka amq security

From RedHatProductSecurity/prodsec-skills · View interactive version

Kafka amq security is an AI agent skill from the GitHub repository RedHatProductSecurity/prodsec-skills. Secure Kafka and AMQ Streams deployments with encryption, authentication, and authorization. Use when building, reviewing, or auditing Kafka broker configuration, AMQ Streams custom resources, or Kafka client connectivity.

How to use this skill

Skill file

Kafka and AMQ Streams Security

Encryption

By default, Kafka transmits data in plaintext, leaving it vulnerable to man-in-the-middle attacks.

AMQ Streams Encryption

AMQ Streams encrypts communication between brokers and operators using TLS by default. Client encryption depends on Kafka listener configuration:

Authentication

Kafka Authentication

Use SSL or SASL for client-to-broker and broker-to-broker authentication:

| Method | Use Case |

|---|---|

| SSL (mutual TLS) | Most common for managed services; two-way certificate authentication |

| SASL SCRAM-SHA-512 | Password-based; suitable for environments without certificate infrastructure |

| SASL Kerberos | Enterprise environments with existing Kerberos infrastructure |

| OAuth 2.0 | Token-based; integrates with RHSSO/Keycloak |

AMQ Streams Authentication

Authentication is disabled by default in AMQ Streams. Enable it per listener in the Kafka custom resource:

Authorization

Access Control Lists (ACLs)

Limit which clients can read and write to specific topics:

AMQ Streams Authorization Options

| Mechanism | Description |

|---|---|

| Simple ACL | Default Apache Kafka ACL plugin; rules stored in ZooKeeper, loaded at broker startup |

| OAuth 2.0 / Keycloak | Authorization rules managed in RHSSO/Keycloak; requires OAuth authentication |

| Open Policy Agent (OPA) | Externalized policy engine for fine-grained authorization |

Authorization is configured via the authorization property in the Kafka custom resource. If omitted, authorization is disabled.

Network Security

Monitoring

Implementation Checklist

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.