拡張機能ホストは、必要な TCP/IP ポートの数を減らすことで Azure Stack Hub をセキュリティで保護します。 この記事では、1808 更新プログラムの後に Azure Stack Hub 更新パッケージを通じて自動的に有効になる拡張機能ホスト用に Azure Stack Hub を準備する方法について説明します。 この記事は、Azure Stack Hub 更新プログラム 1808、1809、および 1811 に適用されます。
証明書の要件
拡張機能ホストは、ポータル拡張機能ごとに一意のホスト エントリを保証するために、2 つの新しいドメイン名前空間を実装します。 新しいドメイン名前空間では、セキュリティで保護された通信を確保するために、2 つの追加のワイルドカード証明書が必要です。
次の表に、新しい名前空間と関連する証明書を示します。
| 展開フォルダー | 必要な証明書のサブジェクトとサブジェクトの別名 (SAN) | スコープ (リージョンごと) | サブドメイン名前空間 |
|---|---|---|---|
| 管理者拡張機能ホスト | *.adminhosting.<region>.<fqdn> (ワイルドカード SSL 証明書) | 管理者拡張機能ホスト | adminhosting.<region>.<fqdn> |
| パブリック拡張機能ホスト | *.hosting.<region>.<fqdn> (ワイルドカード SSL 証明書) | パブリック拡張機能ホスト | hosting.<region>.<fqdn> |
証明書の詳細な要件については、 Azure Stack Hub の公開キー インフラストラクチャ証明書の要件に関するページを参照してください。
証明書署名要求を作成する
Azure Stack Hub 適合性チェッカー ツールを使用すると、2 つの新しい SSL 証明書と必要な SSL 証明書の証明書署名要求を作成できます。 Azure Stack Hub 証明書署名要求の生成に関する記事の手順に従います。
注
SSL 証明書の要求方法に応じて、この手順をスキップできます。
新しい証明書を検証する
ハードウェア ライフサイクル ホストまたは Azure Stack Hub 管理ワークステーションで管理者特権で PowerShell を開きます。
次のコマンドレットを実行して、Azure Stack Hub 適合性チェッカー ツールをインストールします。
Install-Module -Name Microsoft.AzureStack.ReadinessChecker次のスクリプトを実行して、必要なフォルダー構造を作成します。
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}注
Microsoft Entra ID Federated Services (AD FS) を使用して展開する場合は、スクリプトの $directories に次のディレクトリを追加する必要があります:
ADFS、Graph。Azure Stack Hub で現在使用している既存の証明書を適切なディレクトリに配置します。 たとえば、 管理 ARM 証明書を
Arm Adminフォルダーに配置します。 次に、新しく作成したホスティング証明書をAdmin extension hostおよびPublic extension hostディレクトリに配置します。次のコマンドレットを実行して、証明書のチェックを開始します。
$pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString Start-AzsReadinessChecker -CertificatePath c:\certificates -pfxPassword $pfxPassword -RegionName east -FQDN azurestack.contoso.com -IdentitySystem AAD出力を確認して、すべての証明書がすべてのテストに合格するかどうかを確認します。
拡張機能ホスト証明書をインポートする
次の手順では、Azure Stack Hub 特権エンドポイントに接続できるコンピューターを使用します。 そのコンピューターから新しい証明書ファイルにアクセスできることを確認します。
次の手順では、Azure Stack Hub 特権エンドポイントに接続できるコンピューターを使用します。 そのコンピューターから新しい証明書ファイルにアクセスしていることを確認します。
PowerShell ISE を開き、次のスクリプト ブロックを実行します。
管理者ホスティング エンドポイントの証明書をインポートします。
$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 }ホスティング エンドポイントの証明書をインポートします。
$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 構成を更新する
注
DNS 統合に DNS ゾーン委任を使用した場合、この手順は必要ありません。
個々のホスト A レコードが Azure Stack Hub エンドポイントを発行するように構成されている場合は、2 つのホスト A レコードを追加で作成する必要があります。
| インターネット プロトコル (IP) | ホスト名 | タイプ |
|---|---|---|
| <IP> | *.Adminhosting.<リージョン>.<FQDN> | A |
| <インターネットプロトコル> | *.Hosting.<リージョン>.<FQDN> | A |
割り当てられた IP は、コマンドレット Get-AzureStackStampInformation を実行することで、特権エンドポイントを使用して取得できます。
ポートとプロトコル
Azure Stack Hub データセンター統合 - 発行エンドポイントの記事では、拡張機能ホストのロールアウト前に Azure Stack Hub を発行するために受信通信を必要とするポートとプロトコルについて説明します。
新しいエンドポイントを発行する
ファイアウォールを介して公開する必要がある新しいエンドポイントは 2 つあります。 パブリック VIP プールから割り当てられた IP は、Azure Stack Hub 環境の特権エンドポイントから実行する必要がある次のコードを使用して取得できます。
# 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
サンプル出力
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
注
拡張機能ホストを有効にする前に、この変更を行います。 これにより、Azure Stack Hub ポータルに継続的にアクセスできます。
| エンドポイント (VIP) | プロトコル | ポート |
|---|---|---|
| 管理者ホスティング | HTTPS | 443 |
| ホスティング | HTTPS | 443 |
既存の発行規則を更新する (拡張機能ホストの有効化後)
注
1808 Azure Stack Hub 更新プログラム パッケージでは、拡張機能ホストはまだ有効になりません。 これにより、必要な証明書をインポートして拡張機能ホストの準備を行うことができます。 1808 更新プログラムの後に Azure Stack Hub 更新パッケージを介して拡張機能ホストが自動的に有効になる前に、ポートを閉じないでください。
既存のファイアウォール規則では、次の既存のエンドポイント ポートを閉じる必要があります。
注
検証が正常に完了したら、これらのポートを閉じておくことをお勧めします。
| エンドポイント (VIP) | プロトコル | ポート |
|---|---|---|
| ポータル (管理者) | HTTPS | 12495 12499 12646 12647 12648 12649 12650 13001 13003 13010 13011 13012 13020 13021 13026 30015 |
| ポータル (ユーザー) | HTTPS | 12495 12649 13001 13010 13011 13012 13020 13021 30015 13003 |
| Azure Resource Manager (管理者) | HTTPS | 30024 |
| Azure Resource Manager (ユーザー) | HTTPS | 30024 |
次のステップ
- ファイアウォールの統合について説明します。
- Azure Stack Hub 証明書署名要求の生成について説明します。