azure-rbac

azure-rbac

熱門

協助使用者為身分識別找出最低權限的 Azure RBAC 角色,然後產生 CLI 命令與 Bicep 程式碼來指派該角色。同時提供指派角色所需權限的指引。適用情境:bicep 角色指派、該指派哪個角色、最低權限角色、RBAC 角色、讀取 Blob 的角色、受控識別角色、自訂角色定義、指派角色給身分識別、我需要什麼角色才能授與存取權、指派角色所需的權限。

1196星標
196分支
更新於 2026/6/9
SKILL.md
readonlyread-only
name
azure-rbac
description

Helps users find the right Azure RBAC role for an identity with least privilege access, then generate CLI commands and Bicep code to assign it. Also provides guidance on permissions required to grant roles. WHEN: bicep for role assignment, what role should I assign, least privilege role, RBAC role for, role to read blobs, role for managed identity, custom role definition, assign role to identity, what role do I need to grant access, permissions to assign roles.

使用 'azure__documentation' 工具找出符合使用者想指派給身分識別之權限的最小角色定義。如果沒有內建角色符合所需權限,請使用 'azure__extension_cli_generate' 工具建立具有所需權限的自訂角色定義。然後使用 'azure__extension_cli_generate' 工具產生將該角色指派給身分識別所需的 CLI 命令。最後,使用 'azure__bicepschema' 和 'azure__get_azure_bestpractices' 工具提供用於新增角色指派的 Bicep 程式碼片段。如果使用者詢問設定存取權所需的角色,請參考下方「指派角色的必要條件」:

指派角色的必要條件

若要將 RBAC 角色指派給身分識別,您需要一個包含 Microsoft.Authorization/roleAssignments/write 權限的角色。具有此權限的最常見角色包括:

  • 使用者存取管理員(最低權限 - 建議僅用於角色指派)
  • 擁有者(完整存取權,包含角色指派)
  • 自訂角色,包含 Microsoft.Authorization/roleAssignments/write