如何在kafka本地启用SASL机制

发布于 2025-01-14 08:23:50 字数 215 浏览 2 评论 0原文

如何为kafka启用SASL机制和JAAS身份验证?因此,消费者/生产者必须提供用户名和密码。密码以便能够在经纪人中发布 输入图片此处描述

How to enable SASL mechanism with JAAS Authentication for kafka ? thus the consumer/producer have to provide username & password in order to be able to publish in the broker
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

老娘不死你永远是小三 2025-01-21 08:23:50

在 Kafka 中启用 SASL 身份验证的过程在使用 SASL 进行身份验证部分中有详细描述。文档。我建议您遵循官方文档,因为它包含所有机制的说明和生产环境的建议。

为了提供一些背景知识,您需要:

  1. 使用 KafkaServer 块和特定机制的配置为代理创建 JAAS 文件。

  2. -Djava.security.auth.login.config= 添加到代理 JVM 命令行参数。

  3. 通过 security.protocolsasl.mechanismsasl.jaas.config 设置将客户端配置为使用 SASL。

The process of enabling SASL authentication in Kafka is extensively described in the Authentication using SASL section in the documentation. I suggest you follow the official documentation as it contains instructions for all the mechanisms and recommendations for production environments.

To give a bit of background, at a glance you need to:

  1. Create a JAAS file for brokers with a KafkaServer block and the configuration for the specific mechanism.

  2. Add -Djava.security.auth.login.config=<PATH_TO_JAAS_FILE> to your broker JVM command line argument.

  3. Configure client to use SASL via the security.protocol, sasl.mechanism and sasl.jaas.config settings.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文