返回 Skill 列表
extension
分类: 开发与工程无需 API Key

azure-rbac

帮助用户为具有最小权限访问的身份找到合适的Azure RBAC角色,然后生成CLI命令和Bicep代码来分配它。还提供授予角色所需的权限指导。使用场景包括:“我应该分配什么角色”,“最小权限角色”,“用于...的RBAC角色”,“读取Blob的角色”,“托管身份的角色”,“自定义角色定义”,“将角色分配给身份”,“我需要分配什么角色以授予权限”,“分配角色所需的权限”。不应用于:创建或配置托管身份,或一般的Azure安全加固;这些不在本角色选择技能的范围内。

person作者: jakexiaohubgithub

Use the 'azure__documentation' tool to find the minimal role definition that matches the desired permissions the user wants to assign to an identity. If no built-in role matches the desired permissions, use the 'azure__extension_cli_generate' tool to create a custom role definition with the desired permissions. Then use the 'azure__extension_cli_generate' tool to generate the CLI commands needed to assign that role to the identity. Finally, use the 'azure__bicepschema' and 'azure__get_azure_bestpractices' tools to provide a Bicep code snippet for adding the role assignment. If user is asking about role necessary to set access, refer to Prerequisites for Granting Roles down below:

Prerequisites for Granting Roles

To assign RBAC roles to identities, you need a role that includes the Microsoft.Authorization/roleAssignments/write permission. The most common roles with this permission are:

  • User Access Administrator (least privilege - recommended for role assignment only)
  • Owner (full access including role assignment)
  • Custom Role with Microsoft.Authorization/roleAssignments/write