{FrontDoor}Add --sensitivity parameter to waf-policy managed-rules override add#9605
{FrontDoor}Add --sensitivity parameter to waf-policy managed-rules override add#9605necusjz merged 2 commits intoAzure:mainfrom
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| network front-door waf-policy managed-rules override add | cmd network front-door waf-policy managed-rules override add added parameter sensitivity |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
There was a problem hiding this comment.
Pull request overview
This PR updates the front-door Azure CLI extension to support configuring managed rule override sensitivity for Front Door WAF policies, primarily to enable DDoS managed rule set override scenarios.
Changes:
- Add
--sensitivitytoaz network front-door waf-policy managed-rules override addand serialize it into the override payload. - Bump extension version to
2.0.1. - Document the change in
HISTORY.rst.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/front-door/azext_front_door/custom_waf.py |
Adds --sensitivity argument and includes it in the managed rule override body. |
src/front-door/setup.py |
Version bump to 2.0.1. |
src/front-door/HISTORY.rst |
Adds release note entry for the new --sensitivity parameter. |
| args_schema.sensitivity = AAZStrArg( | ||
| options=['--sensitivity'], | ||
| help='Describes the override sensitivity to be applied when rule matches.', | ||
| enum={ | ||
| 'High': 'High', | ||
| 'Medium': 'Medium', | ||
| 'Low': 'Low' | ||
| }, | ||
| ) |
There was a problem hiding this comment.
New --sensitivity behavior is added here but there’s no test exercising it. Since this extension already has scenario coverage for managed-rules override add (see existing WAF scenario tests), please add/extend a test to call the command with --sensitivity (e.g., High/Medium/Low) and assert the returned override includes the expected sensitivity value so regressions are caught.
abe6c5c to
ffafad5
Compare
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
[Release] Update index.json for extension [ front-door-2.1.0 ] : https://dev.azure.com/msazure/One/_build/results?buildId=153376041&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.