Skip to content

Instantly share code, notes, and snippets.

@afiore
Created December 30, 2020 12:56
Show Gist options
  • Save afiore/acacdc5e55cd46f707730ab1be0e992f to your computer and use it in GitHub Desktop.
Save afiore/acacdc5e55cd46f707730ab1be0e992f to your computer and use it in GitHub Desktop.
Using ACL bindings
object Examples {
val validAcl1 = AclBinding(ResourcePattern(ResourceType.TOPIC, "position-report", PatternType.LITERAL), AclEntry("User:andrea", "example.cloud", Operation.ALL, PermissionType.ALLOW))
val validAcl2 = AclBinding(ResourcePattern(ResourceType.CLUSTER, "kafka-test-", PatternType.PREFIXED), AclEntry("Group:testers", "example.cloud1", Operation.DESCRIBE, PermissionType.ALLOW))
val invalidAcl = AclBinding(ResourcePattern(ResourceType.TRANSACTION_ID, "*", PatternType.LITERAL), AclEntry("User:andrea", "cloud1", Operation.ALTER, PermissionType.ALLOW))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment