Kafka ACLs


The CLI allows you to handle the Access Control Lists. The commands for these actions are shown in the table below.

CommandsDescription
deleteDelete one ACL configured
setUpdate or create an ACL

View all ACLs 

lenses-cli acls

Update ACLs 

lenses-cli acl set \
    --resource-type="Topic" \
    --resource-name="transactions" \
    --principal="principalType:principalName" \
    --permission-type="Allow" \
    --acl-host="*" \
    --operation="Read" \
    --pattern-type="literal"

ACLs can also be created from a file:

lenses-cli acl set ./file.yaml

Example file:

resourceType: Topic
resourceName: transactions
principal: principalType:principalName
permissionType: Allow
host: "*"
operation: Read
patternType: literal

Delete ACLs 

lenses-cli acl delete \
    --resource-type="Topic" \
    --resource-name="transactions" \
    --principal="principalType:principalName" \
    --permission-type="Allow" \
    --acl-host="*" \
    --operation="Read" \
    --pattern-type="literal"

ACLs can also be deleted from a file:

lenses-cli acl delete ./file.yaml
--
Last modified: November 18, 2024