azure-bp-delete-removes-deny

explicit azure emits CanModifyPolicy

match (effective permission)

{ "action": [ "Microsoft.Blueprint/blueprintAssignments/delete", "Microsoft.Resources/deploymentStacks/delete" ], "scope_type": "subscription|managementGroup|resourceGroup" }

emit

source typeIdentity
target typeConditionalPolicy
source<principal>
target<deny assignment owned by the blueprint assignment or deployment stack>
permissionsMicrosoft.Blueprint/blueprintAssignments/delete Microsoft.Resources/deploymentStacks/delete
conditionsguardrail_owner_write

Narrative

{principal.name} can delete blueprint assignments or deployment stacks (blueprintAssignments/delete or deploymentStacks/delete), which removes their system-managed deny assignments.

Raw rule rules/explicit/azure-blueprints.yaml

id: azure-bp-delete-removes-deny
emits: CanModifyPolicy
applies_to:
- azure
match_effective_permission:
  action:
  - Microsoft.Blueprint/blueprintAssignments/delete
  - Microsoft.Resources/deploymentStacks/delete
  scope_type: subscription|managementGroup|resourceGroup
where: []
emit:
  source_type: Identity
  target_type: ConditionalPolicy
  source: <principal>
  target: <deny assignment owned by the blueprint assignment or deployment stack>
  permissions:
  - Microsoft.Blueprint/blueprintAssignments/delete
  - Microsoft.Resources/deploymentStacks/delete
  conditions:
  - guardrail_owner_write
  api_source: 'Azure ARM: roleAssignments query + deny assignment ownership (createdBy)'
  narrative: '{principal.name} can delete blueprint assignments or deployment stacks (blueprintAssignments/delete
    or deploymentStacks/delete), which removes their system-managed deny assignments.'
move · open · esc close