-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add(kafka): commands for managing native ACLs
- Loading branch information
1 parent
c5ee83d
commit 45d32f4
Showing
4 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
title: avn service kafka-acl | ||
--- | ||
|
||
Full list of commands for `avn service kafka-acl`. | ||
|
||
## Manage Apache Kafka® native access control lists | ||
|
||
Commands for managing Apache Kafka® native ACLs via `avn` commands. | ||
|
||
### `avn service kafka-acl-add` | ||
|
||
Adds an Apache Kafka® native ACL entry. | ||
|
||
| Parameter | Information | | ||
| ------------------------- | ------------------------------------------------------------------------------- | | ||
| `service_name` | The name of the service | | ||
| `--principal` | The principal for the ACLs, must be in the form User:name | | ||
| `--topic` | Topic resource type to which ACL should be added | | ||
| `--group` | Group resource type to which ACL should be added | | ||
| `--cluster` | The ACL is applied to the clusger resource | | ||
| `--transactional-id` | TransactionalId resource type to which ACL should be added | | ||
| `--operation` | The operation type: possible values are `Describe`,`DescribeConfigs`,<br/>`Alter`,`IdempotentWrite`,`Read`,`Delete`,`Create`,`ClusterAction`,<br/>`All`,`Write`,`AlterConfigs`,`CreateTokens`,`DescribeTokens` | | ||
| `--host` | The host for the ACLs, a value of '*' matches all hosts (default: *) | | ||
| `--resource-pattern-type` | The type of the resource pattern, can be LITERAL or PREFIXED (default: LITERAL) | | ||
! `--deny` | Create a DENY rule (default is ALLOW) | | ||
|
||
**Example:** Add an ACLs for user `userA` to `Read` on topics having name starting | ||
with `topic2020` in the 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` | ||
|
||
Deletes an Apache Kafka® native ACL entry. | ||
|
||
| Parameter | Information | | ||
| -------------- | --------------------------- | | ||
| `service_name` | The name of the service | | ||
| `acl_id` | The id of the ACL to delete | | ||
|
||
**Example:** Delete the native ACL with id `acl3604f96c74a` on service named `kafka-doc`. | ||
|
||
``` | ||
avn service kafka-acl-delete kafka-doc acl3604f96c74a | ||
``` | ||
|
||
### `avn service kafka-acl-list` | ||
|
||
Lists Apache Kafka® native ACL entries. | ||
|
||
| Parameter | Information | | ||
| -------------- | ----------------------- | | ||
| `service_name` | The name of the service | | ||
|
||
**Example:** List the ACLs defined for a service named `kafka-doc`. | ||
|
||
``` | ||
avn service kafka-acl-list kafka-doc | ||
``` | ||
|
||
An example of `avn service kafka-acl-list` output: | ||
|
||
```text | ||
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 * | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters