Skip to content
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

Exposing two read-only properties of Application Gateway client certificate #14784

Merged
merged 8 commits into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3297,7 +3297,7 @@ function Test-ApplicationGatewayCRUDWithMutualAuthentication
$gwSubnet = Get-AzVirtualNetworkSubnetConfig -Name $gwSubnetName -VirtualNetwork $vnet

# Create public ip
$publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Static -sku Standard
$publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -Zone 1,2 -AllocationMethod Static -sku Standard

# Create ip configuration
$gipconfig = New-AzApplicationGatewayIPConfiguration -Name $gipconfigname -Subnet $gwSubnet
Expand Down Expand Up @@ -3343,10 +3343,16 @@ function Test-ApplicationGatewayCRUDWithMutualAuthentication
$sslProfiles = Get-AzApplicationGatewaySslProfile -ApplicationGateway $getgw
Assert-AreEqual $sslProfiles.Count 1
Assert-AreEqual $sslProfiles[0].Id $sslProfile01.Id
Assert-AreEqual $sslProfile01.TrustedClientCertificates.Count 1
Assert-AreEqual $sslProfiles.TrustedClientCertificates[0].Id $trustedClient01.Id
Assert-AreEqual $sslProfile01.TrustedClientCertificates.Count 1
Assert-AreEqual $sslProfiles.TrustedClientCertificates[0].Id $trustedClient01.Id

# verify client cert properties
$trustedClient01 = Get-AzApplicationGatewayTrustedClientCertificate -Name $trustedClientCert01Name -ApplicationGateway $getgw
Assert-AreEqual $trustedClient01.validatedCertData.Count 1
Assert-AreEqual $trustedClient01.clientCertIssuerDN.Count 1
Assert-AreEqual $getgw.TrustedClientCertificates[0].validatedCertData $trustedClient01.validatedCertData
Assert-AreEqual $getgw.TrustedClientCertificates[0].clientCertIssuerDN $trustedClient01.clientCertIssuerDN

$trustedClient01 = Get-AzApplicationGatewayTrustedClientCertificate -Name $trustedClientCert01Name -ApplicationGateway $getgw
$trustedClients = Get-AzApplicationGatewayTrustedClientCertificate -ApplicationGateway $getgw
Assert-AreEqual $trustedClients.Count 1
Assert-AreEqual $trustedClients[0].Id $trustedClient01.Id
Expand Down Expand Up @@ -3424,4 +3430,4 @@ function Test-ApplicationGatewayCRUDWithMutualAuthentication
# Cleanup
Clean-ResourceGroup $rgname
}
}
}

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/Network/Network/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
* Updated cmdlets to enable setting of PreferredRoutingGateway on VirtualHub.
- `New-AzVirtualHub`
- `Update-AzVirtualHub`
* Updated cmdlets to expose two read-only properties of client certificate.
- `Get-AzApplicationGatewayTrustedClientCertificate`

## Version 4.7.0
* Added new cmdlets to replace old product name `virtual router` with new name `route server` in the future.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ namespace Microsoft.Azure.Commands.Network.Models
public class PSApplicationGatewayTrustedClientCertificate : PSChildResource
{
public string Data { get; set; }
public string ValidatedCertData { get; set; }
public string ClientCertIssuerDN { get; set; }
public string ProvisioningState { get; set; }
public string Type { get; set; }
}
Expand Down