tulios / kafkajs

A modern Apache Kafka client for node.js
https://kafka.js.org
MIT License
3.72k stars 526 forks source link

How to list/add/remove users #1164

Open evangelosar opened 3 years ago

evangelosar commented 3 years ago

Hello! I want to get a list of all users, add a new user (with SCRAM credentials) and remove an existing user. Is there a way I can do these operations using the kafkajs library?

The respective CLI commands for these operations are the following:

List all users ./bin/kafka-configs.sh --zookeeper localhost:2181 --describe --entity-type users

Add new user ./bin/kafka-configs.sh --zookeeper localhost:2181 --alter --add-config 'SCRAM-SHA-256=[password=test-password]' --entity-type users --entity-name test-user

Remove user ./bin/kafka-configs.sh --zookeeper localhost:2181 --alter --delete-config 'SCRAM-SHA-256' --entity-type users --entity-name test-user

Environment:

ejossev commented 2 years ago

As far as I can see, the feature is still missing. However, I'd love to see it too...