Skip to content

Commit 19e61cb

Browse files
authored
clean format
1 parent 791dda5 commit 19e61cb

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

0_Azure/8_AzureApps/demos/changes-AppServiceManagedCertificates/query-how_to_know_if_your_site_is_not_publicly_accessible.csl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
Resources
22
| where type == "microsoft.web/sites"
3-
4-
// 1) Expand out every hostname binding up front
53
| mv-expand hostSsl = properties.hostNameSslStates
6-
7-
// 2) Pull in site-level lockdown flags + hostname/thumbprint
84
| extend
95
publicNetworkAccess = tostring(properties.publicNetworkAccess),
106
clientCertRequired = tostring(properties.clientCertEnabled),
117
privateEndpoints = array_length(properties.privateEndpointConnections),
128
ipRestrictions = array_length(properties.siteConfig.ipSecurityRestrictions),
139
hostName = tostring(hostSsl.name),
1410
thumbprint = tostring(hostSsl.thumbprint)
15-
16-
// 3) Compute booleans for locking and custom domain
1711
| extend
1812
isLockedDown = (
1913
publicNetworkAccess == "Disabled" or
@@ -22,8 +16,6 @@ Resources
2216
ipRestrictions > 0
2317
),
2418
isCustom = not(tolower(hostName) endswith ".azurewebsites.net")
25-
26-
// 4) Bring in ASMC certs (they all have a non-empty canonicalName)
2719
| join kind=leftouter (
2820
Resources
2921
| where type == "microsoft.web/certificates"
@@ -33,13 +25,9 @@ Resources
3325
| where canonical != ""
3426
| project certThumb, certName = name, certExpiry = properties.expirationDate, canonical
3527
) on $left.thumbprint == $right.certThumb
36-
37-
// 5) Keep rows that are either locked-down sites or custom hostnames WITH a managed cert
3828
| where
3929
isLockedDown
4030
or (isCustom and isnotempty(certThumb))
41-
42-
// 6) Final shape
4331
| project
4432
siteName = name,
4533
resourceGroup,

0 commit comments

Comments
 (0)