Expose FrontDoor WAF managed rule exceptions#29792
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for Managed Rule Set exceptions in Az.FrontDoor WAF policy cmdlets, including new helper cmdlets and documentation updates.
Changes:
- Introduces
-ExceptionListExceptionforNew-AzFrontDoorWafPolicyandUpdate-AzFrontDoorWafPolicy. - Adds new in-memory object constructor cmdlets for rule scope/group scope/managed rule set scope/managed rule set exception.
- Updates module exports and command index docs to include the new cmdlets.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/FrontDoor/FrontDoor/help/Update-AzFrontDoorWafPolicy.md | Documents new -ExceptionListException parameter for update. |
| src/FrontDoor/FrontDoor/help/New-AzFrontDoorWafRuleScopeObject.md | Adds help page for the new scope object constructor cmdlet. |
| src/FrontDoor/FrontDoor/help/New-AzFrontDoorWafRuleGroupScopeObject.md | Adds help page for the new rule group scope constructor cmdlet. |
| src/FrontDoor/FrontDoor/help/New-AzFrontDoorWafPolicy.md | Documents new -ExceptionListException parameter for create. |
| src/FrontDoor/FrontDoor/help/New-AzFrontDoorWafManagedRuleSetScopeObject.md | Adds help page for the new managed rule set scope constructor cmdlet. |
| src/FrontDoor/FrontDoor/help/New-AzFrontDoorWafManagedRuleSetExceptionObject.md | Adds help page for the new managed rule set exception constructor cmdlet. |
| src/FrontDoor/FrontDoor/help/Az.FrontDoor.md | Adds new cmdlets to the module command index. |
| src/FrontDoor/FrontDoor/Az.FrontDoor.psd1 | Exports newly added cmdlets from the module manifest. |
| src/FrontDoor/FrontDoor.Autorest/examples/New-AzFrontDoorWafRuleScopeObject.md | Adds example for the new rule scope constructor cmdlet. |
| src/FrontDoor/FrontDoor.Autorest/examples/New-AzFrontDoorWafRuleGroupScopeObject.md | Adds example for the new rule group scope constructor cmdlet. |
| src/FrontDoor/FrontDoor.Autorest/examples/New-AzFrontDoorWafManagedRuleSetScopeObject.md | Adds example for the new managed rule set scope constructor cmdlet. |
| src/FrontDoor/FrontDoor.Autorest/examples/New-AzFrontDoorWafManagedRuleSetExceptionObject.md | Adds example for the new managed rule set exception constructor cmdlet. |
| src/FrontDoor/FrontDoor.Autorest/docs/Update-AzFrontDoorWafPolicy.md | Updates reference docs to include -ExceptionListException. |
| src/FrontDoor/FrontDoor.Autorest/docs/New-AzFrontDoorWafRuleScopeObject.md | Adds reference docs for the new rule scope constructor cmdlet. |
| src/FrontDoor/FrontDoor.Autorest/docs/New-AzFrontDoorWafRuleGroupScopeObject.md | Adds reference docs for the new rule group scope constructor cmdlet. |
| src/FrontDoor/FrontDoor.Autorest/docs/New-AzFrontDoorWafPolicy.md | Updates reference docs to include -ExceptionListException. |
| src/FrontDoor/FrontDoor.Autorest/docs/New-AzFrontDoorWafManagedRuleSetScopeObject.md | Adds reference docs for the new managed rule set scope constructor cmdlet. |
| src/FrontDoor/FrontDoor.Autorest/docs/New-AzFrontDoorWafManagedRuleSetExceptionObject.md | Adds reference docs for the new managed rule set exception constructor cmdlet. |
| src/FrontDoor/FrontDoor.Autorest/docs/Az.FrontDoor.md | Updates Autorest command index with new cmdlets. |
| src/FrontDoor/FrontDoor.Autorest/custom/autogen-model-cmdlets/New-AzFrontDoorWafRuleScopeObject.ps1 | Implements new rule scope in-memory object constructor. |
| src/FrontDoor/FrontDoor.Autorest/custom/autogen-model-cmdlets/New-AzFrontDoorWafRuleGroupScopeObject.ps1 | Implements new rule group scope in-memory object constructor. |
| src/FrontDoor/FrontDoor.Autorest/custom/autogen-model-cmdlets/New-AzFrontDoorWafManagedRuleSetScopeObject.ps1 | Implements new managed rule set scope in-memory object constructor. |
| src/FrontDoor/FrontDoor.Autorest/custom/autogen-model-cmdlets/New-AzFrontDoorWafManagedRuleSetExceptionObject.ps1 | Implements new managed rule set exception in-memory object constructor. |
| src/FrontDoor/FrontDoor.Autorest/custom/Update-AzFrontDoorWafPolicy.ps1 | Wires the new -ExceptionListException parameter into update flow. |
| src/FrontDoor/FrontDoor.Autorest/custom/New-AzFrontDoorWafPolicy.ps1 | Wires the new -ExceptionListException parameter into create flow. |
| if ($PSBoundParameters.ContainsKey('ManagedRuleSet')) { | ||
| $null = $PSBoundParameters.Remove('ManagedRuleSet') | ||
| } | ||
|
|
||
| $hasExceptionListException = $PSBoundParameters.Remove('ExceptionListException') |
| if ($PSBoundParameters.ContainsKey('ManagedRuleSet')) { | ||
| $null = $PSBoundParameters.Remove('ManagedRuleSet') | ||
| } | ||
|
|
||
| $hasExceptionListException = $PSBoundParameters.Remove('ExceptionListException') |
| Update-AzFrontDoorWafPolicy -Name <String> -ResourceGroupName <String> [-SubscriptionId <String>] | ||
| [-Customrule <ICustomRule[]>] [-Etag <String>] [-ManagedRuleSet <IManagedRuleSet[]>] | ||
| [-CustomBlockResponseBody <String>] [-CustomBlockResponseStatusCode <Int32>] [-EnabledState <String>] | ||
| [-Customrule <ICustomRule[]>] [-Etag <String>] [-ExceptionListException <IManagedRuleSetException[]>] |
| --- | ||
| external help file: | ||
| Module Name: Az.FrontDoor |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code |
Pan-Qi
left a comment
There was a problem hiding this comment.
Hi, is the change expected to be released? If so, please update changelog. Besides, please double check the business logic, there are several type concerns from AI.
|
Command 'run/' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Updated the branch to address the Analyze static-analysis failure for the generated FrontDoor WAF object helper examples. Change:
Validation:
|
|
Updated the branch again to preserve the generated object-helper examples. Root cause/fix:
Validation:
|
| $null = $PSBoundParameters.Remove('ManagedRuleSet') | ||
| } | ||
|
|
||
| $hasExceptionListException = $PSBoundParameters.Remove('ExceptionListException') |
| $null = $PSBoundParameters.Remove('ManagedRuleSet') | ||
| } | ||
|
|
||
| $hasExceptionListException = $PSBoundParameters.Remove('ExceptionListException') |
| [Parameter()] | ||
| [AllowEmptyCollection()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FrontDoor.Category('Body')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FrontDoor.Models.IManagedRuleSetException[]] | ||
| # List of exceptions. | ||
| ${ExceptionListException}, |
| "Az.FrontDoor","New-AzFrontDoorWafManagedRuleSetExceptionObject","1","1","Invalid_Cmdlet","5000","1","New-AzFrontDoorWafRuleScopeObject is not a valid command name.","New-AzFrontDoorWafRuleScopeObject -RuleId 942100","Check the spell of New-AzFrontDoorWafRuleScopeObject." | ||
| "Az.FrontDoor","New-AzFrontDoorWafManagedRuleSetExceptionObject","1","2","Invalid_Cmdlet","5000","1","New-AzFrontDoorWafRuleGroupScopeObject is not a valid command name.","New-AzFrontDoorWafRuleGroupScopeObject -RuleGroupName SQLI -RuleScope $ruleScope","Check the spell of New-AzFrontDoorWafRuleGroupScopeObject." | ||
| "Az.FrontDoor","New-AzFrontDoorWafManagedRuleSetExceptionObject","1","3","Invalid_Cmdlet","5000","1","New-AzFrontDoorWafManagedRuleSetScopeObject is not a valid command name.","New-AzFrontDoorWafManagedRuleSetScopeObject -RuleSetType DefaultRuleSet -RuleSetVersion 1.0 -RuleGroupScope $ruleGroupScope","Check the spell of New-AzFrontDoorWafManagedRuleSetScopeObject." | ||
| "Az.FrontDoor","New-AzFrontDoorWafManagedRuleSetExceptionObject","1","4","Invalid_Cmdlet","5000","1","New-AzFrontDoorWafManagedRuleSetExceptionObject is not a valid command name.","New-AzFrontDoorWafManagedRuleSetExceptionObject -MatchVariable RequestHeaderNames -SelectorMatchOperator Equals -Selector User-Agent -ValueMatchOperator Equals -MatchValue curl -Scope $managedRuleSetScope","Check the spell of New-AzFrontDoorWafManagedRuleSetExceptionObject." |
|
Updated again with a root-cause fix instead of static-analysis exceptions. Root cause:
Fix:
Validation:
|
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Updated with regenerated FrontDoor build artifacts after running Validation:
|
|
Updated per review: removed Current state:
Validation:
|
| $null = $PSBoundParameters.Remove('ManagedRuleSet') | ||
| } | ||
|
|
||
| $hasExceptionListException = $PSBoundParameters.Remove('ExceptionListException') |
| $null = $PSBoundParameters.Remove('ManagedRuleSet') | ||
| } | ||
|
|
||
| $hasExceptionListException = $PSBoundParameters.Remove('ExceptionListException') |
| ${LogScrubbingSetting}, | ||
|
|
||
| [Parameter(ParameterSetName='CreateExpanded')] | ||
| [AllowEmptyCollection()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FrontDoor.Category('Body')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FrontDoor.Models.IManagedRuleSetException[]] | ||
| # List of exceptions. | ||
| ${ExceptionListException}, | ||
|
|
||
| [Parameter(ParameterSetName='CreateExpanded')] | ||
| [AllowEmptyCollection()] | ||
| [Alias("ManagedRule")] |
| ${Etag}, | ||
|
|
||
| [Parameter()] | ||
| [AllowEmptyCollection()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FrontDoor.Category('Body')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FrontDoor.Models.IManagedRuleSetException[]] | ||
| # List of exceptions. | ||
| ${ExceptionListException}, | ||
|
|
| ### -ExceptionListException | ||
| List of exceptions. |
| ### -ExceptionListException | ||
| List of exceptions. |
| ### -ExceptionListException | ||
| List of exceptions. |
| ### -ExceptionListException | ||
| List of exceptions. |
| $null = $PSBoundParameters.Remove('ManagedRuleSet') | ||
| } | ||
|
|
||
| $hasExceptionListException = $PSBoundParameters.Remove('ExceptionListException') |
| $null = $PSBoundParameters.Remove('ManagedRuleSet') | ||
| } | ||
|
|
||
| $hasExceptionListException = $PSBoundParameters.Remove('ExceptionListException') |
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.