azure-stack-deny-settings-change

explicit azure emits CanModifyPolicy

match (effective permission)

{ "action": "Microsoft.Resources/deploymentStacks/write", "scope_type": "subscription|managementGroup|resourceGroup" }

where

stack's denySettings is currently in a deny mode (denyAllActions | denyWriteAndDelete)

emit

source typeIdentity
target typeConditionalPolicy
source<principal>
target<deny assignment enforced by the stack>
permissionsMicrosoft.Resources/deploymentStacks/write
conditionsguardrail_owner_write

Narrative

{principal.name} can write a Deployment Stack with denySettings set to a deny mode (Microsoft.Resources/deploymentStacks/write), allowing them to change denySettings to remove the deny assignment.

Raw rule rules/explicit/azure-blueprints.yaml

id: azure-stack-deny-settings-change
emits: CanModifyPolicy
applies_to:
- azure
match_effective_permission:
  action: Microsoft.Resources/deploymentStacks/write
  scope_type: subscription|managementGroup|resourceGroup
where:
- stack's denySettings is currently in a deny mode (denyAllActions | denyWriteAndDelete)
emit:
  source_type: Identity
  target_type: ConditionalPolicy
  source: <principal>
  target: <deny assignment enforced by the stack>
  permissions:
  - Microsoft.Resources/deploymentStacks/write
  conditions:
  - guardrail_owner_write
  api_source: 'Azure ARM: roleAssignments query + stack denySettings check'
  narrative: '{principal.name} can write a Deployment Stack with denySettings set to a deny mode (Microsoft.Resources/deploymentStacks/write),
    allowing them to change denySettings to remove the deny assignment.'
move · open · esc close