Skip to content

Add hardcoded minimum TLS version 1.2 to Storage account creation tool#1445

Merged
alzimmermsft merged 2 commits intomicrosoft:mainfrom
alzimmermsft:StorageAccountCreateMinTls1.2
Jan 7, 2026
Merged

Add hardcoded minimum TLS version 1.2 to Storage account creation tool#1445
alzimmermsft merged 2 commits intomicrosoft:mainfrom
alzimmermsft:StorageAccountCreateMinTls1.2

Conversation

@alzimmermsft
Copy link
Copy Markdown
Contributor

What does this PR do?

Updates the AccountCreateCommand in Storage to hardcode in a minimum TLS version 1.2. This is done as TLS 1.0 and 1.1 will soon be deprecated and a minimum of 1.2 should be used to prevent failures in the future.

GitHub issue number?

Resolves #1270

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
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • 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 using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • 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 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 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

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 addresses issue #1270 by adding hardcoded minimum TLS version 1.2 to the Storage account creation tool, enabling storage account creation in Azure subscriptions with policy restrictions that require TLS 1.2 or higher.

Key Changes:

  • Added MinimumTlsVersion property to StorageAccountProperties model and set it to "TLS1_2" in the storage account creation logic
  • Updated test recordings to reflect the modified request payload
  • Added changelog entry documenting the change

Reviewed changes

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

Show a summary per file
File Description
tools/Azure.Mcp.Tools.Storage/src/Services/StorageService.cs Sets MinimumTlsVersion to "TLS1_2" in the storage account creation request
tools/Azure.Mcp.Tools.Storage/src/Services/Models/StorageAccountProperties.cs Adds MinimumTlsVersion property to the model
tools/Azure.Mcp.Tools.Storage/src/Services/Models/StorageAccountCreateOrUpdateContent.cs Reformats XML documentation comments (unrelated style changes)
tools/Azure.Mcp.Tools.Storage/tests/Azure.Mcp.Tools.Storage.LiveTests/assets.json Updates test recording tag to reflect new test recordings with TLS version in payload
servers/Azure.Mcp.Server/changelog-entries/1767737468205.yaml Adds changelog entry for the TLS version update
eng/scripts/Compile-Changelog.ps1 Inadvertently modifies documentation example (appears unintentional)

Comment thread eng/scripts/Compile-Changelog.ps1 Outdated
Comment thread tools/Azure.Mcp.Tools.Storage/src/Services/StorageService.cs
@xiangyan99
Copy link
Copy Markdown
Member

Isn't it the default value on the service side?

@alzimmermsft
Copy link
Copy Markdown
Contributor Author

Isn't it the default value on the service side?

It's actually TLS 1.0 based on the Bicep documentation

https://learn.microsoft.com/en-us/azure/templates/microsoft.storage/storageaccounts?pivots=deployment-language-bicep#storageaccountpropertiescreateparametersorstorageaccountproperties

Though I'm guessing that'll change to 1.2 in the future when 1.0 and 1.1 are deprecated

Copy link
Copy Markdown

@kyleknap kyleknap left a comment

Choose a reason for hiding this comment

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

🚢 This looks good to me. TLS 1.0 and 1.1 are not secure and resource set up from the MCP server should be representing best practices (which would entail not allowing those insecure protocols). In the future, we can consider exposing the min TLS version as part of the public MCP tool interface, but I think it makes sense holding off until requested for now as we are doing in the PR.

@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Jan 7, 2026
@alzimmermsft alzimmermsft merged commit 7a7c537 into microsoft:main Jan 7, 2026
27 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Jan 7, 2026
@alzimmermsft alzimmermsft deleted the StorageAccountCreateMinTls1.2 branch January 7, 2026 22:01
vcolin7 pushed a commit that referenced this pull request Jan 7, 2026
#1445)

* Add hardcoded minimum TLS version 1.2 to Storage account creation tool

* Revert accidental cut and paste, rather than copy and paste
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Apr 20, 2026
microsoft#1445)

* Add hardcoded minimum TLS version 1.2 to Storage account creation tool

* Revert accidental cut and paste, rather than copy and paste
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.

[BUG]Azure MCP cannot create Storage Accounts in policy-restricted environments because TLS1_2 cannot be set

4 participants