Voorbereiden op extensiehost in Azure Stack Hub

De extensiehost beveiligt Azure Stack Hub door het aantal vereiste TCP/IP-poorten te verminderen. In dit artikel wordt gekeken naar het voorbereiden van Azure Stack Hub voor de extensiehost die automatisch wordt ingeschakeld via een Azure Stack Hub-updatepakket na de 1808-update. Dit artikel is van toepassing op Azure Stack Hub-updates 1808, 1809 en 1811.

Certificaatvereisten

De extensiehost implementeert twee nieuwe domeinnaamruimten om unieke hostvermeldingen voor elke portalextensie te garanderen. Voor de nieuwe domeinnaamruimten zijn twee extra jokertekencertificaten vereist om veilige communicatie te garanderen.

De tabel bevat de nieuwe naamruimten en de bijbehorende certificaten:

Implementatiemap Vereiste certificaatonderwerp- en onderwerp alternatieve namen (SAN) Bereik (per regio) Subdomeinnaamruimte
Beheer-extensiehost *.adminhosting.<regio>.<fqdn> (SSL-certificaten met jokertekens) Beheer-extensiehost adminhosting.<regio>.<Fqdn>
Host van openbare extensie *.Hosting.<regio>.<fqdn> (SSL-certificaten met jokertekens) Host van openbare extensie Hosting.<regio>.<Fqdn>

Zie Certificaatvereisten voor openbare-sleutelinfrastructuur van Azure Stack Hub voor gedetailleerde certificaatvereisten.

Aanvraag voor certificaatondertekening maken

Met het hulpprogramma Gereedheidscontrole van Azure Stack Hub kunt u een aanvraag voor certificaatondertekening maken voor de twee nieuwe en vereiste SSL-certificaten. Volg de stappen in het artikel Genereren van aanvragen voor ondertekening van Azure Stack Hub-certificaten.

Notitie

U kunt deze stap overslaan, afhankelijk van hoe u uw SSL-certificaten hebt aangevraagd.

Nieuwe certificaten valideren

  1. Open PowerShell met verhoogde machtigingen op de host van de hardwarelevenscyclus of het Azure Stack Hub-beheerwerkstation.

  2. Voer de volgende cmdlet uit om het hulpprogramma Gereedheidscontrole van Azure Stack Hub te installeren:

    Install-Module -Name Microsoft.AzureStack.ReadinessChecker
    
  3. Voer het volgende script uit om de vereiste mapstructuur te maken:

    New-Item C:\Certificates -ItemType Directory
    
    $directories = 'ACSBlob','ACSQueue','ACSTable','Admin Portal','ARM Admin','ARM Public','KeyVault','KeyVaultInternal','Public Portal', 'Admin extension host', 'Public extension host'
    
    $destination = 'c:\certificates'
    
    $directories | % { New-Item -Path (Join-Path $destination $PSITEM) -ItemType Directory -Force}
    

    Notitie

    Als u implementeert met Microsoft Entra ID Federated Services (AD FS), moeten de volgende mappen worden toegevoegd aan $directories in het script: ADFS, Graph.

  4. Plaats de bestaande certificaten, die u momenteel gebruikt in Azure Stack Hub, in de juiste mappen. Plaats bijvoorbeeld het Beheer ARM-certificaat in de Arm Admin map. En plaats vervolgens de zojuist gemaakte hostingcertificaten in de Admin extension host mappen en Public extension host .

  5. Voer de volgende cmdlet uit om de certificaatcontrole te starten:

    $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString 
    
    Start-AzsReadinessChecker -CertificatePath c:\certificates -pfxPassword $pfxPassword -RegionName east -FQDN azurestack.contoso.com -IdentitySystem AAD
    
  6. Controleer de uitvoer en of alle certificaten slagen voor alle tests.

Extensiehostcertificaten importeren

Gebruik een computer die verbinding kan maken met het bevoegde Eindpunt van Azure Stack Hub voor de volgende stappen. Zorg ervoor dat u toegang hebt tot de nieuwe certificaatbestanden vanaf die computer.

  1. Gebruik een computer die verbinding kan maken met het bevoegde Eindpunt van Azure Stack Hub voor de volgende stappen. Zorg ervoor dat u toegang hebt tot de nieuwe certificaatbestanden vanaf die computer.

  2. Open PowerShell ISE om de volgende scriptblokken uit te voeren.

  3. Importeer het certificaat voor het eindpunt voor het hosten van de beheerder.

    
    $CertPassword = read-host -AsSecureString -prompt "Certificate Password"
    
    $CloudAdminCred = Get-Credential -UserName <Privileged endpoint credentials> -Message "Enter the cloud domain credentials to access the privileged endpoint."
    
    [Byte[]]$AdminHostingCertContent = [Byte[]](Get-Content c:\certificate\myadminhostingcertificate.pfx -Encoding Byte)
    
    Invoke-Command -ComputerName <PrivilegedEndpoint computer name> `
    -Credential $CloudAdminCred `
    -ConfigurationName "PrivilegedEndpoint" `
    -ArgumentList @($AdminHostingCertContent, $CertPassword) `
    -ScriptBlock {
            param($AdminHostingCertContent, $CertPassword)
            Import-AdminHostingServiceCert $AdminHostingCertContent $certPassword
    }
    
  4. Importeer het certificaat voor het hostingeindpunt.

    $CertPassword = read-host -AsSecureString -prompt "Certificate Password"
    
    $CloudAdminCred = Get-Credential -UserName <Privileged endpoint credentials> -Message "Enter the cloud domain credentials to access the privileged endpoint."
    
    [Byte[]]$HostingCertContent = [Byte[]](Get-Content c:\certificate\myhostingcertificate.pfx  -Encoding Byte)
    
    Invoke-Command -ComputerName <PrivilegedEndpoint computer name> `
    -Credential $CloudAdminCred `
    -ConfigurationName "PrivilegedEndpoint" `
    -ArgumentList @($HostingCertContent, $CertPassword) `
    -ScriptBlock {
            param($HostingCertContent, $CertPassword)
            Import-UserHostingServiceCert $HostingCertContent $certPassword
    }
    

DNS-configuratie bijwerken

Notitie

Deze stap is niet vereist als u DNS-zonedelegering hebt gebruikt voor DNS-integratie. Als afzonderlijke host A-records zijn geconfigureerd voor het publiceren van Azure Stack Hub-eindpunten, moet u twee extra host A-records maken:

IP Hostnaam Type
<IP> *. Adminhosting.<Regio>.<FQDN> A
<IP> *. Hosting.<Regio>.<FQDN> A

Toegewezen IP-adressen kunnen worden opgehaald met behulp van het bevoegde eindpunt door de cmdlet Get-AzureStackStampInformation uit te voeren.

Poorten en protocollen

Het artikel Azure Stack Hub datacenter integration - Publish endpoints heeft betrekking op de poorten en protocollen die binnenkomende communicatie vereisen om Azure Stack Hub te publiceren vóór de implementatie van de extensiehost.

Nieuwe eindpunten publiceren

Er moeten twee nieuwe eindpunten worden gepubliceerd via uw firewall. De toegewezen IP-adressen van de openbare VIP-pool kunnen worden opgehaald met behulp van de volgende code die moet worden uitgevoerd vanaf het bevoegde eindpunt van uw Azure Stack Hub-omgeving.

# Create a PEP Session
winrm s winrm/config/client '@{TrustedHosts= "<IpOfERCSMachine>"}'
$PEPCreds = Get-Credential
$PEPSession = New-PSSession -ComputerName <IpOfERCSMachine> -Credential $PEPCreds -ConfigurationName "PrivilegedEndpoint" -SessionOption (New-PSSessionOption -Culture en-US -UICulture en-US)

# Obtain DNS Servers and extension host information from Azure Stack Hub Stamp Information and find the IPs for the Host Extension Endpoints
$StampInformation = Invoke-Command $PEPSession {Get-AzureStackStampInformation} | Select-Object -Property ExternalDNSIPAddress01, ExternalDNSIPAddress02, @{n="TenantHosting";e={($_.TenantExternalEndpoints.TenantHosting) -replace "https://*.","testdnsentry"-replace "/"}},  @{n="AdminHosting";e={($_.AdminExternalEndpoints.AdminHosting)-replace "https://*.","testdnsentry"-replace "/"}},@{n="TenantHostingDNS";e={($_.TenantExternalEndpoints.TenantHosting) -replace "https://",""-replace "/"}},  @{n="AdminHostingDNS";e={($_.AdminExternalEndpoints.AdminHosting)-replace "https://",""-replace "/"}}
If (Resolve-DnsName -Server $StampInformation.ExternalDNSIPAddress01 -Name $StampInformation.TenantHosting -ErrorAction SilentlyContinue) {
    Write-Host "Can access AZS DNS" -ForegroundColor Green
    $AdminIP = (Resolve-DnsName -Server $StampInformation.ExternalDNSIPAddress02 -Name $StampInformation.AdminHosting).IPAddress
    Write-Host "The IP for the Admin Extension Host is: $($StampInformation.AdminHostingDNS) - is: $($AdminIP)" -ForegroundColor Yellow
    Write-Host "The Record to be added in the DNS zone: Type A, Name: $($StampInformation.AdminHostingDNS), Value: $($AdminIP)" -ForegroundColor Green
    $TenantIP = (Resolve-DnsName -Server $StampInformation.ExternalDNSIPAddress01 -Name $StampInformation.TenantHosting).IPAddress
    Write-Host "The IP address for the Tenant Extension Host is $($StampInformation.TenantHostingDNS) - is: $($TenantIP)" -ForegroundColor Yellow
    Write-Host "The Record to be added in the DNS zone: Type A, Name: $($StampInformation.TenantHostingDNS), Value: $($TenantIP)" -ForegroundColor Green
}
Else {
    Write-Host "Cannot access AZS DNS" -ForegroundColor Yellow
    $AdminIP = (Resolve-DnsName -Name $StampInformation.AdminHosting).IPAddress
    Write-Host "The IP for the Admin Extension Host is: $($StampInformation.AdminHostingDNS) - is: $($AdminIP)" -ForegroundColor Yellow
    Write-Host "The Record to be added in the DNS zone: Type A, Name: $($StampInformation.AdminHostingDNS), Value: $($AdminIP)" -ForegroundColor Green
    $TenantIP = (Resolve-DnsName -Name $StampInformation.TenantHosting).IPAddress
    Write-Host "The IP address for the Tenant Extension Host is $($StampInformation.TenantHostingDNS) - is: $($TenantIP)" -ForegroundColor Yellow
    Write-Host "The Record to be added in the DNS zone: Type A, Name: $($StampInformation.TenantHostingDNS), Value: $($TenantIP)" -ForegroundColor Green
}
Remove-PSSession -Session $PEPSession

Voorbeelduitvoer

Can access AZS DNS
The IP for the Admin Extension Host is: *.adminhosting.\<region>.\<fqdn> - is: xxx.xxx.xxx.xxx
The Record to be added in the DNS zone: Type A, Name: *.adminhosting.\<region>.\<fqdn>, Value: xxx.xxx.xxx.xxx
The IP address for the Tenant Extension Host is *.hosting.\<region>.\<fqdn> - is: xxx.xxx.xxx.xxx
The Record to be added in the DNS zone: Type A, Name: *.hosting.\<region>.\<fqdn>, Value: xxx.xxx.xxx.xxx

Notitie

Breng deze wijziging aan voordat u de extensiehost inschakelt. Hierdoor kunnen de Azure Stack Hub-portals continu toegankelijk zijn.

Eindpunt (VIP) Protocol Poorten
Beheer Hosting HTTPS 443
Hosting HTTPS 443

Bestaande publicatieregels bijwerken (na inschakeling van extensiehost)

Notitie

Het 1808 Azure Stack Hub-updatepakket schakelt de extensiehost nog niet in. Hiermee kunt u de extensiehost voorbereiden door de vereiste certificaten te importeren. Sluit geen poorten voordat de extensiehost automatisch wordt ingeschakeld via een Azure Stack Hub-updatepakket na de 1808-update.

De volgende bestaande eindpuntpoorten moeten worden gesloten in uw bestaande firewallregels.

Notitie

Het is raadzaam om deze poorten te sluiten nadat de validatie is geslaagd.

Eindpunt (VIP) Protocol Poorten
Portal (beheerder) HTTPS 12495
12499
12646
12647
12648
12649
12650
13001
13003
13010
13011
13012
13020
13021
13026
30015
Portal (gebruiker) HTTPS 12495
12649
13001
13010
13011
13012
13020
13021
30015
13003
Azure Resource Manager (beheerder) HTTPS 30024
Azure Resource Manager (gebruiker) HTTPS 30024

Volgende stappen