dpkp / kafka-python

Python client for Apache Kafka
http://kafka-python.readthedocs.io/
Apache License 2.0
5.62k stars 1.41k forks source link

how can i get all ACLs using kafka-python #1819

Closed pnenov closed 5 years ago

pnenov commented 5 years ago

how can i get all existing ACLs using kafka-python ?

jeffwidman commented 5 years ago

See https://github.com/dpkp/kafka-python/issues/1638

We'd welcome PR's!

pnenov commented 5 years ago

this is not the answer i expected !

following the link you gave above, i found a bunch of empty talks only

On Wed, May 29, 2019 at 5:09 AM Jeff Widman notifications@github.com wrote:

See #1638 https://github.com/dpkp/kafka-python/issues/1638

We'd welcome PR's!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dpkp/kafka-python/issues/1819?email_source=notifications&email_token=ACX533XXC3JQMINV524J6FTPXZB3RA5CNFSM4HQHJGM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWOV65I#issuecomment-496852853, or mute the thread https://github.com/notifications/unsubscribe-auth/ACX533TMALKV35V2SJZZKBDPXZB3RANCNFSM4HQHJGMQ .

pnenov commented 5 years ago

kafka/admin/client.py

453 # describe_acls protocol not yet implemented

Note: send the request to the least_loaded_node()

# create_acls protocol not yet implemented
# Note: send the request to the least_loaded_node()

# delete_acls protocol not yet implemented

460 # Note: send the request to the least_loaded_node()

why dont you simply say that kafka-python CAN NOT process any ACL requests instead to test our patience !?

jeffwidman commented 5 years ago

This is a volunteer project. You are welcome to help out and improve things.

hanischandrew commented 3 years ago

For anyone interested in retrieving ALL ACLs from a cluster.


resource_pattern_filter_group = ResourcePatternFilter(
    resource_type=ResourceType.ANY,
    resource_name=None,
    pattern_type=ACLResourcePatternType.ANY,
)

acl_filter = ACLFilter(
    principal=None,
    host=None,
    operation=ACLOperation.ANY,
    permission_type=ACLPermissionType.ANY,
    resource_pattern=resource_pattern_filter_group,
)

existingAcls = admin.describe_acls(acl_filter)

for acl in  existingAcls:
    print(acl)