Skip to main content

avn service kafka-acl

Full list of commands for avn service kafka-acl.

Manage Kafka-native ACLs

The avn service kafka-acl command manages Kafka-native access control lists (ACLs) in Aiven for Apache Kafka®. Kafka-native ACLs define advanced, resource-level permissions for accessing resources such as topics, consumer groups, clusters, and transactional IDs. They support fine-grained access control with both ALLOW and DENY rules, and wildcard patterns (* and ?) for resources and usernames.

avn service kafka-acl-add

Add a Kafka-native ACL entry.

ParameterInformation
service_nameName of the service
--principalPrincipal for the ACL, in the form User:<name>
--topicTopic resource for the ACL
--groupConsumer group resource for the ACL
--clusterCluster resource for the ACL
--transactional-idTransactionalId resource for the ACL
--operationOperation type: possible values are Describe, DescribeConfigs,
Alter, IdempotentWrite, Read, Delete, Create, ClusterAction,
All, Write, AlterConfigs, CreateTokens, DescribeTokens
--hostHost for the ACL, where * matches all hosts (default: *)
--resource-pattern-typeResource pattern type, either LITERAL or PREFIXED (default: LITERAL)
! --denyCreate a DENY rule (default: ALLOW)

Example: Add a Kafka-native ACL for user userA to Read on topics with names starting with topic2020 in service kafka-doc.

avn service kafka-acl-add kafka-doc \
--principal User:userA \
--operation Read \
--topic topic2020 \
--resource-pattern-type PREFIXED

avn service kafka-acl-delete

Delete a Kafka-native ACL entry.

ParameterInformation
service_nameName of the service
acl_idID of the ACL to delete

Example: Delete a Kafka-native ACL with ID acl3604f96c74a on service kafka-doc.

avn service kafka-acl-delete kafka-doc acl3604f96c74a

avn service kafka-acl-list

List Kafka-native ACL entries.

ParameterInformation
service_nameName of the service

Example: List Kafka-native ACLs defined for service kafka-doc.

avn service kafka-acl-list kafka-doc

Example output of avn service kafka-acl-list:

ID              PERMISSION_TYPE  PRINCIPAL   OPERATION  RESOURCE_TYPE  PATTERN_TYPE  RESOURCE_NAME  HOST
============== =============== ========== ========= ============= ============ ============= ====
acl4f9ed69c8aa ALLOW User:John Write Topic LITERAL orders *
acl4f9ed6e6371 ALLOW User:Frida Write Topic PREFIXED invoices *

For managing Aiven ACLs, see avn service acl.