diff --git a/TelpoKafkaConsole.WebApi/Controllers/ScramAclsController.cs b/TelpoKafkaConsole.WebApi/Controllers/ScramAclsController.cs index 5d42967..12df26c 100644 --- a/TelpoKafkaConsole.WebApi/Controllers/ScramAclsController.cs +++ b/TelpoKafkaConsole.WebApi/Controllers/ScramAclsController.cs @@ -36,6 +36,22 @@ namespace TelpoKafkaConsole.WebApi.Controllers // 创建 alcs List aclBindings = new() { + new AclBinding() + { + Pattern = new ResourcePattern + { + Type = ResourceType.Broker, + Name = "kafka-cluster", + ResourcePatternType = ResourcePatternType.Literal + }, + Entry = new AccessControlEntry + { + Principal = $"User:{consumer.Name}", + Host = "*", + Operation = AclOperation.All, + PermissionType = AclPermissionType.Deny + } + }, new AclBinding() { Pattern = new ResourcePattern @@ -95,6 +111,22 @@ namespace TelpoKafkaConsole.WebApi.Controllers // 创建 alcs List aclBindings = new() { + new AclBinding() + { + Pattern = new ResourcePattern + { + Type = ResourceType.Broker, + Name = "kafka-cluster", + ResourcePatternType = ResourcePatternType.Literal + }, + Entry = new AccessControlEntry + { + Principal = $"User:{producer.Name}", + Host = "*", + Operation = AclOperation.All, + PermissionType = AclPermissionType.Deny + } + }, new AclBinding() { Pattern = new ResourcePattern