De extensiehost voorbereiden in Azure Stack Hub

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

Certificaatvereisten

De extensiehost implementeert twee nieuwe domeinnaamruimten om unieke hostgegevens voor elke portalextensie te garanderen. De nieuwe domeinnaamruimten vereisen twee extra jokertekencertificaten om veilige communicatie te garanderen.

De tabel bevat de nieuwe naamruimten en de bijbehorende certificaten:

Implementatiemap Vereiste alternatieve namen voor certificaatonderwerpen en onderwerp (SAN) Bereik (per regio) Subdomeinnaamruimte
Beheerextensiehost *.adminhosting.< regio>.< fqdn> (SSL-certificaten met jokerteken) Beheerextensiehost adminhosting.< regio>.< Fqdn>
Openbare extensiehost *.hosting.< regio>.< fqdn> (SSL-certificaten met jokerteken) Openbare extensiehost Hosting.< regio>.< Fqdn>

Zie Vereisten voor openbare-sleutelinfrastructuur voor Azure Stack Hub certificaatvereisten voor de openbare sleutel voor gedetailleerde certificaatvereisten.

Aanvraag voor certificaat ondertekenen maken

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

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 hardwarelevenscyclushost of het Azure Stack Hub-beheerwerkstation.

  2. Voer de volgende cmdlet uit om het hulpprogramma gereedheidscontrole Azure Stack Hub 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 Azure Active Directory Federated Services (AD FS), moeten de volgende $directories in het script worden toegevoegd: , Graph.

  4. Plaats de bestaande certificaten, die u momenteel gebruikt in Azure Stack Hub, in de juiste adresieën. Plaats bijvoorbeeld het ARM-beheercertificaat in de map . Plaats vervolgens de zojuist gemaakte hostingcertificaten in de Admin extension host - en Public extension host -directories.

  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 Azure Stack Hub bevoegde eindpunt voor de volgende stappen. Zorg ervoor dat u vanaf die computer toegang hebt tot de nieuwe certificaatbestanden.

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

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

  3. Importeer het certificaat voor het beheerhosting-eindpunt.

    
    $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 hosting-eindpunt.

    $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's kunnen worden opgehaald met behulp van het bevoegde eindpunt door de cmdlet Get-AzureStackStampInformation uit te uitvoeren.

Poorten en protocollen

Het artikel Azure Stack Hub datacentrumintegratie - Eindpunten publiceren bevat informatie over de poorten en protocollen waarvoor binnenkomende communicatie is vereist om Azure Stack Hub te publiceren voordat de extensiehost wordt rollout.

Nieuwe eindpunten publiceren

Er moeten twee nieuwe eindpunten worden gepubliceerd via uw firewall. De toegewezen IP's uit de openbare VIP-groep 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

Maak deze wijziging voordat u de extensiehost inschakelen. Hierdoor kunnen Azure Stack Hub portals continu toegankelijk zijn.

Eindpunt (VIP) Protocol Poorten
Hosting door beheerder HTTPS 443
Hosting HTTPS 443

Bestaande publicatieregels bijwerken (na inschakelen van extensiehost)

Notitie

Met updatepakket 1808 Azure Stack Hub wordt de extensiehost nog niet ingeschakeld. Hiermee kunt u de extensiehost voorbereiden door de vereiste certificaten te importeren. Sluit geen poorten voordat 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 na een geslaagde validatie.

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