我目前正在使用 Kafka 2.6.0 我正在尝试通过以下步骤将 SCRAM 凭据添加到 Zookeeper: https ://docs.confluent.io/platform/current/kafka/authentication_sasl/authentication_sasl_scram.html
然而,命令
bin/kafka-configs --zookeeper localhost:2181 --alter --add-config 'SCRAM-SHA-256=[iterations=8192,password=alice-secret],SCRAM-SHA-512=[password=alice-secret]'
--entity-type users --entity-name Alice
返回以下警告并成功添加用户 Alice 的凭据
Warning: --zookeeper is deprecated and will be removed in a future version of Kafka.
Use --bootstrap-server instead to specify a broker to connect to.
Completed updating config for entity: user-principal 'Alice'
我尝试使用 bootstrap-server 但收到此警告并且未添加凭据。
bin/kafka-configs --bootstrap-server localhost:9094 --alter --add-config 'SCRAM-SHA-256=[iterations=8192,password=alice-secret],SCRAM-SHA-512=[password=bob-secret]'
--entity-type users --entity-name Bob
Only quota configs can be added for 'users' using --bootstrap-server. Unexpected config names: Set(SCRAM-SHA-512)
Kafka Broker 和 Zookeeper 已启动并正在运行,我目前可以使用 Alice 的凭证成功地生成/使用消息。有没有办法使用 bootstrap-server 在 zookeeper 中添加 SCRAM 凭据?