Skip to content

Commit

Permalink
Enable support for multi auth for p2sVpnGateway (#13749)
Browse files Browse the repository at this point in the history
* enable multi Auth for p2sVpnGateway

* allow multi auth for update-vpnServerConfig

* fix update

* Update ChangeLog.md

Co-authored-by: Yunchi Wang <[email protected]>
  • Loading branch information
neethirshetty and wyunchi-ms authored Dec 16, 2020
1 parent de80a83 commit 42b6219
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 86 deletions.
2 changes: 2 additions & 0 deletions src/Network/Network/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
## Upcoming Release
* Bugfix in Remove peering and connection commandlet for ExpressrouteCircuit scenario
- Remove-AzExpressRouteCircuitPeeringConfig and Remove-AzExpressRouteCircuitConnectionConfig
* Added multiple Authentication support for p2sVpnGateway
- Updated `New-AzVpnServerConfiguration` and `Update-AzVpnServerConfiguration` to allow multiple authentication parameters to be set.
## Version 4.3.0
* Updated below cmdlet
- `New-AzLoadBalancerFrontendIpConfigCommand`, `Set-AzLoadBalancerFrontendIpConfigCommand`, `Add-AzLoadBalancerFrontendIpConfigCommand`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Microsoft.Azure.Commands.Network

[Cmdlet(VerbsCommon.New,
ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VpnServerConfiguration",
DefaultParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByCertificateAuthentication,
SupportsShouldProcess = true),
OutputType(typeof(PSVpnServerConfiguration))]
public class NewAzureRmVpnServerConfigurationCommand : VpnServerConfigurationBaseCmdlet
Expand Down Expand Up @@ -76,64 +75,54 @@ public class NewAzureRmVpnServerConfigurationCommand : VpnServerConfigurationBas

[Parameter(
Mandatory = false,
ParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByCertificateAuthentication,
HelpMessage = "A list of VpnClientRootCertificates to be added files' paths")]
public string[] VpnClientRootCertificateFilesList { get; set; }

[Parameter(
Mandatory = false,
ParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByCertificateAuthentication,
HelpMessage = "A list of VpnClientCertificates to be revoked files' paths")]
public string[] VpnClientRevokedCertificateFilesList { get; set; }

[Parameter(
Mandatory = false,
ParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByRadiusAuthentication,
HelpMessage = "P2S External Radius server address.")]
public string RadiusServerAddress { get; set; }

[Parameter(
Mandatory = false,
ParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByRadiusAuthentication,
HelpMessage = "P2S External Radius server secret.")]
public SecureString RadiusServerSecret { get; set; }

[Parameter(
Mandatory = false,
ParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByRadiusAuthentication,
HelpMessage = "P2S External multiple radius servers.")]
public PSRadiusServer[] RadiusServerList { get; set; }

[Parameter(
Mandatory = false,
ParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByRadiusAuthentication,
HelpMessage = "A list of RadiusClientRootCertificate files' paths")]
public string[] RadiusServerRootCertificateFilesList { get; set; }

[Parameter(
Mandatory = false,
ParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByRadiusAuthentication,
HelpMessage = "A list of RadiusClientRootCertificate files' paths")]
public string[] RadiusClientRootCertificateFilesList { get; set; }

[Parameter(
Mandatory = false,
ParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByAadAuthentication,
HelpMessage = "AAD tenant for P2S AAD authentication.")]
[ValidateNotNullOrEmpty]
public string AadTenant { get; set; }

[Parameter(
Mandatory = false,
ParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByAadAuthentication,
HelpMessage = "AAD audience for P2S AAD authentication.")]
[ValidateNotNullOrEmpty]
public string AadAudience { get; set; }


[Parameter(
Mandatory = false,
ParameterSetName = CortexParameterSetNames.ByVpnServerConfigurationName + CortexParameterSetNames.ByAadAuthentication,
HelpMessage = "AAD issuer for P2S AAD authentication.")]
[ValidateNotNullOrEmpty]
public string AadIssuer { get; set; }
Expand Down
Loading

0 comments on commit 42b6219

Please sign in to comment.