Skip to content

Commit 479855b

Browse files
authored
Merge pull request #1939 from alan-turing-institute/1938-ssl-certificate-error
Fix SSL certificate error
2 parents bee9fc4 + cf3c5ae commit 479855b

10 files changed

+16
-19
lines changed

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ All organisations using an earlier version in production should update to the la
77

88
| Version | Supported |
99
| --------------------------------------------------------------------------------------- | ------------------ |
10-
| [4.2.1](https://github.com/alan-turing-institute/data-safe-haven/releases/tag/v4.2.1) | :white_check_mark: |
11-
| < 4.2.1 | :x: |
10+
| [4.2.2](https://github.com/alan-turing-institute/data-safe-haven/releases/tag/v4.2.2) | :white_check_mark: |
11+
| < 4.2.2 | :x: |
1212

1313
## Reporting a Vulnerability
1414

deployment/CheckRequirements.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ $ModuleVersionRequired = @{
2828
"Microsoft.Graph.Applications" = @("ge", "1.21.0")
2929
"Microsoft.Graph.Identity.DirectoryManagement" = @("ge", "1.21.0")
3030
"Microsoft.Graph.Users" = @("ge", "1.21.0")
31+
"Posh-ACME" = @("ge", "4.23.0")
3132
"Poshstache" = @("ge", "0.1.10")
3233
"Powershell-Yaml" = @("ge", "0.4.2")
3334
}

deployment/common/Configuration.psm1

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ function Get-ShmConfig {
431431
hostname = $hostname
432432
hostnameLower = $hostname.ToLower()
433433
hostnameUpper = $hostname.ToUpper()
434-
fqdn = "${hostname}.$($shm.domain.fqdn)"
434+
fqdn = "${hostname}.$($shm.domain.fqdn)".ToLower()
435435
ip = Get-NextAvailableIpInRange -IpRangeCidr $shm.network.vnet.subnets.identity.cidr -Offset 4
436436
external_dns_resolver = "168.63.129.16" # https://docs.microsoft.com/en-us/azure/virtual-network/what-is-ip-address-168-63-129-16
437437
installationDirectory = "C:\Installation"
@@ -451,7 +451,7 @@ function Get-ShmConfig {
451451
$shm.dcb = [ordered]@{
452452
vmName = $hostname
453453
hostname = $hostname
454-
fqdn = "${hostname}.$($shm.domain.fqdn)"
454+
fqdn = "${hostname}.$($shm.domain.fqdn)".ToLower()
455455
ip = Get-NextAvailableIpInRange -IpRangeCidr $shm.network.vnet.subnets.identity.cidr -Offset 5
456456
}
457457

@@ -613,10 +613,12 @@ function Get-SreConfig {
613613
$sreConfigBase = Get-CoreConfig -shmId $shmId -sreId $sreId
614614

615615
# Support for "MicrosoftRDS" has been removed. The "remotedDesktopProvider" field now defaults to "ApacheGuacamole"
616-
if ($sreConfigBase.remoteDesktopProvider -ne "ApacheGuacamole") {
617-
Add-LogMessage -Level Fatal "Support for remote desktops other than ApacheGuacamole has been removed"
618-
} elseif ($sreConfigBase.remoteDesktopProvider -eq "ApacheGuacamole") {
619-
Add-LogMessage -Level Warning "The remoteDesktopProvider configuration option has been deprecated and will be removed in the future"
616+
if ($null -ne $sreConfigBase.remoteDesktopProvider) {
617+
if ($sreConfigBase.remoteDesktopProvider -eq "ApacheGuacamole") {
618+
Add-LogMessage -Level Warning "The remoteDesktopProvider configuration option has been deprecated and will be removed in the future"
619+
} else {
620+
Add-LogMessage -Level Fatal "Support for remote desktops other than ApacheGuacamole has been removed"
621+
}
620622
}
621623
$sreConfigBase.remoteDesktopProvider = "ApacheGuacamole"
622624

@@ -661,7 +663,7 @@ function Get-SreConfig {
661663
$sreDomain = $sreConfigBase.domain ? $sreConfigBase.domain : "$($config.sre.id).$($config.shm.domain.fqdn)".ToLower()
662664
$config.sre.domain = [ordered]@{
663665
dn = "DC=$($sreDomain.Replace('.',',DC='))"
664-
fqdn = $sreDomain
666+
fqdn = "$sreDomain".ToLower()
665667
netbiosName = $($config.sre.id).ToUpper() | Limit-StringLength -MaximumLength 15 -FailureIsFatal
666668
}
667669
$config.sre.domain.securityGroups = [ordered]@{
@@ -892,7 +894,7 @@ function Get-SreConfig {
892894
foreach ($server in $config.sre.remoteDesktop.Keys) {
893895
if (-not $config.sre.remoteDesktop[$server].vmName) { continue }
894896
$config.sre.remoteDesktop[$server].hostname = $config.sre.remoteDesktop[$server].vmName
895-
$config.sre.remoteDesktop[$server].fqdn = "$($config.sre.remoteDesktop[$server].vmName).$($config.shm.domain.fqdn)"
897+
$config.sre.remoteDesktop[$server].fqdn = "$($config.sre.remoteDesktop[$server].vmName).$($config.shm.domain.fqdn)".ToLower()
896898
}
897899

898900
# Set the appropriate tier-dependent network rules for the remote desktop server
@@ -980,7 +982,7 @@ function Get-SreConfig {
980982
# Construct the hostname and FQDN for each VM
981983
foreach ($server in $config.sre.webapps.Keys) {
982984
if ($config.sre.webapps[$server] -IsNot [System.Collections.Specialized.OrderedDictionary]) { continue }
983-
$config.sre.webapps[$server].fqdn = "$($config.sre.webapps[$server].hostname).$($config.sre.domain.fqdn)"
985+
$config.sre.webapps[$server].fqdn = "$($config.sre.webapps[$server].hostname).$($config.sre.domain.fqdn)".ToLower()
984986
$config.sre.webapps[$server].vmName = "$($config.sre.webapps[$server].hostname)-SRE-$($config.sre.id)".ToUpper()
985987
}
986988

deployment/secure_research_environment/setup/Update_SRE_SSL_Certificate.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Import-Module Az.Compute
1616
Import-Module Az.KeyVault
1717
Import-Module $PSScriptRoot/../../common/AzureCompute -Force -ErrorAction Stop
1818
Import-Module $PSScriptRoot/../../common/AzureKeyVault -Force -ErrorAction Stop
19-
Import-Module $PSScriptRoot/../../common/Configuration -ErrorAction Stop
20-
Import-Module $PSScriptRoot/../../common/Logging -ErrorAction Stop
19+
Import-Module $PSScriptRoot/../../common/Configuration -Force -ErrorAction Stop
20+
Import-Module $PSScriptRoot/../../common/Logging -Force -ErrorAction Stop
2121

2222

2323
# Check that we are authenticated in Azure

environment_configs/sre_bluet1guac_core_config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"type": "Ubuntu",
1111
"version": "20.04.2024032600"
1212
},
13-
"remoteDesktopProvider": "ApacheGuacamole",
1413
"dataAdminIpAddresses": ["193.60.220.253"],
1514
"databases": ["MSSQL", "PostgreSQL"]
1615
}

environment_configs/sre_bluet2guac_core_config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"type": "Ubuntu",
1111
"version": "20.04.2024032600"
1212
},
13-
"remoteDesktopProvider": "ApacheGuacamole",
1413
"dataAdminIpAddresses": ["193.60.220.253"],
1514
"databases": ["MSSQL", "PostgreSQL"]
1615
}

environment_configs/sre_bluet3guac_core_config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"type": "Ubuntu",
1111
"version": "20.04.2024032600"
1212
},
13-
"remoteDesktopProvider": "ApacheGuacamole",
1413
"dataAdminIpAddresses": ["193.60.220.240"],
1514
"databases": ["MSSQL", "PostgreSQL"]
1615
}

environment_configs/sre_greent1guac_core_config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"type": "Ubuntu",
1111
"version": "20.04.2024032600"
1212
},
13-
"remoteDesktopProvider": "ApacheGuacamole",
1413
"dataAdminIpAddresses": ["193.60.220.253"],
1514
"databases": ["MSSQL", "PostgreSQL"]
1615
}

environment_configs/sre_greent2guac_core_config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"type": "Ubuntu",
1111
"version": "20.04.2024032600"
1212
},
13-
"remoteDesktopProvider": "ApacheGuacamole",
1413
"dataAdminIpAddresses": ["193.60.220.253"],
1514
"databases": ["MSSQL", "PostgreSQL"]
1615
}

environment_configs/sre_greent3guac_core_config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"type": "Ubuntu",
1111
"version": "20.04.2024032600"
1212
},
13-
"remoteDesktopProvider": "ApacheGuacamole",
1413
"dataAdminIpAddresses": ["193.60.220.240"],
1514
"databases": ["MSSQL", "PostgreSQL"]
1615
}

0 commit comments

Comments
 (0)