Skip to main content

Manage access control lists in Aiven for Apache Kafka®

Access control lists (ACLs) in Aiven for Apache Kafka® define permissions for topics, schemas, consumer groups, and transactional IDs. ACLs control which authenticated users or applications (principals) can perform specific operations on these resources.

Types of ACLs

Aiven for Apache Kafka supports two types of ACLs:

  • Aiven ACLs: These provide topic-level permissions and support wildcard patterns.
  • Kafka-native ACLs: These offer advanced, resource-level permissions with ALLOW and DENY rules for operations on multiple resource types, including topics, groups, and clusters.
note

ACL restrictions for Kafka REST are controlled by a user configuration parameter in the service's advanced configuration settings. By default, ACLs do not apply to Kafka REST. To enable ACLs for Kafka REST, set the kafka_rest_authorization parameter. For more information, see Enable Kafka REST Proxy Authorization.

Prerequisites

Add a Kafka-native ACL entry

  1. Log in to Aiven Console and select your service.
  2. Click ACL.
  3. Click Add entry.
  4. On the Add access control entry screen:
    1. Select Kafka-native ACLs as the ACL type.
    2. Fill in the following fields:
      1. Permission type: Select ALLOW or DENY.
      2. Principal: Enter the principal in the format User:<username>.
      3. Operation: Select the operation, such as Read or Write.
      4. Resource type: Select the Apache Kafka resource to manage.
      5. Pattern type: Select LITERAL for exact matches or PREFIXED for pattern-based matches.
      6. Resource: Enter the resource name or a prefix for pattern-based matching.
      7. Host: Enter the allowed host, or use * for all.
    3. Click Submit.

Add an Aiven ACL entry

  1. Log in to Aiven Console and select your service.
  2. Click ACL.
  3. Click Add entry.
  4. On the Add access control entry screen:
    1. Select Aiven ACLs as the ACL type.
    2. Fill in the following fields:
      1. Resource type: Select Topic or Schema.
      2. Permission type: Select admin, read, write, or readwrite.
      3. Username: Enter the username or pattern to apply the ACL to. Supports wildcards * and ?.
      4. Resource: Enter the name of the topic or schema, or use * to apply to all.
    3. Click Submit.
tip

After defining custom ACLs, delete the default avnadmin ACL entry by clicking Delete ACL under Actions to prevent unintended access via wildcard permissions.

View ACL entries

  1. Log in to the Aiven Console and select your Aiven for Apache Kafka service.
  2. Click ACL.
  3. Click the Kafka-native ACLs tab to view Kafka-native ACL entries or the Aiven ACLs tab to view Aiven ACL entries.
  4. Use filters to narrow the list by resource type, operation, or permission type.

Delete ACL entries

  1. Log in to the Aiven Console and select your Aiven for Kafka service.
  2. Click ACL
  3. Click the Kafka-native ACLs tab to view Kafka-native ACL entries or the Aiven ACLs tab to view Aiven ACL entries.
  4. Locate the ACL entry to delete.
  5. Click Delete ACL under the Actions column to remove the entry.
  6. Click Delete.