Fix Security issue with target FQDN Wildcard in New-AzFirewallApplicationRuleCollection.md
Description of the new feature
azure-powershell/src/Network/Network/help/New-AzFirewallApplicationRuleCollection.md in example 2 we are instructed to allow network traffic to google.com and microsoft.com, but the wildcard is allowing adding any characters to the left in domainname.com resulting in an unwanted firewall opening to sites like:
foogoogle.com and barmicrosoft.com
this is a copy of the example in the help file New-AzFirewallApplicationRuleCollection.md
New-AzFirewallApplicationRule -Name R1 -Protocol "http:80","https:443" -TargetFqdn "*google.com", "*microsoft.com"
Proposed implementation details (optional)
New-AzFirewallApplicationRuleCollection.md needs to be edited to New-AzFirewallApplicationRule -Name R1 -Protocol "http:80","https:443" -TargetFqdn "*.google.com", "*.microsoft.com"
(notice the . dot between * star and domainname)
@fanymanea could you please take a look?
I am beginning to think there is a issue with Azure Firewall whitelisting google with the following gives different results:
"targetFqdns": [
"www.google.com",
"*.google.com"
does not allow traffic to google.com
"targetFqdns": [
"www.google.com",
"*google.com"
allows traffic to google.com and foobargoogle.com
Any Update on this?
@fanymanea can you please escalate a fix?
@jespernohr - apologies for the delayed response on this. We can fix the docs per your suggestion. The behavior is by design. Wildcards are supported on the left side only and replace any character.