azure-bp-pass-identity

explicit azure emits CanPassIdentity

match (effective permission)

{ "action": "Microsoft.ManagedIdentity/userAssignedIdentities/assign/action", "scope_type": "subscription|resourceGroup" }

where

principal holds EFFECTIVE Microsoft.Blueprint/blueprintAssignments/write at the assignment scope (separate check)

emit

source typeIdentity
target typeManagedIdentity
source<principal>
target<user-assigned managed identity>
permissionsMicrosoft.ManagedIdentity/userAssignedIdentities/assign/action
conditionsrole_compatibility

Narrative

{principal.name} can assign user-assigned MI {mi.name} (Microsoft.ManagedIdentity/userAssignedIdentities/assign/action), gaining CanPassIdentity.

Raw rule rules/explicit/azure-blueprints.yaml

id: azure-bp-pass-identity
emits: CanPassIdentity
applies_to:
- azure
match_effective_permission:
  action: Microsoft.ManagedIdentity/userAssignedIdentities/assign/action
  scope_type: subscription|resourceGroup
where:
- principal holds EFFECTIVE Microsoft.Blueprint/blueprintAssignments/write at the assignment scope (separate
  check)
emit:
  source_type: Identity
  target_type: ManagedIdentity
  source: <principal>
  target: <user-assigned managed identity>
  permissions:
  - Microsoft.ManagedIdentity/userAssignedIdentities/assign/action
  conditions:
  - role_compatibility
  api_source: 'Azure ARM: roleAssignments query filtered by userAssignedIdentities/assign/action'
  narrative: '{principal.name} can assign user-assigned MI {mi.name} (Microsoft.ManagedIdentity/userAssignedIdentities/assign/action),
    gaining CanPassIdentity.'
move · open · esc close