I need to implement a programmatic check to view read / write permissions to a Kafka topic.
I’m attempting to use the AdminClient, but I’m getting back 0 ACLs.
using (var adminClient = new AdminClientBuilder(kafkaConfig).Build())
{
var filter = new AclBindingFilter
{
PatternFilter = new ResourcePatternFilter
{ Type = ResourceType.Any, Name = null, ResourcePatternType = ResourcePatternType.Any },
EntryFilter = new AccessControlEntryFilter()
{ Principal = null, Host = null, Operation = AclOperation.Any, PermissionType = AclPermissionType.Any }
};
try
{
return await adminClient.DescribeAclsAsync(filter);
}
catch (DescribeAclsException ex)
{
Console.WriteLine($"An error occured {ex.Result.Error}");
throw;
}
}
What am I doing wrong?
Tried above, expecting a list of topics with permissions