Skip to content

disable publicNetworkAccess by default(#2170)#2179

Merged
xiangyan99 merged 1 commit intorelease/azure/2.xfrom
disable_publicNetworkAccess_by_default_2.x
Mar 24, 2026
Merged

disable publicNetworkAccess by default(#2170)#2179
xiangyan99 merged 1 commit intorelease/azure/2.xfrom
disable_publicNetworkAccess_by_default_2.x

Conversation

@xiangyan99
Copy link
Copy Markdown
Member

  • disable publicNetworkAccess by defailt

  • update

What does this PR do?

[Provide a clear, concise description of the changes]

[Add additional context, screenshots, or information that helps reviewers]

GitHub issue number?

[Link to the GitHub issue this PR addresses]

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Created a changelog entry if the change falls among the following: new feature, bug fix, UI/UX update, breaking change, or updated dependencies. Follow the changelog entry guide
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes running the script ./eng/scripts/Process-PackageReadMe.ps1. See Package README
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For renamed tools, follow the Tool Rename Checklist and tag the PR with the breaking-change label
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated command list in servers/Azure.Mcp.Server/docs/azmcp-commands.md
    • Ran ./eng/scripts/Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • Updated test prompts in servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

* disable publicNetworkAccess by defailt

* update
Copy link
Copy Markdown
Contributor

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 Azure Managed Redis create flow to disable public network access by default and introduces a new CLI option so users can explicitly enable it when creating a resource.

Changes:

  • Added --public-network-access option to the Redis create command and plumbed it through command binding into IRedisService.CreateResourceAsync(...).
  • Updated the ARM/Bicep template parameters so publicNetworkAccess is parameterized and defaults to Disabled.
  • Expanded/added unit tests to validate the new option and the updated service call signature.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs Adds publicNetworkAccessEnabled handling and wires it into the deployment template parameters (default Disabled).
tools/Azure.Mcp.Tools.Redis/src/Services/IRedisService.cs Extends the create contract to accept publicNetworkAccessEnabled.
tools/Azure.Mcp.Tools.Redis/src/Commands/ResourceCreateCommand.cs Registers/binds the new CLI option and passes it to the service layer.
tools/Azure.Mcp.Tools.Redis/src/Options/RedisOptionDefinitions.cs Introduces the --public-network-access option definition.
tools/Azure.Mcp.Tools.Redis/src/Options/ResourceCreateOptions.cs Adds PublicNetworkAccessEnabled to the command options model.
tools/Azure.Mcp.Tools.Redis/src/Models/ManagedRedis/RedisCreateParameters.cs Adds the publicNetworkAccess parameter to the deployment parameter model.
tools/Azure.Mcp.Tools.Redis/tests/Azure.Mcp.Tools.Redis.UnitTests/ResourceCreateCommandTests.cs Updates tests for the new parameter and adds coverage for enabling public network access.
servers/Azure.Mcp.Server/changelog-entries/1774302063329.yaml Adds a changelog entry describing the new option and default behavior.

Comment thread servers/Azure.Mcp.Server/changelog-entries/1774302063329.yaml
Comment thread tools/Azure.Mcp.Tools.Redis/src/Options/RedisOptionDefinitions.cs
@xiangyan99 xiangyan99 changed the title disable publicNetworkAccess by defailt (#2170) disable publicNetworkAccess by default(#2170) Mar 24, 2026
@xiangyan99 xiangyan99 enabled auto-merge (squash) March 24, 2026 16:36
@xiangyan99 xiangyan99 merged commit 64b518c into release/azure/2.x Mar 24, 2026
31 checks passed
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Mar 24, 2026
@xiangyan99 xiangyan99 deleted the disable_publicNetworkAccess_by_default_2.x branch March 24, 2026 16:44
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants