Add Front Door WAF managed rule exception commands#10062
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| network front-door waf-policy managed-rules exception | sub group network front-door waf-policy managed-rules exception added |
|
Hi @Ptnan7, |
There was a problem hiding this comment.
Pull request overview
This PR adds new Front Door WAF policy managed rule exception subcommands (generated AAZ) and validates them with a new end-to-end scenario test plus recording.
Changes:
- Add generated
az network front-door waf-policy managed-rules exceptioncommands:add,list,remove, andwait. - Add a scenario test covering exception add/list/remove.
- Add a new VCR recording for the scenario test.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/front-door/azext_front_door/tests/latest/test_waf_scenarios.py | Adds a scenario test for managed rule exception add/list/remove. |
| src/front-door/azext_front_door/tests/latest/recordings/test_waf_policy_managed_rules_exceptions.yaml | Adds the recorded HTTP interactions for the new scenario test. |
| src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/managed_rules/exception/_add.py | Implements the generated exception add command and argument schema. |
| src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/managed_rules/exception/_list.py | Implements the generated exception list command. |
| src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/managed_rules/exception/_remove.py | Implements the generated exception remove command and LRO behavior. |
| src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/managed_rules/exception/_wait.py | Implements the generated exception wait command. |
| src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/managed_rules/exception/__cmd_group.py | Registers the new exception command group. |
| src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/managed_rules/exception/init.py | Exposes the new exception command group modules. |
| src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/managed_rules/__cmd_group.py | Registers the managed-rules command group (AAZ side). |
| src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/managed_rules/init.py | Exposes the new managed-rules command group module. |
| _args_schema.exception_index = AAZIntArg( | ||
| options=["--exception-index"], | ||
| ) |
| _args_schema.exception_index = AAZIntArg( | ||
| options=["--exception-index"], | ||
| required=True, | ||
| ) |
| """Manage Exception | ||
| """ |
| """List Exception | ||
| """ |
| """Create Exception | ||
| """ |
| """Delete Exception | ||
| """ |
bc8f2f8 to
0ec535d
Compare
|
Updated to address CI linter findings: added help for --exception-index on generated add/remove commands and added --selector-operator as a shorter alias for --selector-match-operator. Validation rerun:
|
|
Updated to address the I pushed a separate commit that updates only that digest in Validation:
|
|
Updated to address the diff-aware Changes:
Validation:
|
This reverts commit 69c9673.
|
[Release] Update index.json for extension [ front-door-2.3.0 ] : https://dev.azure.com/msazure/One/_build/results?buildId=170669213&view=results |
|
Front Door WAF |
Summary:
add,list, andremovecommands.Related:
Validation:
azdev linter front-door -t command_groups commands paramsazdev test test_waf_policy_managed_rules_exceptions --profile latest --discoverpython -m py_compile extension\src\front-door\azext_front_door\tests\latest\test_waf_scenarios.py