Search in sources :

Example 1 with ResourceFilter

use of org.apache.kafka.common.resource.ResourceFilter in project apache-kafka-on-k8s by banzaicloud.

the class RequestResponseTest method createDeleteAclsRequest.

private DeleteAclsRequest createDeleteAclsRequest() {
    List<AclBindingFilter> filters = new ArrayList<>();
    filters.add(new AclBindingFilter(new ResourceFilter(ResourceType.ANY, null), new AccessControlEntryFilter("User:ANONYMOUS", null, AclOperation.ANY, AclPermissionType.ANY)));
    filters.add(new AclBindingFilter(new ResourceFilter(ResourceType.ANY, null), new AccessControlEntryFilter("User:bob", null, AclOperation.ANY, AclPermissionType.ANY)));
    return new DeleteAclsRequest.Builder(filters).build();
}
Also used : ResourceFilter(org.apache.kafka.common.resource.ResourceFilter) AclBindingFilter(org.apache.kafka.common.acl.AclBindingFilter) ArrayList(java.util.ArrayList) AccessControlEntryFilter(org.apache.kafka.common.acl.AccessControlEntryFilter)

Aggregations

ArrayList (java.util.ArrayList)1 AccessControlEntryFilter (org.apache.kafka.common.acl.AccessControlEntryFilter)1 AclBindingFilter (org.apache.kafka.common.acl.AclBindingFilter)1 ResourceFilter (org.apache.kafka.common.resource.ResourceFilter)1