浏览代码

调整acl

develop
H Vs 6 个月前
父节点
当前提交
bd64f12e20
共有 1 个文件被更改,包括 32 次插入0 次删除
  1. +32
    -0
      TelpoKafkaConsole.WebApi/Controllers/ScramAclsController.cs

+ 32
- 0
TelpoKafkaConsole.WebApi/Controllers/ScramAclsController.cs 查看文件

@@ -36,6 +36,22 @@ namespace TelpoKafkaConsole.WebApi.Controllers
// 创建 alcs
List<AclBinding> 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<AclBinding> 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


正在加载...
取消
保存