Kafka ACL Report - Description
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Apache Kafka ACL lack a mean to provide a mean to list ACLs associated to a Principal with kafka-acls commands (KIP-357)
The kafka-acl-report.sh provide a temporary solution for now.
- BASH
To get a local copy up and running follow these simple steps.
- Linux bash
- kafka-acls.sh or kafka-acls - if to be executed through shell pipe
- Output of kafka-acls.sh or kafka-acls - if using a filename or STDIN (with cat )
- Clone the repo to the location of your choice
cd <clone-parent-path-dir>
git clone https://github.com/gnlabrie/kafka-acl-report.git
- Check the executable permission of the script
cd <clone-parent-path-dir>/kafka-acl-report
ls -la bin/kafka-acl-report.sh
Script should have - at least - the executable permission for the owner.
-rwxr-xr-x 1 user 197609 4277 Sep 30 03:05 kafka-acl-report.sh
The kafka-acl-report.sh script is taking a principal as input and either a filename or reading STDIN
Usage: kafka-acl-report.sh -p <principal> [ -f <filename> ]
-p <principal> (mandatory) The PRINCIPAL (case sensitive) you are looking to report on
-f <filename> (optional) A file containing the output of the kafka-acls command
If filename is not present, the script will read from STDIN
cd <clone-parent-path-dir>/kafka-acl-report
./kafka-acl-report/bin/kafka-acl-report.sh -h
cd <clone-parent-path-dir>/kafka-acl-report
cat ../sample/small.acls | ./kafka-acl-report/bin/kafka-acl-report.sh -u username1
The ACL for USER username1 are ...
On GROUP group2 (LITERAL) has ALL ALLOW from HOST *
cd <clone-parent-path-dir>/kafka-acl-report
cat ../sample/small.acls | ./kafka-acl-report/bin/kafka-acl-report.sh -u username2
The ACL for USER username2 are ...
On TOPIC topic2 (LITERAL) has READ ALLOW from HOST *
cd <clone-parent-path-dir>/kafka-acl-report
cat ../sample/small.acls | ./kafka-acl-report/bin/kafka-acl-report.sh -u username3
The ACL for USER username3 are ...
On TOPIC topic3 (PREFIXED) has WRITE ALLOW from HOST *
cd <clone-parent-path-dir>/kafka-acl-report
cat ../sample/small.acls | ./kafka-acl-report/bin/kafka-acl-report.sh -u username4
The ACL for USER username4 are ...
On TOPIC topic3 (PREFIXED) has WRITE ALLOW from HOST *
cd <clone-parent-path-dir>/kafka-acl-report
cat ../sample/small.acls | ./kafka-acl-report/bin/kafka-acl-report.sh -u username
The ACL for USER username are ...
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
- Name : Guy Labrie
- Email: guy.labrie@cgsc.ca
- Project Link: https://github.com/gnlabrie/kafka-acl-report
If you like the tool and want to support the code, you can pay me a coke ...