Azure / Azure/azure-powershell
New-AzFirewallPolicyApplicationRule Forces Protocol to Https:443
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
Currently when running New-AzFirewallPolicyApplicationRule -Protocol "Http:80". It is forced to use FQDNTag and gets forced into Https protocol
Because FQDN tag is required https is always injected
https://github.com/Azure/azure-powershell/blob/3a3d8b09636473bf109121175a41131a5f113f1a/src/Network/Network/AzureFirewallPolicy/ApplicationRuleCondition/NewAzureFirewallPolicyApplicationRuleCommand.cs#L162
### Issue script & Debug output
```PowerShell
bewaters $apprule = New-AzFirewallPolicyApplicationRule -Name "rule" -SourceIpGroup $ipg.Id -WebCategory "Games" -Protocol "Http:80" -FqdnTag "HDInsight"
bewaters $appRule
SourceAddresses :
TargetFqdns :
FqdnTags : {HDInsight}
Protocols : {Microsoft.Azure.Commands.Network.Models.PSAzureFirewallPolicyApplicationRuleProtocol}
SourceIpGroups : {/subscriptions/e7eb2257-46e4-4826-94df-153853fea38f/resourcegroups/bewatersrepro/providers/Microsoft.Network/ipGroups/repro}
WebCategories : {Games}
TargetUrls :
TerminateTLS :
HttpHeadersToInsert :
Description :
ProtocolsText : [
{
"protocolType": "Https",
"port": 443
}
]
SourceAddressesText : null
SourceIpGroupsText : [
"/subscriptions/e7eb2257-46e4-4826-94df-153853fea38f/resourcegroups/bewatersrepro/providers/Microsoft.Network/ipGroups/repro"
]
TargetFqdnsText : null
FqdnTagsText : [
"HDInsight"
]
WebCategoriesText : [
"Games"
]
TargetUrlsText : null
HttpHeadersToInsertText : null
Name : rule
RuleType : ApplicationRule
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 5.1.26100.4768
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.4768
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```
### Module versions
```PowerShell
Get-Module Az.Network
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 7.19.1 Az.Network
```
### Error output
```PowerShell
```
Contributor guide
Research direction
Start with src/Network/Network/AzureFirewallPolicy/ApplicationRuleCondition/NewAzureFirewallPolicyApplicationRuleCommand.cs around line 162 and reproduce the issue with the PowerShell command shown. Trace how the protocol and FQDN tag are combined; done means specifying Http:80 preserves Http:80 instead of producing Https:443.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100