【Azure API 管理】 为APIM创建一个审批订阅申请的RBAC角色,最少的Action内容是什么呢?
问题描述
在使用APIM服务中,需要为专门的一组用户赋予特殊的权限:审批APIM用户的对产品的订阅。需要自定义一个RBAC角色,那么如何来设置最少的Action满足需求呢?
问题解答
要对APIM订阅进行审批,至少需要 Microsoft.ApiManagement/service/subscriptions/write (对subscriptions的write权限)。同时,也需要有APIM资源,当前资源组,Subscriptions的Read权限。所以总起来就是需要以下Actions:
- Microsoft.ApiManagement/service/subscriptions/write
- Microsoft.ApiManagement/service/subscriptions/read
- Microsoft.Resources/subscriptions/resourceGroups/read
- Microsoft.ApiManagement/service/read
当需要在Azure门户上创建自定义RBAC 角色时候,自定义JSON内容为:
{ "properties": { "roleName": "APIM Only Approval Subscription User", "description": "APIM Only Approval Subscription User", "assignableScopes": [ "/subscriptions/<your azure subscription ID>" ], "permissions": [ { "actions": [ "Microsoft.ApiManagement/service/subscriptions/write", "Microsoft.ApiManagement/service/subscriptions/read", "Microsoft.Resources/subscriptions/resourceGroups/read", "Microsoft.ApiManagement/service/read" ], "notActions": [], "dataActions": [], "notDataActions": [] } ] } }
创建成功后,效果如下:
参考资料
使用 Azure 门户创建 Azure 自定义角色 : https://docs.microsoft.com/zh-cn/azure/role-based-access-control/custom-roles-portal
当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
2021-05-31 【Azure 事件中心】azure-spring-cloud-stream-binder-eventhubs客户端组件问题, 实践消息非顺序可达