azure-stack-deny-settings-change
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 |
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.'