When a cluster has an authorizer, its access control lists (ACLs) decide which users and applications may read, write, create or change which topics, consumer groups and other resources. The ACL section lists every ACL on the cluster and lets you add new ones, by hand or with helpers that grant what a typical consumer, producer or Kafka Streams application needs, and delete the ones you no longer want.
To open it, connect the cluster and click ACL under its name in the Kafka Clusters pane. The entry is greyed out when the cluster has no authorizer, or your login may not list its ACLs: the Overview then shows ACL View as No. To create and delete ACLs you also need ACL Edit, which takes Alter permission on the cluster.
audit-log is selected.- Filter ACLs...: show only the ACLs that match (below).
- Create ACL: add one or more ACLs (below).
- Delete ACL Entry: delete the selected ACLs (below). Greyed out until you select a row.
- Refresh All ACL(s): read the ACLs from the cluster again.
- The selected ACL's principal and resource name. Click it to copy them to the clipboard. It's shown only while exactly one row is selected.
- The Permission column: ALLOW or DENY.
- How many ACLs are listed (after filtering).
- Duplicate Tab: open the ACL section in a tab of its own, as was done here for Topics, so you can check a user's ACLs while you look at the topics they use (Duplicating a tab).
ACL concepts
Each row in the list is one ACL entry: it allows or denies one principal one operation on one resource (or set of resources), from one host. KafkIO shows Kafka's own names for each part, in these columns:
- Principal
- Who the entry is for, as
type:name, nearly alwaysUser:followed by the name the client authenticates as: the SASL username, or the certificate's distinguished name with mutual TLS (Security).User:*means every user. - Host
- The IP address the client must connect from, or
*for any host. Most ACLs use*. - Resource Type
- What kind of thing the entry protects:
TOPIC,GROUP(consumer group),CLUSTER(cluster-wide actions; its resource name is alwayskafka-cluster),TRANSACTIONAL_ID(transactional producers),DELEGATION_TOKENorUSER. - Resource Name and Pattern
- Which resources of that type: with
LITERAL, the one resource with exactly that name (or every resource, if the name is*); withPREFIXED, every resource whose name starts with it, soalice-coversalice-reportsandalice-test. - Operation
- What may be done:
READ,WRITE,CREATE,DELETE,ALTER,DESCRIBE,DESCRIBE_CONFIGS,ALTER_CONFIGS,CLUSTER_ACTION,IDEMPOTENT_WRITE,CREATE_TOKENS,DESCRIBE_TOKENS,TWO_PHASE_COMMIT, orALL. Kafka countsREAD,WRITE,DELETEandALTERas includingDESCRIBE. - Permission
ALLOWorDENY. A matchingDENYalways wins over anALLOW, which makes it useful for carving an exception out of a broad grant, like alice'sDENYonaudit-logabove, which overrides herALLOWon the same topic.
Kafka refuses anything no ACL allows, unless the broker is configured otherwise
(allow.everyone.if.no.acl.found), and super users defined on the brokers (super.users)
bypass ACLs altogether. Neither setting appears in this list.
Viewing and filtering ACLs
KafkIO reads every ACL on the cluster when you open the section, grouped by resource type and then resource name. Click a column header to sort by it instead. If the list is empty and says No ACLs to display; do you have access to retrieve the ACLs?, either the cluster has no ACLs yet or your login isn't allowed to describe them.
Type in Filter ACLs... to narrow the list. The text is matched against every column at
once, so a principal, a topic name, DENY or PREFIXED all work. Turn on the
.* toggle at the end of the field to use a regular expression
(Filtering). Filtering by principal is the quickest way to
answer "what may this user do?", for example when an application, or your own login, gets an authorization error
(Limited permissions):
User:alice is allowed or denied on the cluster.- The filter text, matched against all columns.
- The regular expression toggle. The × beside it clears the filter.
Select rows with a click, Ctrl+click or Shift+click (⌘+click on macOS), or Ctrl+A for every listed row. Right-click a row for Delete ACL Entry, Copy of the value you clicked, Copy Summary (the row) and Copy All Summaries (every listed row), handy for pasting a user's ACLs into a ticket.
Creating ACLs
Click Create ACL to open the Create ACL Entries window. Pick an ACL helper type first: Custom / manual for full control, or one of the helpers that create the usual set of ACLs for a consumer, a producer or a Kafka Streams application. Every type starts with the same two fields:
- Principal: who the ACLs are for, as
type:name(it must contain a colon). It starts asUser:my_user: replace it. - Host: an IP address, or
*(the default) for any host.
Create ACL(s), at the bottom right, stays greyed out until the form is complete; a red mark shows what's missing. When the ACLs have been created, KafkIO says The ACLs were successfully updated! and refreshes the list. The window stays open with your entries, so you can change the principal or a resource and create the next set. It isn't modal: you can keep using the main window meanwhile.
If the cluster refuses, KafkIO shows Error updating ACLs with Kafka's reason. A
ClusterAuthorizationException means your login lacks Alter on the cluster (the
ACL Edit feature): KafkIO still offers Create ACL in that
case, but the cluster rejects the request.
Custom entries
Use Custom / manual for anything the helpers don't cover: a DENY, cluster
or transactional ID permissions on their own, or operations such as ALTER_CONFIGS. You choose one
resource and one or more operations, and KafkIO creates one ACL per operation.
inventory-service may read and describe the inventory
topic.- ACL helper type: Custom / manual.
- Principal.
- Host.
- Resource type:
TOPICby default. - ALLOW or DENY (the darker button is the one selected).
- The operations. Open the list and tick as many as you need; at least one stays ticked
(
CREATEat first). - Matching pattern: LITERAL or PREFIXED.
- The resource name, or the prefix (required). For
CLUSTER, use LITERAL andkafka-cluster; for every resource of the type, use LITERAL and*.
Consumer helper
For Consumer grants an application what it needs to consume: READ and
DESCRIBE on the topics it reads, and READ on the consumer groups it uses. Fill in
either part, or both. For each, choose LITERAL to pick existing topics or groups from
a list, or PREFIXED to type a prefix.
fulfilment-service may consume orders with any group whose name starts with
fulfilment-.- For Consumer.
- Consume Topic(s): LITERAL or PREFIXED.
- With LITERAL, move topics from Available Topic(s) to Give READ & DESCRIBE Access To with the arrow buttons (» moves them all). Filter topics... narrows a long list.
- Consumer Group(s): LITERAL or PREFIXED.
- With PREFIXED, the prefix. Here every group starting with
fulfilment-.
The lists only offer topics and groups that exist now. A new application's consumer group usually doesn't exist
until it first runs, so use PREFIXED with its group.id (which also
matches longer names that start with it), or create a LITERAL GROUP ACL
with Custom / manual.
Producer helper
For Producer grants what an application needs to produce. Fill in any of the three parts:
- Produce Topic(s):
CREATE,WRITEandDESCRIBEon the topics, by list (LITERAL) or prefix (PREFIXED).CREATElets the producer create a topic that doesn't exist yet, if the brokers allow auto-creation. - Transaction ID:
WRITEandDESCRIBEon aTRANSACTIONAL_ID, for producers that use transactions (transactional.id). Type the exact ID or, with PREFIXED, a prefix shared by all the application's instances. - Idempotency: tick it to add
IDEMPOTENT_WRITEon the cluster, for idempotent producers on clusters that still ask for this permission.
shipping-service: three on topics starting with shipments, two on
its transactional IDs and IDEMPOTENT_WRITE.- Produce Topic(s), here PREFIXED.
- The topic prefix.
- Transaction ID: LITERAL or PREFIXED.
- The transactional ID, or its prefix.
- Idempotency.
TOPIC ACLs with
Custom / manual (CREATE, WRITE and
DESCRIBE, LITERAL).Kafka Streams helper
A Kafka Streams application reads input topics, writes output topics, and creates its own internal topics and
consumer group, all named after its application.id. For Kafka Stream Apps
grants all of that:
fraud-detector Streams application that reads payments and writes
fraud-alerts (the window scrolled down to show the Application ID).- Consume Topic(s):
READon each input topic you move to the right. - Produce Topic(s):
WRITEon each output topic you move to the right. - Application ID:
ALLon everyTOPICand everyGROUPwhose name starts with it (PREFIXED), which covers the application's consumer group and its internal changelog and repartition topics.
The two topic lists offer existing topics only, by name (there is no prefix option). Their right-hand headings
are currently the wrong way round: the list under Consume Topic(s) says
Give WRITE Access To, yet KafkIO grants READ on those topics, and the
list under Produce Topic(s) gets WRITE, as the descriptions on the left
say. If the application uses exactly-once processing, also grant it a transactional ID with the
producer helper or Custom / manual.
Deleting ACLs
Select the ACLs to delete, then click Delete ACL Entry at the end of the filter field (with several rows selected its tooltip reads Delete N ACL Entries), or right-click a row. To remove everything a user or application was granted, filter by its principal and press Ctrl+A first:
fraud-detector application.- Delete ACL Entry, for the four selected rows.
Confirm with Delete (Delete (4) for several). The rows disappear from the list as each is deleted, and a notification confirms it.
DENY can
grant access an ALLOW elsewhere was being held back from. Copy the rows first
(Copy All Summaries) if you may need to re-create them.Refreshing
The list is read when you open the section and again after you create ACLs in KafkIO. ACLs added or removed
elsewhere (by kafka-acls, Terraform, another KafkIO) don't appear until you click
Refresh All ACL(s), which reads them all again and reports
Found N ACLs.