rpk security acl create
Create ACLs. Following the multiplying effect of combining flags, the create command works on a straightforward basis: every ACL combination is a created ACL.
If no host is specified, an allowed principal is allowed access from all hosts. The wildcard principal * allows all principals. At least one principal, one host, one resource, and one operation is required to create a single ACL.
Usage
rpk security acl create [flags]
| The schema migration examples above are Schema Registry ACLs only. You also require Kafka ACLs for topics, consumer groups, and cluster operations. See Configure Access Control Lists. |
Examples
This section provides examples of how to use rpk security acl create.
User ACLs
Allow all permissions to user bar on topic foo and group g
rpk security acl create --allow-principal bar --operation all --topic foo --group g
Allow read permissions to all users on topics biz and baz
rpk security acl create --allow-principal '*' --operation read --topic biz,baz
Allow write permissions to user buzz to transactional ID txn
rpk security acl create --allow-principal User:buzz --operation write --transactional-id txn
Role ACLs
Allow all permissions to role bar on topic foo and group g
rpk security acl create --allow-role bar --operation all --topic foo --group g
Schema Registry ACLs
Allow read permissions to user panda on topic bar and schema registry subject bar-value
rpk security acl create --allow-principal panda --operation read --topic bar --registry-subject bar-value
Schema migration permissions
Source cluster (read-only) for schema migration
rpk security acl create --allow-principal User:migrator-user --operation read,describe --registry-global --brokers <source-brokers>
Target cluster (read-write) for schema migration
rpk security acl create --allow-principal User:migrator-user --operation write,describe,alter_configs,describe_configs --registry-global --brokers <target-brokers>
Flags
| Value | Type | Description |
|---|---|---|
|
stringSlice |
Hosts from which access will be granted ( |
|
stringSlice |
Principal to allow. Format: |
|
stringSlice |
Roles for which these permissions will be granted ( |
|
bool |
Whether to grant ACLs to the cluster. |
|
stringSlice |
Hosts from from access will be denied ( |
|
stringSlice |
Principal to deny. Format: |
|
stringSlice |
Role for which these permissions will be denied ( |
|
stringSlice |
Group to grant ACLs for ( |
|
stringSlice |
Operation to allow or deny: |
|
bool |
Whether to grant ACLs for the schema registry. |
|
stringSlice |
Schema Registry subjects to grant ACLs for ( |
|
string |
Pattern type: |
|
stringSlice |
Topic to grant ACLs for ( |
|
stringSlice |
Transactional IDs to grant ACLs for ( |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |