Skip to content

Commit b8f7930

Browse files
Add identity based exemption structure documentation
Added details on identity-based exemptions and assignment scope validation.
1 parent 870ecb9 commit b8f7930

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

articles/governance/policy/concepts/exemption-structure.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,32 @@ Exemptions support an optional property `resourceSelectors` that works the same
120120

121121
Regions can be added or removed from the `resourceLocation` list in the example. Resource selectors allow for greater flexibility of where and how exemptions can be created and managed.
122122

123+
### Identity based exemptions (preview)
124+
125+
You can leverage selector kinds userPrincipalId and groupPrincipalId within the exemption structure to enable a specific service principal, MSI, user, or security group to bypass a policy assignment's enforcement.
126+
127+
Take an example where you want to assign the built-in policy definition `Allowed virtual machine size SKUs` in your subscription to ensure that only A-family VMs can be deployed, with the exception of a high privileged group. You can use identity based conditions to exempt this group in your organization from this enforcement.
128+
129+
This is an example of an identity-based exemption:
130+
131+
```json
132+
"properties": {
133+
"policyAssignmentId": "/subscriptions/<subscriptionID>/providers/Microsoft.Authorization/policyAssignments/CostMgmt",
134+
"resourceSelectors": [{
135+
"name": "AllowedGroups",
136+
"selectors": [{
137+
"kind": "groupPrincipalId",
138+
"in": [ "<HighPrivEngGroupId>" ]
139+
},
140+
]
141+
}
142+
],
143+
"exemptionCategory": "Waiver",
144+
"displayName": "Exempt high SKU VM",
145+
"description": "Exempt high SKU VM for business need"
146+
}
147+
```
148+
123149
## Assignment scope validation (preview)
124150

125151
In most scenarios, the exemption scope is validated to ensure it's at or under the policy assignment scope. The optional `assignmentScopeValidation` property can allow an exemption to bypass this validation and be created outside of the assignment scope. This validation is intended for situations where a subscription needs to be moved from one management group (MG) to another, but the move would be blocked by policy due to properties of resources within the subscription. In this scenario, an exemption could be created for the subscription in its current MG to exempt its resources from a policy assignment on the destination MG. That way, when the subscription is moved into the destination MG, the operation isn't blocked because resources are already exempt from the policy assignment in question. The use of this property is shown in the following example:

0 commit comments

Comments
 (0)