分享方式:


透過共用私人端點存取私人網路中的 Key Vault

Azure SignalR Service 可以透過共用私人端點存取私人網路中的 Key Vault。 如此一來,您的 Key Vault 就不會在公用網路上公開。

Diagram that shows the architecture of a shared private endpoint.

您可以建立透過 Azure SignalR Service API 的私人端點,以獲得對與 Azure Private Link 服務整合資源的共用存取。 這些端點稱為共用私人連結資源,會在 SignalR 執行環境中建立,而且無法在此環境外部存取。

在本文中,您將了解如何建立對 Key Vault 的共用私人端點。

必要條件

您將需要下列資源以完成此文章:

  • Azure 資源群組。
  • Azure SignalR Service 執行個體。
  • Azure Key Vault 執行個體。

本文中的範例會使用下列命名慣例,不過您可以改用自己的名稱。

  • 此 Azure SignalR Service 的資源識別碼是 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.SignalRService/signalr/contoso-signalr
  • Azure Key Vault 的資源識別碼是 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.KeyVault/vaults/contoso-kv
  • 其餘的範例示範如何設定 contoso-signalr 服務,使其對 Key Vault 的輸出呼叫會透過私人端點 (而不是公用網路)。
  1. 在 Azure 入口網站中,移至您的 Azure SignalR Service 資源。

  2. 選取 [網路功能]。

  3. 選取 [私人存取] 索引標籤。

  4. 在 [共用私人端點] 區段中,選取 [新增共用私人端點]

    Screenshot of the button for adding a shared private endpoint.

    輸入下列資訊:

    欄位 描述
    名稱 共用私人端點的名稱。
    類型 選取 Microsoft.KeyVault/vaults
    訂用帳戶 您包含 Key Vault 的訂用帳戶。
    資源 輸入 Key Vault 資源的名稱。
    要求訊息 輸入「請核准」
  5. 選取 [新增]。

    Screenshot of adding a shared private endpoint.

成功新增私人端點時,佈建狀態會是成功。 連線狀態會是擱置中,直到您核准 Key Vault 端的端點為止。

Screenshot of an added shared private endpoint.

核准 Key Vault 的私人端點連線

  1. 移至您的 Key Vault 資源

  2. 選取 [網路]

  3. 選取 [私人端點連線] 索引標籤。非同步作業成功後,應該會出現私人端點連線要求,以及來自先前 API 呼叫的要求訊息。

  4. 選取 SignalR Service 建立的私人端點,然後選取 [核准]Screenshot of Approve connection dialog for private endpoint in Azure Key Vault.

  5. 選取 [是] 以核准連線。

    Screenshot of the Azure portal that shows an Approved status on the pane for private endpoint connections.

驗證共用私人端點正常運作

幾分鐘後,核准會傳播至 SignalR Service,並將連線狀態設定為已核准。 您可以使用 Azure 入口網站或 Azure CLI 來檢查狀態。

Screenshot of an approved shared private endpoint.

SignalR Service 與 Azure Key Vault 之間的私人端點正常運作時,佈建狀態的值會是成功,且連線狀態為已核准

清理

如果不打算使用您在本文中建立的資源,您可以刪除資源群組。

警告

刪除資源群組會刪除其中的所有資源。 如果本文章範圍以外的資源存在於指定的資源群組中,則也會一併刪除。

下一步