Apache kafka 使用kafka消费者的listTopics()时,kafka-authorizer.log呈假阳性

Apache kafka 使用kafka消费者的listTopics()时,kafka-authorizer.log呈假阳性,apache-kafka,kafka-consumer-api,Apache Kafka,Kafka Consumer Api,对于集群中的每个主题(用户没有授权)使用时,SimpleAuthorizer.scala会在kafka-authorizer.log中创建一个日志行,如下所示: INFO Principal = User:user is Denied Operation = Describe from host = ip on resource = Topic:LITERAL:topicName (kafka.authorizer.logger) 有没有一种简单的方法可以从listTopics()中删除这些“

对于集群中的每个主题(用户没有授权)使用时,SimpleAuthorizer.scala会在kafka-authorizer.log中创建一个日志行,如下所示:

INFO Principal = User:user is Denied Operation = Describe from host = ip on resource = Topic:LITERAL:topicName (kafka.authorizer.logger)

有没有一种简单的方法可以从listTopics()中删除这些“误报”日志,而不丢失访问“外来”主题的真正尝试?背景:在一个大型共享集群中,有许多来自不同独立开发团队的主题(一个团队对于自己的主题只有一个“描述”ACL条目),这会导致在使用listTopics()时出现大量安全日志,其中没有“黑客”意图。

向所有用户授予Descripte acl操作如何? 像这样:

/bin/kafka-acls --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=zoo-1:2181 --allow-principal User:\* --topic \* --operation describe --add
/bin/kafka-acls --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=zoo-1:2181 --allow-principal User:\* --group \* --operation describe --add
/bin/kafka-acls --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=zoo-1:2181 --allow-principal User:\* --cluster \* --operation describe --add

将描述acl操作授予所有用户如何? 像这样:

/bin/kafka-acls --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=zoo-1:2181 --allow-principal User:\* --topic \* --operation describe --add
/bin/kafka-acls --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=zoo-1:2181 --allow-principal User:\* --group \* --operation describe --add
/bin/kafka-acls --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=zoo-1:2181 --allow-principal User:\* --cluster \* --operation describe --add