Skip to content

Conversation

@huiii99
Copy link
Member

@huiii99 huiii99 commented Dec 11, 2025

Related command

az network vnet-gateway create
az network vnet-gateway update

az network vpn-connection create
az network vpn-connection update

Description

Add managed identity support to network vnet-gateway create/update
Add authentication-type and certificate-based auth to network vpn-connection create/update

Resolve #32380
aaz Azure/aaz#912

Testing Guide

  • live test:
    azdev test test_vnet_gateway_managed_identity --live --discover
    azdev test test_vpn_connection_authentication --live --discover

  • playback test after recording:
    azdev test test_vnet_gateway_managed_identity
    azdev test test_vpn_connection_authentication

History Notes
[Network] az network vnet-gateway: Add identity-related parameters and subgroup
[Network] az network vpn-connection: Add --auth-type and --cert-auth parameters


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Dec 11, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Dec 11, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️network
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd network vnet-gateway create cmd network vnet-gateway create added parameter mi_system_assigned
⚠️ 1006 - ParaAdd network vnet-gateway create cmd network vnet-gateway create added parameter mi_user_assigned
⚠️ 1011 - SubgroupAdd network vnet-gateway identity sub group network vnet-gateway identity added
⚠️ 1006 - ParaAdd network vpn-connection create cmd network vpn-connection create added parameter auth_type
⚠️ 1006 - ParaAdd network vpn-connection create cmd network vpn-connection create added parameter cert_auth
⚠️ 1006 - ParaAdd network vpn-connection update cmd network vpn-connection update added parameter authentication_type
⚠️ 1006 - ParaAdd network vpn-connection update cmd network vpn-connection update added parameter certificate_authentication

@yonzhan
Copy link
Collaborator

yonzhan commented Dec 11, 2025

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

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@microsoft-github-policy-service microsoft-github-policy-service bot added the Auto-Assign Auto assign by bot label Dec 11, 2025
@huiii99 huiii99 force-pushed the network-mi-vpn-cert branch from d0edfa6 to ea0d042 Compare December 12, 2025 02:38
@huiii99 huiii99 marked this pull request as ready for review December 12, 2025 03:16
Copilot AI review requested due to automatic review settings December 12, 2025 03:16
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 PR adds support for VPN Gateway Connection Certificate-based authentication and managed identity support for VNet gateways. The changes include:

  • Adding managed identity (user-assigned) support to VNet gateway create/update operations
  • Adding certificate-based authentication type to VPN connection create/update commands
  • Updating the Network API version from 2024-07-01 to 2025-01-01
  • Adding new identity management commands for VNet gateways

Reviewed changes

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

Show a summary per file
File Description
test_network_commands.py Adds two comprehensive test classes covering managed identity and certificate authentication scenarios
VpnGatewayoutboundcert.pfx, VpnGatewayInboundCert.cer, VpnGatewayAuthCert.cer Test certificate files for authentication scenarios
custom.py Uncomments managed identity parameters and adds auth parameters to vpn-connection create
vpn_connection/*.py AAZ-generated files updated with API version, authentication fields, and secret flags
vnet_gateway/*.py AAZ-generated files updated with API version and identity support
vnet_gateway/identity/*.py New identity management commands (assign/remove/show/wait)
_validators.py Adds validation logic to clear shared keys when using certificate authentication
_template_builder.py Updates API version and adds certificate auth parameters to template
_params.py Adds auth_type and cert_auth parameters with JSON parsing support
_help.py Adds documentation and examples for certificate authentication

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@huiii99 huiii99 force-pushed the network-mi-vpn-cert branch from fc1bd7f to e2df42e Compare December 12, 2025 05:29
@huiii99 huiii99 force-pushed the network-mi-vpn-cert branch from e2df42e to b8084a8 Compare December 15, 2025 05:57
@necusjz
Copy link
Member

necusjz commented Dec 16, 2025

identity-related interfaces must strictly follow
https://github.com/Azure/azure-cli/blob/20ffb2d35d59a104641d75aeb76b6f31885e26aa/doc/managed_identity_command_guideline.md

i.e., let's remove the parameters in the update command (subcommands are designed for that):
image

@necusjz
Copy link
Member

necusjz commented Jan 4, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@huiii99 huiii99 force-pushed the network-mi-vpn-cert branch from 0939f81 to ace8d36 Compare January 5, 2026 01:24
@huiii99 huiii99 force-pushed the network-mi-vpn-cert branch 3 times, most recently from b489e38 to 626c46a Compare January 7, 2026 10:32
…onnection

feat: add vpn connection authentication test

fix: cli linter error

fix: ci error

fix: add cli example

fix: dev

fix: fix review

fix: identity-related

dev

fix: network modules test cases error

fix: history tc failed

dev

dev

dev

fix: update test recording yaml

dev

dev
@huiii99 huiii99 force-pushed the network-mi-vpn-cert branch from 626c46a to 947c86f Compare January 8, 2026 01:55
@necusjz necusjz changed the title [Network] CLI support for VPN Gateway Connection Certificate based authentication {Network} CLI support for VPN Gateway Connection Certificate based authentication Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI for VPN Gateway Connection Certificate based authentication

3 participants