Skip to content

Updated New-AzFirewallPolicyApplicationRule to only use HTTPS as the default Protocol for FqdnTag rules #28027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ajtms
Copy link
Member

@ajtms ajtms commented Jun 25, 2025

Description

Overview

Changed the default protocol to be https (instead of https, http, mssql) for new FQDN tag application rules. Added a test scenario and record to confirm new default protocol and confirm that manually setting the protocol for FQDN tag application rules is not allowed.

Additional changes

Replaced a packet capture URL secret with a fake URL and updated the accompanying test records with the same fake URL.

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

…tp,mssql) for new application rules. Added a test scenario and record to confirm new default protocol and confirm that manually setting the protocol for FqdnTag application rules is not allowed.
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@ajtms ajtms marked this pull request as ready for review June 26, 2025 02:39
@Copilot Copilot AI review requested due to automatic review settings June 26, 2025 02:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the default protocol for FQDN Tag application rules in Azure Firewall Policy to use only HTTPS. The changes remove the previously allowed protocols ("http" and "mssql") and include new tests to validate the default behavior and disallow manual protocol overrides.

  • Updated the default protocol in the application rule command.
  • Added and updated tests (both PowerShell and C#) for FQDN Tag rules.
  • Updated the changelog accordingly.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Network/Network/ChangeLog.md Updated changelog entry for the new default protocol.
src/Network/Network/AzureFirewallPolicy/ApplicationRuleCondition/NewAzureFirewallPolicyApplicationRuleCommand.cs Modified protocol array to include only "https" for FQDN Tag rules.
src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.AzureFirewallPolicyTests/TestAzureFirewallPolicyApplicationRuleFqdnTagDefaultProtocol.json Added test record for verifying default protocol.
src/Network/Network.Test/ScenarioTests/AzureFirewallPolicyTests.ps1 Added a new test function to check protocol behavior.
src/Network/Network.Test/ScenarioTests/AzureFirewallPolicyTests.cs Added a test method for FQDN Tag default protocol verification.
Comments suppressed due to low confidence (1)

src/Network/Network/AzureFirewallPolicy/ApplicationRuleCondition/NewAzureFirewallPolicyApplicationRuleCommand.cs:164

  • Ensure that the protocol string 'https' is normalized to 'Https' as expected by the tests to maintain consistency with documented behavior.
                this.Protocol = new string[] {"https"}; // "http" and "mssql" are not allowed for FqdnTags

@YanaXu
Copy link
Contributor

YanaXu commented Jun 26, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

…proxy CRUD test. Includes replacing the secrets in the session records.
@ajtms
Copy link
Member Author

ajtms commented Jun 26, 2025

/azp run

Copy link
Contributor

Commenter does not have sufficient privileges for PR 28027 in repo Azure/azure-powershell

@YanaXu
Copy link
Contributor

YanaXu commented Jul 1, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@YanaXu YanaXu merged commit 02f92f5 into Azure:main Jul 1, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants