Security Command Center 區域端點

本文說明如何在啟用資料落地功能時,使用 Security Command Center 資源。只有在為組織啟用 Security Command Center 時,才能啟用 Security Command Center 的資料落地設定。

具備資料落地權控制項的資源

下列 Security Command Center 資源類型受資料落地控管機制規範:

如要透過程式輔助方式或在指令列中使用這些資源,您必須使用 Security Command Center API 的區域端點。如要在 Google Cloud 控制台中使用這些資源,您必須使用管轄區 Google Cloud 控制台。

至於其他資源類型,請使用預設 API 端點和Google Cloud 控制台。

關於區域端點

區域端點可讓您存取特定位置的資源。使用區域端點時,要求會直接轉送至端點的位置。您無法使用區域端點存取其他位置的資源。

使用區域端點,有助於強制執行資料落地控制措施,保護靜態、使用中和傳輸中的資源。

Security Command Center 包含多項服務。對於受資料落地控管機制約束的資源類型,下列服務需要使用區域端點:

Security Command Center API
securitycenter.LOCATION.rep.googleapis.com
Google SecOps
請參閱 Google SecOps 參考文件。

將 LOCATION 替換為服務支援的位置。

所有其他資源類型都必須使用預設端點。

關於管轄區 Google Cloud 控制台

啟用 Security Command Center 時,您可以在管轄區 Google Cloud 控制台啟用資料落地設定。此外,您也可以透過這個頁面存取特定位置的資源。

使用管轄區 Google Cloud 控制台,即可對資源強制執行資料落地控管措施,無論資源是靜態、使用中或傳輸中。

您只能透過管轄區 Google Cloud 控制台存取受資料落地控管機制規範的資源類型。如要開啟控制台,請根據您所在位置使用適當的網址:

歐盟
聯合身分使用者: console.eu.cloud.google
所有其他使用者: console.eu.cloud.google.com
沙烏地阿拉伯王國 (KSA)
聯合身分使用者: console.sa.cloud.google
所有其他使用者: console.sa.cloud.google.com
美國
聯合身分使用者: console.us.cloud.google
所有其他使用者: console.us.cloud.google.com

如要管理其他類型的資源,請使用標準 Google Cloud 控制台。

區域端點的位置

本節列出 Security Command Center API 和相關服務提供區域端點的位置。

Security Command Center API 的位置

Security Command Center API 在下列位置提供區域和多區域端點:

歐盟
eu
沙烏地阿拉伯王國 (KSA)
me-central2
美國
us

AI Protection 適用地區

如要充分發揮 AI 防護機制的效益,AI 工作負載必須位於下列區域:

歐盟
europe-west4:荷蘭 節能綠葉圖示 低二氧化碳排放
沙烏地阿拉伯王國 (KSA)
me-central2:達曼
美國
us-central1:愛荷華州 節能綠葉圖示 低二氧化碳
us-east4:北維吉尼亞州
us-west1:奧勒岡州 節能綠葉圖示 低二氧化碳

AI Protection 在下列位置提供多區域端點:

歐盟
eu
沙烏地阿拉伯王國 (KSA)
sa
美國
us

可用功能因地區而異。如要瞭解所在地區支援或不支援哪些功能,請參閱下表。

區域 Notebook Security Scanner (預先發布版) Model Armor 無法使用功能
me-central2 (KSA) 否 否
  • 無法使用 AI Discovery 服務。AI Protection 不會探索 Gemini 基礎模型。
  • 這個區域不支援 Model Armor。Gemini Enterprise Agent Platform 模型不受 Model Armor 保護,且對應的小工具不會在資訊主頁中顯示資料。
  • 無法查看套件安全漏洞發現項目。
us-east7 是 否
  • Gemini Enterprise Agent Platform 模型不受 Model Armor 保護。
  • 無法提供發現項目。
  • 有兩個 Model Armor 小工具沒有任何可用資料。
europe-west1
europe-west2
asia-southeast1
否 是 無法查看套件安全漏洞發現項目。
其他區域 否 否
  • Gemini Enterprise Agent Platform 模型不受 Model Armor 保護。
  • 無法提供發現項目。
  • 有兩個 Model Armor 小工具沒有任何可用資料。
  • 無法查看套件安全漏洞發現項目。

Google SecOps 的位置

請參閱 Google SecOps 位置頁面。

區域端點工具

如要管理受資料落地控管機制約束的資源類型,您必須在建立用戶端或執行指令時指定區域端點。

所有其他資源類型都必須使用預設端點。

gcloud

下列 gcloud CLI 指令群組需要使用區域端點:

對於所有其他 gcloud scc 指令群組,您必須使用 Security Command Center API 的預設端點。

變更服務端點

如要切換至區域端點,請執行下列指令:

gcloud config set api_endpoint_overrides/SERVICE \
    https://SERVICE.LOCATION.rep.googleapis.com/

如要切換至預設端點,請執行下列指令:

gcloud config unset api_endpoint_overrides/SERVICE

更改下列內容:

  • SERVICE:要設定的服務;請使用 securitycenter 指定 Security Command Center API
  • LOCATION:服務支援的位置

您也可以為使用區域端點的 gcloud CLI 建立命名設定。執行 gcloud CLI 指令前,您可以執行 gcloud config configurations activate 指令,切換至具名設定。

執行 gcloud CLI 指令

執行 Security Command Center API 的 gcloud CLI 指令時,一律須指定位置。做法如下:

  • 使用 --location 旗標。
  • 如果您提供資源名稱的完整路徑,請使用指定位置的格式,例如 projects/123/sources/456/locations/LOCATION/findings/a1b2c3。

下列範例說明如何使用 --location 旗標。

gcloud scc findings list 指令會列出特定位置的組織發現項目。

使用下列任何指令資料前,請先替換以下項目:

  • ORGANIZATION_ID:組織的數字 ID。
  • LOCATION:Security Command Center API 支援的位置

執行 gcloud scc findings list 指令:

Linux、macOS 或 Cloud Shell

gcloud scc findings list ORGANIZATION_ID --location=LOCATION

Windows (PowerShell)

gcloud scc findings list ORGANIZATION_ID --location=LOCATION

Windows (cmd.exe)

gcloud scc findings list ORGANIZATION_ID --location=LOCATION

回覆會列出發現項目。

Terraform

如要瞭解如何套用或移除 Terraform 設定,請參閱「基本 Terraform 指令」。詳情請參閱 Terraform 供應商參考文件。

provider "google" {
  alias                              = "securitycenter_v2_endpoint_us"
  security_center_v2_custom_endpoint = "https://securitycenter.us.rep.googleapis.com/v2/"
}

Go

請使用下列其中一個區域端點:

Security Command Center API
securitycenter.LOCATION.rep.googleapis.com:443

將 LOCATION 替換為服務支援的位置。

下列程式碼範例說明如何建立使用區域端點的 Security Command Center API 用戶端。

import (
	"context"
	"fmt"

	securitycenter "cloud.google.com/go/securitycenter/apiv2"
	"google.golang.org/api/option"
)

// createClientWithEndpoint creates a Security Command Center client for a
// regional endpoint.
func createClientWithEndpoint(repLocation string) error {
	// Assemble the regional endpoint URL using provided location.
	repEndpoint := fmt.Sprintf("securitycenter.%s.rep.googleapis.com:443", repLocation)
	// Instantiate client for regional endpoint. Use this client to access resources that
	// are subject to data residency controls, and that are located in the region
	// specified in repLocation.
	repCtx := context.Background()
	repClient, err := securitycenter.NewClient(repCtx, option.WithEndpoint(repEndpoint))
	if err != nil {
		return err
	}
	defer repClient.Close()

	return nil
}

Java

請使用下列其中一個區域端點:

Security Command Center API
securitycenter.LOCATION.rep.googleapis.com:443

將 LOCATION 替換為服務支援的位置。

下列程式碼範例說明如何建立使用區域端點的 Security Command Center API 用戶端。


import com.google.cloud.securitycenter.v2.SecurityCenterClient;
import com.google.cloud.securitycenter.v2.SecurityCenterSettings;
import java.io.IOException;

public class CreateClientWithEndpoint {

  public static void main(String[] args) throws IOException {
    // TODO: Replace the value with the endpoint for the region in which your
    // Security Command Center data resides.
    String regionalEndpoint = "securitycenter.me-central2.rep.googleapis.com:443";
    SecurityCenterClient client = createClientWithEndpoint(regionalEndpoint);
    System.out.println("Client initiated with endpoint: " + client.getSettings().getEndpoint());
  }

  // Creates Security Command Center client for a regional endpoint.
  public static SecurityCenterClient createClientWithEndpoint(String regionalEndpoint)
      throws java.io.IOException {
    SecurityCenterSettings regionalSettings =
        SecurityCenterSettings.newBuilder().setEndpoint(regionalEndpoint).build();
    return SecurityCenterClient.create(regionalSettings);
  }
}

Python

請使用下列其中一個區域端點:

Security Command Center API
securitycenter.LOCATION.rep.googleapis.com

將 LOCATION 替換為服務支援的位置。

下列程式碼範例說明如何建立使用區域端點的 Security Command Center API 用戶端。

from google.cloud import securitycenter_v2


def create_client_with_endpoint(api_endpoint) -> securitycenter_v2.SecurityCenterClient:
    """
    Creates a Security Command Center client for a regional endpoint.
    Args:
        api_endpoint: the regional endpoint's hostname, like 'securitycenter.REGION.rep.googleapis.com'
    Returns:
        securitycenter_v2.SecurityCenterClient: returns a client for the regional endpoint
    """
    regional_client = securitycenter_v2.SecurityCenterClient(
        client_options={"api_endpoint": api_endpoint}
    )
    print(
        "Regional client initiated with endpoint: {}".format(
            regional_client.api_endpoint
        )
    )
    return regional_client

REST

如要存取下列 REST API 資源類型,必須使用區域性服務端點:

Security Command Center API

端點: https://securitycenter.LOCATION.rep.googleapis.com

將 LOCATION 替換為服務支援的位置。

資源類型:

將 LOCATION 替換為服務支援的位置。

所有其他資源類型都必須使用預設端點。