DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
# create a new virtual cluster virtual-clusters.sh create --bootstrap-server localhost:9092 --virtual-cluster my-virtual-cluster # create a topic link in it virtual-clusters.sh alter --bootstrap-server localhost:9092 --virtual-cluster my-virtual-cluster --add --topic my-topic --link test-topic # assign a user to the virtual cluster virtual-clusters.sh alter --bootstrap-server localhost:9092 --virtual-cluster my-virtual-cluster --add --user jane-doe # list the virtual clusters virtual-clusters.sh list --bootstrap-server localhost:9092 # describe the virtual cluster virtual-clusters.sh describe --bootstrap-server localhost:9092 --virtual-cluster my-virtual-cluster # delete the virtual-cluster virtual-clusters.sh delete --bootstrap-server localhost:9092 --virtual-cluster my-virtual-cluster |
Extending kafka-acls.sh
Administrators will need to set virtual cluster specific ACLs for existing users as well, besides managing virtual clusters themselves. We plan to add the --virtual-cluster option to the kafka-acls.sh command to enhance it with VC capabilities. The existing options would work well with this extra option. We would like to introduce another new parameter to control the pattern of the virtual cluster specified. This new --virtual-cluster-resource-pattern-type could apply to VCs only to provide more robust, generic specification of ACLs. It would default to literal if not specified explicitly.
Examples:
| Code Block | ||||
|---|---|---|---|---|
| ||||
# Adding virtual-cluster specific ACLs
bin/kafka-acls.sh --bootstrap-server localhost:9092 --add --allow-principal User:Bob --allow-principal User:Alice --allow-host 198.51.100.0 --allow-host 198.51.100.1 --operation Read --operation Write --topic Test-topic --virtual-cluster com.mycompany.eu --virtual-cluster-pattern-type literal
# Adding VC specific ACLs with resource types
bin/kafka-acls.sh --bootstrap-server localhost:9092 --add --allow-principal User:Jane --producer --topic Test- --resource-pattern-type prefixed --virtual-cluser com.mycompany.eu. --virtual-cluster-pattern-type prefixed
# Removing ACLs that are specific to virtual clusters
bin/kafka-acls.sh --bootstrap-server localhost:9092 --remove --allow-principal User:Bob --allow-principal User:Alice --allow-host 198.51.100.0 --allow-host 198.51.100.1 --operation Read --operation Write --topic Test-topic --virtual-cluster com.mycompany.eu
# List ACLs of a virtual cluster
$ bin/kafka-acls.sh --bootstrap-server localhost:9092 --list --virtual-cluster com.mycompany.eu |
Metadata Layer
Although it isn’t an API towards users, we feel important to discuss this part as it affects the core of Kafka. We plan to store the data of virtual clusters in the metadata layer similarly to topics and configurations for instance.
...