Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove ACLS from Kafka using Java

I am trying to remove ACLS from KAfka using Java program. But on removal security check is asking

Are you sure you want to remove ACLs:

I am looking for either disable this security check or force removal option.

like image 322
Raju Avatar asked Nov 27 '25 21:11

Raju


1 Answers

Upgraded to Kafka 0.10.1.0 from 0.10.0.0 where force delete option available in AclCommand (scala component). Add --force parameter after --remove.

Exactly working syntax:

String[] cmdPArm = {"--authorizer-properties", "zookeeper.connect=localhost:2181",
                    "--remove", "--force", "--allow-principal", "User:*",
                    "--allow-host", "17.129.0.99",
                    "--operation", "Read",  "--operation", "Write",
                    "--topic", "myTopic"};
AclCommand.main(cmdPArm);
like image 98
Raju Avatar answered Nov 30 '25 12:11

Raju



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!