Skip to content

Commit 31029da

Browse files
authored
Exposing two read-only properties of Application Gateway client certificate (#14784)
* expose two read-only client cert properties * update appgw senario test to cover two new read-only properties of client cert * create zonal public ip referred by appgw with zone redundancy * update session record * update ChangeLog * use cert chain name from appgw * check client cert properties from appgw output * update test case and record
1 parent 1c5d1df commit 31029da

File tree

4 files changed

+815
-792
lines changed

4 files changed

+815
-792
lines changed

src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3297,7 +3297,7 @@ function Test-ApplicationGatewayCRUDWithMutualAuthentication
32973297
$gwSubnet = Get-AzVirtualNetworkSubnetConfig -Name $gwSubnetName -VirtualNetwork $vnet
32983298

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

33023302
# Create ip configuration
33033303
$gipconfig = New-AzApplicationGatewayIPConfiguration -Name $gipconfigname -Subnet $gwSubnet
@@ -3343,10 +3343,9 @@ function Test-ApplicationGatewayCRUDWithMutualAuthentication
33433343
$sslProfiles = Get-AzApplicationGatewaySslProfile -ApplicationGateway $getgw
33443344
Assert-AreEqual $sslProfiles.Count 1
33453345
Assert-AreEqual $sslProfiles[0].Id $sslProfile01.Id
3346-
Assert-AreEqual $sslProfile01.TrustedClientCertificates.Count 1
3347-
Assert-AreEqual $sslProfiles.TrustedClientCertificates[0].Id $trustedClient01.Id
3346+
Assert-AreEqual $sslProfile01.TrustedClientCertificates.Count 1
3347+
Assert-AreEqual $sslProfiles.TrustedClientCertificates[0].Id $trustedClient01.Id
33483348

3349-
$trustedClient01 = Get-AzApplicationGatewayTrustedClientCertificate -Name $trustedClientCert01Name -ApplicationGateway $getgw
33503349
$trustedClients = Get-AzApplicationGatewayTrustedClientCertificate -ApplicationGateway $getgw
33513350
Assert-AreEqual $trustedClients.Count 1
33523351
Assert-AreEqual $trustedClients[0].Id $trustedClient01.Id
@@ -3424,4 +3423,4 @@ function Test-ApplicationGatewayCRUDWithMutualAuthentication
34243423
# Cleanup
34253424
Clean-ResourceGroup $rgname
34263425
}
3427-
}
3426+
}

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDWithMutualAuthentication.json

Lines changed: 807 additions & 787 deletions
Large diffs are not rendered by default.

src/Network/Network/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
* Updated cmdlets to enable setting of PreferredRoutingGateway on VirtualHub.
3939
- `New-AzVirtualHub`
4040
- `Update-AzVirtualHub`
41+
* Updated cmdlets to expose two read-only properties of client certificate.
42+
- `Get-AzApplicationGatewayTrustedClientCertificate`
4143

4244
## Version 4.7.0
4345
* Added new cmdlets to replace old product name `virtual router` with new name `route server` in the future.

src/Network/Network/Models/PSApplicationGatewayTrustedClientCertificate.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ namespace Microsoft.Azure.Commands.Network.Models
1818
public class PSApplicationGatewayTrustedClientCertificate : PSChildResource
1919
{
2020
public string Data { get; set; }
21+
public string ValidatedCertData { get; set; }
22+
public string ClientCertIssuerDN { get; set; }
2123
public string ProvisioningState { get; set; }
2224
public string Type { get; set; }
2325
}

0 commit comments

Comments
 (0)