CoSec v1.10.0 发布,基于 RBAC 和策略的多租户响应式安全框架
CoSec
基于 RBAC 和策略的多租户响应式安全框架。
更新内容(v1.10.0) 🎉 🎉 🎉
⭐ 更新内容
- 依赖:更新
io.opentelemetry:opentelemetry-bom
到 v1.22.0。 特性:新增
BoolConditionMatcher
,Bool 条件匹配器,支持无限级嵌套,以增强条件匹配器语义。
{ "name": "AllowDeveloperOrIpRange", "effect": "allow", "actions": [ { "type": "all" } ], "condition": { "type": "bool", "bool": { "and": [ { "type": "authenticated" } ], "or": [ { "type": "in", "part": "context.principal.id", "in": [ "developerId" ] }, { "type": "path", "part": "request.remoteIp", "path": { "caseSensitive": false, "separator": ".", "decodeAndParseSegments": false }, "pattern": "192.168.0.*" } ] } } }
认证
授权
OAuth
建模类图
安全网关服务
授权策略流程
内置策略匹配器
ActionMatcher
ConditionMatcher
策略 Schema
策略 Demo
{ "id": "id", "name": "name", "category": "category", "description": "description", "type": "global", "tenantId": "tenantId", "statements": [ { "name": "Anonymous", "effect": "allow", "actions": [ { "type": "path", "pattern": "/auth/register" }, { "type": "path", "pattern": "/auth/login" } ] }, { "name": "UserScope", "effect": "allow", "actions": [ { "type": "path", "pattern": "/user/#{principal.id}/*" } ], "condition": { "type": "authenticated" } }, { "name": "Developer", "effect": "allow", "actions": [ { "type": "all" } ], "condition": { "type": "in", "part": "context.principal.id", "in": [ "developerId" ] } }, { "name": "RequestOriginDeny", "effect": "deny", "actions": [ { "type": "all" } ], "condition": { "type": "reg", "negate": true, "part": "request.origin", "pattern": "^(http|https)://github.com" } }, { "name": "IpBlacklist", "effect": "deny", "actions": [ { "type": "all" } ], "condition": { "type": "path", "part": "request.remoteIp", "path": { "caseSensitive": false, "separator": ".", "decodeAndParseSegments": false }, "pattern": "192.168.0.*" } }, { "name": "RegionWhitelist", "effect": "deny", "actions": [ { "type": "all" } ], "condition": { "negate": true, "type": "reg", "part": "request.attributes.ipRegion", "pattern": "^中国\\|0\\|(上海|广东省)\\|.*" } }, { "name": "AllowDeveloperOrIpRange", "effect": "allow", "actions": [ { "type": "all" } ], "condition": { "type": "bool", "bool": { "and": [ { "type": "authenticated" } ], "or": [ { "type": "in", "part": "context.principal.id", "in": [ "developerId" ] }, { "type": "path", "part": "request.remoteIp", "path": { "caseSensitive": false, "separator": ".", "decodeAndParseSegments": false }, "pattern": "192.168.0.*" } ] } } } ] }
感谢
CoSec 权限策略设计参考 AWS IAM 。

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
Water 2.9.2 发布,一站式服务治理平台
Water(水孕育万物...) Water 为项目开发、服务治理,提供一站式解决方案(可以理解为微服务架构支持套件)。基于 Solon 框架开发,并支持完整的 Solon Cloud 规范;已在生产环境奔跑了5年。 功能相当于:consul + rabbitmq + elk + prometheus + openFaas + quartz + 等等,并有机结合在一起。 或者约等于:nacos + rocketmq + PlumeLog + prometheus + magic-api + xxl-job + 等。 对 k8s 友好,支持 ip 漂移、支持 k8s service 映射(通过上游配置,可真接将服务发现为 k8s service 地址)。 本次更新 移除 已弃用多时的功能 "负载监控","主机监控","存储监控"(需要与云服务对接,用起来麻烦) 增加 日志查询单条最大显示长度设置 调整 orm 框架,改由 wood 代替 调整 "证书监视" 界面,报警间隔为1小时 调整 几个 HttpURLConnection 使用处的缓存处理(服务状态检测,证书检测,应用检测等...) ...
- 下一篇
go-mir v3.0.0 发布,用 Go 结构体标签定义 handler 路由信息的辅助库
go-mir v3.0.0 发布了,v3版本带来全新的RESTful API开发方式,提供媲美gRPC服务开发的体验,方便快捷,欢迎参考使用。 Mir 是一套提供类似gRPC服务开发体验的快速开发RESTful API后端开发脚手架,适配多种HTTP框架,包括Gin, Chi, Hertz, Echo, Iris, Fiber, Macaron, Mux, httprouter。 使用说明 生成样板项目 % go install github.com/alimy/mir/mirc/v3@latest % mirc new -h create template project Usage: mirc new [flags] Flags: -d, --dst string genereted destination target directory (default ".") -h, --help help for new --mir string mir replace package name or place -p, --pkg string pro...
相关文章
文章评论
共有0条评论来说两句吧...