Skip to content

Conversation

@yifanz7
Copy link
Member

@yifanz7 yifanz7 commented Jan 20, 2026

Description

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

Copilot AI review requested due to automatic review settings January 20, 2026 06:55
@azure-client-tools-bot-prd
Copy link

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

Copy link
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 pull request adds support for encryption in transit configuration for both SMB and NFS protocols in Azure Storage file service properties.

Changes:

  • Added new PowerShell parameters SmbEncryptionInTransitRequired and NfsEncryptionInTransitRequired to Update-AzStorageFileServiceProperty cmdlet
  • Extended model classes to support NFS settings and encryption in transit properties
  • Updated display format to show the new encryption in transit properties
  • Added comprehensive test coverage for both SMB and NFS encryption in transit scenarios

Reviewed changes

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

Show a summary per file
File Description
Storage.Management.format.ps1xml Added display entries for SMB and NFS encryption in transit properties in the file service properties list view
PSFileServiceProperties.cs Extended model classes with PSNfsSetting and PSEncryptionInTransit to represent the new encryption in transit settings
UpdateAzAzStorageFileServiceProperty.cs Added two new boolean parameters for SMB and NFS encryption in transit, with implementation logic to set these properties on file service
ChangeLog.md Documented the new encryption in transit support feature in the upcoming release section
StorageFileTests.ps1 Added test scenarios validating both SMB and NFS encryption in transit can be enabled and disabled


[Parameter(
Mandatory = false,
HelpMessage = "Enable Multichannel by set to $true, disable Multichannel by set to $false. Applies to Premium FileStorage only.")]
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The help message incorrectly describes this parameter as "Enable Multichannel" when it should describe SMB encryption in transit functionality. Update the help message to accurately describe this parameter's purpose, such as "Enable or disable encryption in transit for SMB protocol. Set to $true to require encryption, $false to disable."

Suggested change
HelpMessage = "Enable Multichannel by set to $true, disable Multichannel by set to $false. Applies to Premium FileStorage only.")]
HelpMessage = "Enable or disable encryption in transit for SMB protocol. Set to $true to require encryption, $false to disable. Applies to Premium FileStorage only.")]

Copilot uses AI. Check for mistakes.

[Parameter(
Mandatory = false,
HelpMessage = "Enable Multichannel by set to $true, disable Multichannel by set to $false. Applies to Premium FileStorage only.")]
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The help message incorrectly describes this parameter as "Enable Multichannel" when it should describe NFS encryption in transit functionality. Update the help message to accurately describe this parameter's purpose, such as "Enable or disable encryption in transit for NFS protocol. Set to $true to require encryption, $false to disable."

Suggested change
HelpMessage = "Enable Multichannel by set to $true, disable Multichannel by set to $false. Applies to Premium FileStorage only.")]
HelpMessage = "Enable or disable encryption in transit for NFS protocol. Set to $true to require encryption, $false to disable.")]

Copilot uses AI. Check for mistakes.
<ListItem>
<Label>ProtocolSettings.Nfs.EncryptionInTransit.Required</Label>
<ScriptBlock>$_.ProtocolSettings.Nfs.EncryptionInTransit.Required</ScriptBlock>
</ListItem>
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

There is trailing whitespace at the end of this line. Remove the trailing whitespace to maintain code consistency.

Suggested change
</ListItem>
</ListItem>

Copilot uses AI. Check for mistakes.
Comment on lines 290 to 293
if (protocolSettings.Smb.EncryptionInTransit == null)
{
protocolSettings.Smb.EncryptionInTransit = new EncryptionInTransit(this.smbEncryptionInTransitRequired);
}
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The null check for protocolSettings.Smb.EncryptionInTransit is unnecessary since a new SmbSetting instance is always created at line 266, which would have this property as null by default. For consistency with the similar Multichannel property handling (lines 283-287), remove the inner null check and directly instantiate the EncryptionInTransit object.

Suggested change
if (protocolSettings.Smb.EncryptionInTransit == null)
{
protocolSettings.Smb.EncryptionInTransit = new EncryptionInTransit(this.smbEncryptionInTransitRequired);
}
protocolSettings.Smb.EncryptionInTransit = new EncryptionInTransit(this.smbEncryptionInTransitRequired);

Copilot uses AI. Check for mistakes.
this.SmbKerberosTicketEncryption != null ||
this.SmbChannelEncryption != null ||
this.enableSmbMultichannel != null)
this.enableSmbMultichannel != null ||
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

There is trailing whitespace at the end of this line. Remove the trailing whitespace to maintain code consistency.

Copilot uses AI. Check for mistakes.
}
}

public class PSEncryptionInTransit {
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

There is trailing whitespace at the end of this line after the opening brace. Remove the trailing whitespace to maintain code consistency.

Suggested change
public class PSEncryptionInTransit {
public class PSEncryptionInTransit {

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings January 20, 2026 07:28
Copy link
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

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

Copy link
Contributor

@vidai-msft vidai-msft left a comment

Choose a reason for hiding this comment

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

Please update the help doc since new params have been introduced.

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.

3 participants