zenoh 访问控制处理

访问控制从0.11开始支持,1.0.0 版本相对比较稳定了,对于访问控制包含了认证以及安全,目前zenoh 支持相对完整的基于用户密码的认证以及tls的,同时支持基于策略的安全控制

配置简单说明

  • 参考配置

可以看到包含了rules,subjects,policies 三部分,

{
  "access_control": {
    "enabled": true,
    "default_permission": "allow",
  
    "rules": [
      {
        "id": "deny pub/sub",
        "permission": "deny",
        "flows": ["ingress", "egress"],
        "messages": [
          "declare_subscriber",
          "put",
          "delete",
        ],
        "key_exprs": [
          "demo/example/**",
        ],
      }
    ],
  
    "subjects": [
      {
        "id": "example subject",
        "interfaces": [
          "lo0",
          "en0",
        ],
        "cert_common_names": [
          "example.zenoh.io"
        ],
        "usernames": [
          "zenoh-example1",
          "zenoh-example2",
        ],
      }
    ],
  
    "policies": [
      {
        "rules": [
          "deny pub/sub"
        ],
        "subjects": [
          "example subject"
        ],
      },
    ]
  }
}

说明

zenoh 对于访问控制的支持可以灵活的进行流量的入以及出控制策略,对于业务安全基于策略的访问控制是推荐使用的,里边同时包含用户,后边会介绍下

参考资料

https://zenoh.io/docs/manual/access-control/

https://github.com/eclipse-zenoh/roadmap/blob/main/rfcs/ALL/Access%20Control%20Rules.md#priority

posted on   荣锋亮  阅读(20)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2023-12-15 基于dremio dbt 实现dremio 语义层建模的简单说明
2023-12-15 dremio dbt adapter 一些简单说明
2022-12-15 maven fmpp+javacc 集成使用简单说明
2022-12-15 maven fmpp 插件开发说明
2021-12-15 jattach最近的一些更新
2021-12-15 k8s 数据卷需要很长时间才能挂载成功
2021-12-15 使用npm workspace 管理npm 包

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示