Confluent-kafka-dotnet: Error while setting up SASL/SCRAM on windows 10

Created on 15 Jan 2019  路  3Comments  路  Source: confluentinc/confluent-kafka-dotnet

Description

I am trying to setup SASL/SCRAM authentication to implement secure communication between client and brokers. But i am getting error while running following command on windows 10 machine.

bin\windows\kafka-configs.bat --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

console log -

requirement failed: Unknown Dynamic Configuration: Set('SCRAM-SHA-256).

How to reproduce

  1. Install Kafka binary from Kafka.org
  2. Run Zookeeper and Server
    -> bin\windows\zookeeper-server-start.bat config\zookeeper.properties
    ->bin\windows\kafka-server-start.bat config\server.properties

  3. try to setup scram credential for a user

->bin\windows\kafka-configs.bat --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

Error:- you will get following error on cmd.
"requirement failed: Unknown Dynamic Configuration: Set('SCRAM-SHA-256)".

Checklist

Please provide the following information:

  • [ ] Confluent.Kafka nuget version:
  • [ ] Apache Kafka version: kafka_2.11-2.1.0
  • [ ] Client configuration:
  • [ ] Operating system:Windows 10
  • [ ] Provide logs (with "debug" : "..." as necessary in configuration)
  • [ ] Provide broker log excerpts
  • [ ] Critical issue
question

Most helpful comment

Remove ' from the command.

Here is working command:
bin\windows\kafka-configs.bat --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

I have used the command to create users for my Kafka clusters from Windows.

All 3 comments

It's probably not a good idea to run the kafka brokers on windows - not many people do this and it's not well tested. To be clear though: this .NET client is tested and supported on Windows.

What you're trying to do aligns with the docs, so my best guess is a platform specific issue.

https://docs.confluent.io/current/kafka/authentication_sasl/authentication_sasl_scram.html

Thanks!

Remove ' from the command.

Here is working command:
bin\windows\kafka-configs.bat --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

I have used the command to create users for my Kafka clusters from Windows.

Was this page helpful?
0 / 5 - 0 ratings