Skip to content

Feature/sftp module #28373

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

DevanshG1
Copy link

@DevanshG1 DevanshG1 commented Aug 8, 2025

Add SFTP Module for Azure Storage Account Access

Description

This PR introduces a new SFTP module for Azure PowerShell that enables users to connect to Azure Storage Accounts via SFTP protocol with integrated Azure AD authentication.

Key Features:

  • New-AzSftpCertificate cmdlet for SSH certificate generation using Azure AD
  • Connect-AzSftp cmdlet for establishing SFTP connections to Azure Storage
  • Support for both Azure AD and local user authentication modes
  • Complete SFTP session management with automatic certificate handling
  • RSA key parsing and SSH utility functions

Use Cases:

  • Secure file transfers to Azure Storage using SFTP protocol
  • Integration with existing SSH workflows and tools
  • Automated certificate management for Azure Storage SFTP access

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

Devansh Goswami added 2 commits August 8, 2025 15:15
- New-AzSftpCertificate cmdlet for SSH certificate generation
- Connect-AzSftp cmdlet for SFTP connections
- Support for Azure AD and local user authentication
- Complete SFTP session management
- RSA parser and utility functions
- All files include proper Apache License 2.0 headers
Copy link

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

Copy link
Contributor

Thank you for your contribution @DevanshG1! We will review the pull request and get back to you soon.

@DevanshG1
Copy link
Author

@microsoft-github-policy-service agree company="Microsoft"

@NoriZC
Copy link
Contributor

NoriZC commented Aug 11, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@NoriZC
Copy link
Contributor

NoriZC commented Aug 11, 2025

Hi @DevanshG1, if you are an MSFT employee it is recommended for you to join the Azure Github organization. Otherwise your PR would be labelled as customer report

@Copilot Copilot AI review requested due to automatic review settings August 11, 2025 06:59
@DevanshG1
Copy link
Author

/azp run

Copy link
Contributor

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

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 introduces a new SFTP module for Azure PowerShell that enables secure connections to Azure Storage Accounts via SFTP protocol with integrated Azure AD authentication. The module provides consistent authentication methods aligned with the existing Az.Ssh module design.

Key features added:

  • New-AzSftpCertificate cmdlet for SSH certificate generation using Azure AD credentials
  • Connect-AzSftp cmdlet for establishing SFTP connections with multiple authentication modes
  • Support for Azure AD, certificate-based, SSH key, and local user authentication

Reviewed Changes

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

Show a summary per file
File Description
src/Sftp/Sftp/help/*.md Comprehensive help documentation for both new cmdlets with detailed examples and parameter descriptions
src/Sftp/Sftp/SftpCommands/*.cs Core cmdlet implementations with proper parameter sets and authentication flow handling
src/Sftp/Sftp/Models/*.cs Data models for session management, authentication files, and certificate information
src/Sftp/Sftp/Common/*.cs Utility classes for SSH operations, file management, and RSA key parsing
src/Sftp/Sftp/*.csproj Project configuration with appropriate dependencies and references
src/Sftp/Sftp.Test/**/*.cs Comprehensive unit test coverage for utilities, parsers, and scenario testing

Copy link
Contributor

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

@NoriZC
Copy link
Contributor

NoriZC commented Aug 12, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants