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에는 여러 서비스가 포함되어 있습니다. 데이터 상주 제어가 적용되는 리소스 유형의 경우에는 다음 서비스에서 리전 엔드포인트를 사용해야 합니다.

Model Armor API
modelarmor.LOCATION.rep.googleapis.com
Security Command Center API
securitycenter.LOCATION.rep.googleapis.com

LOCATION을 서비스의 지원되는 위치로 바꿉니다.

다른 모든 리소스 유형의 경우 기본 엔드포인트를 사용해야 합니다.

관할권 Google Cloud 콘솔 정보

관할권 Google Cloud 콘솔을 사용하면 Security Command Center의 표준 또는 프리미엄 서비스 등급을 활성화할 때 데이터 상주를 사용 설정할 수 있습니다. 또한 특정 위치의 리소스에 대한 액세스도 제공합니다.

관할권 Google Cloud 콘솔을 사용하면 저장, 사용, 전송 중인 리소스에 대해 데이터 상주 제어를 적용할 수 있습니다.

관할권 Google Cloud 콘솔을 사용하면 데이터 상주 제어가 적용되는 리소스 유형에만 액세스할 수 있습니다. 콘솔을 열려면 해당 위치에 적합한 URL을 사용하세요.

유럽 연합
제휴 ID 사용자: console.eu.cloud.google
기타 모든 사용자: console.eu.cloud.google.com
사우디아라비아 왕국(KSA)
제휴 ID 사용자: console.sa.cloud.google
기타 모든 사용자: console.sa.cloud.google.com
미국
제휴 ID 사용자: 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

Model Armor API의 위치

Model Armor API는 다음 위치에서 리전 엔드포인트를 제공합니다.

유럽 연합
europe-west4: 네덜란드 잎 아이콘 낮은 CO2
미국
us-central1: 아이오와 잎 아이콘 낮은 CO2
us-east1: 사우스캐롤라이나
us-east4: 북 버지니아
us-west1: 오리건 잎 아이콘 낮은 CO2

Model Armor API는 다음 위치에서 멀티 리전 엔드포인트를 제공합니다.

유럽 연합
eu
미국
us

리전 엔드포인트용 도구

데이터 상주 제어가 적용되는 리소스 유형을 관리하려면 클라이언트를 만들거나 명령어를 실행할 때 리전 엔드포인트를 지정해야 합니다.

다른 모든 리소스 유형의 경우 기본 엔드포인트를 사용해야 합니다.

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: 구성할 서비스입니다. Model Armor API의 경우 modelarmor를 사용하고, 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

다음 리전 엔드포인트 중 하나를 사용하세요.

Model Armor API
modelarmor.LOCATION.rep.googleapis.com:443
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

다음 리전 엔드포인트 중 하나를 사용하세요.

Model Armor API
modelarmor.LOCATION.rep.googleapis.com:443
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

다음 리전 엔드포인트 중 하나를 사용하세요.

Model Armor API
modelarmor.LOCATION.rep.googleapis.com
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 리소스 유형에 액세스하려면 리전 서비스 엔드포인트를 사용해야 합니다.

Model Armor API

엔드포인트: https://modelarmor.LOCATION.rep.googleapis.com

LOCATION을 서비스의 지원되는 위치로 바꿉니다.

리소스 유형: 모든 리소스 유형

Security Command Center API

엔드포인트: https://securitycenter.LOCATION.rep.googleapis.com

LOCATION을 서비스의 지원되는 위치로 바꿉니다.

리소스 유형:

LOCATION을 서비스의 지원되는 위치로 바꿉니다.

다른 모든 리소스 유형의 경우 기본 엔드포인트를 사용해야 합니다.