Lion Cipher Lab
Keep Azure findings fixed with Azure Policy: pre-flight a rule, audit first, then deny and watch a create be refused (Azure assessment 6 of 6)
- Cloud Security
- Intermediate
- ~70 min
- Free · no account required
Why it matters
A fix is only as good as the next deployment. In lab 5 you closed three findings in code, but nothing stops a teammate, a script or a template from creating the same weakness tomorrow. Azure Policy is the guard that does: Audit shows every non-compliant resource, Deny refuses the request before the resource exists. Learning it on one empty resource group teaches the part most teams get wrong: roll out in the order audit, then deny, and know what an unset value and an existing resource do to your rule.
What you'll learn
- explaining Azure Policy effects Audit and Deny and their order of evaluation
- reading a policy rule's if and then blocks
- pre-flighting a rule against saved inventory before assigning it
- creating a policy definition and assignment with the Azure CLI
- scoping an assignment to one resource group
- reading compliance with az policy state
- reading a RequestDisallowedByPolicy error
- knowing an unset property can match a not-equals-false rule
- removing a policy assignment and definition cleanly
Steps in this lab
- The rule first: one throwaway resource group, then remove everything
- Audit and Deny: what each effect does, and which runs first
- Pre-flight the rule offline against your saved storage accounts
- Create the two definitions and the test resource group
- Audit first: assign, create a weak account, read compliance
- Then deny: switch the effect and watch a create be refused
- What the defender sees, and the rollout rule to keep
- Clean up completely
Open the full interactive lab →