建立及管理安全性設定檔群組

本頁說明如何使用自訂攔截安全性設定檔,建立及管理安全性設定檔群組

事前準備

角色

如要建立、查看、更新或刪除安全性設定檔群組,請要求管理員授予您機構的必要身分與存取權管理 (IAM) 角色。如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和機構的存取權」。

如要查看本頁列出的作業進度,請確認您的使用者角色具備下列 Compute 網路使用者角色 (roles/compute.networkUser) 權限:

  • networksecurity.operations.get
  • networksecurity.operations.list

建立安全性設定檔群組

建立安全性設定檔群組時,請指定安全性設定檔群組名稱和自訂安全性設定檔名稱。

建議您在安全性管理員擁有的專案中建立安全性設定檔群組。

控制台

  1. 前往 Google Cloud 控制台的「Security profile groups」(安全性設定檔群組) 頁面。

    前往「安全性設定檔群組」

  2. 在專案選擇工具中選取機構。

  3. 在「安全性設定檔群組」分頁中,按一下「建立設定檔群組」

  4. 在「Name」(名稱),輸入安全性設定檔群組的名稱。

  5. 在「Security profile group purpose」部分,選取「NSI in-band」

  6. 在「自訂攔截設定檔」部分,選取頻內整合的自訂安全性設定檔。

  7. 點選「建立」

gcloud

如要建立安全性設定檔群組,請使用 gcloud network-security security-profile-groups create 指令

gcloud network-security security-profile-groups create SECURITY_PROFILE_GROUP_ID \
    --custom-intercept-profile CUSTOM_INTERCEPT_PROFILE_ID \
    --organization ORGANIZATION_ID \
    --billing-project BILLING_PROJECT_ID \
    --location global

更改下列內容:

  • SECURITY_PROFILE_GROUP_ID:安全設定檔群組的 ID。

  • CUSTOM_INTERCEPT_PROFILE_ID:自訂攔截安全設定檔的 ID。

  • ORGANIZATION_ID:要建立安全性設定檔群組的機構 ID。

  • BILLING_PROJECT_ID:用於配額的專案 ID。

Terraform

如要建立安全性設定檔群組,可以使用 google_network_security_security_profile_group 資源

resource "google_network_security_security_profile_group" "default" {
  name                     = "security-profile-group"
  parent                   = "organizations/${data.google_organization.default.org_id}"
  location                 = "global"
  custom_intercept_profile = google_network_security_security_profile.default.id
}

如要瞭解如何套用或移除 Terraform 設定,請參閱「基本 Terraform 指令」。

查看安全性設定檔群組的詳細資料

您可以查看機構中安全性設定檔群組的詳細資料,例如名稱和自訂攔截設定檔。

控制台

  1. 前往 Google Cloud 控制台的「Security profile groups」(安全性設定檔群組) 頁面。

    前往「安全性設定檔群組」

  2. 在專案選擇工具中選取機構。

  3. 在「安全性設定檔群組」分頁中,按一下安全性設定檔群組的名稱。

gcloud

如要查看安全性設定檔群組的詳細資料,請使用 gcloud network-security security-profile-groups describe 指令

gcloud network-security security-profile-groups describe SECURITY_PROFILE_GROUP_ID \
    --organization ORGANIZATION_ID \
    --billing-project BILLING_PROJECT_ID \
    --location global

更改下列內容:

  • SECURITY_PROFILE_GROUP_ID:安全設定檔群組的 ID。

  • ORGANIZATION_ID:建立安全設定檔群組的機構 ID。

  • BILLING_PROJECT_ID:用於配額的專案 ID。

輸出內容會以 organizations/ORGANIZATION_ID/locations/global/securityProfileGroups/SECURITY_PROFILE_GROUP_ID 格式顯示安全性設定檔群組的名稱。

列出安全性設定檔群組

您可以列出機構中的所有安全性設定檔群組,包括其 ID。

控制台

  1. 前往 Google Cloud 控制台的「Security profile groups」(安全性設定檔群組) 頁面。

    前往「安全性設定檔群組」

  2. 在專案選擇工具中選取機構。

  3. 在「安全性設定檔群組」分頁中,您可以查看安全性設定檔群組清單。

gcloud

如要列出安全性設定檔群組,請使用 gcloud network-security security-profile-groups list 指令

gcloud network-security security-profile-groups list \
    --organization ORGANIZATION_ID \
    --location global \
    --billing-project BILLING_PROJECT_ID

更改下列內容:

  • ORGANIZATION_ID:建立安全設定檔群組的機構 ID。

  • BILLING_PROJECT_ID:用於配額的專案 ID。

刪除安全性設定檔群組

刪除安全性設定檔群組前,請先刪除參照該安全性設定檔群組的自訂攔截安全性設定檔

控制台

  1. 前往 Google Cloud 控制台的「Security profile groups」(安全性設定檔群組) 頁面。

    前往「安全性設定檔群組」

  2. 在專案選擇工具中選取您的機構。

  3. 在「安全性設定檔群組」分頁中,勾選安全性設定檔群組的核取方塊,然後按一下「刪除」

  4. 再按一下 [刪除] 加以確認。

gcloud

如要刪除安全性設定檔群組,請使用 gcloud network-security security-profile-groups delete 指令

gcloud network-security security-profile-groups delete SECURITY_PROFILE_GROUP_ID \
    --organization ORGANIZATION_ID \
    --billing-project BILLING_PROJECT_ID \
    --location global

更改下列內容:

  • SECURITY_PROFILE_GROUP_ID:要刪除的安全設定檔群組 ID。

  • ORGANIZATION_ID:建立安全設定檔群組的機構 ID。

  • BILLING_PROJECT_ID:用於配額的專案 ID。

後續步驟