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 控制台

您可以在 Google Cloud 管轄區控制台中啟用 Security Command Center 時,啟用資料落地設定。也能存取特定位置的資源。

使用管轄區 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:荷蘭 節能綠葉圖示 低二氧化碳排放2
沙烏地阿拉伯王國 (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:要設定的服務;請使用 Security Command Center API 的 securitycenter
  • 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 替換為服務的支援位置。

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