샌드박스용 고객 관리 암호화 키 (CMEK) 구성

소유하고 관리하는 Cloud Key Management Service 키로 샌드박스의 저장 데이터를 암호화합니다.

개요

기본적으로 Cloud de Confiance by S3NS 저장 데이터를 Google Cloud-powered encryption keys암호화합니다. 고객 관리 암호화 키 (CMEK)를 사용하면 Cloud Key Management Service 암호화 키를 만들고 관리하여 사용을 감사하고, 순환하고, 사용 중지하거나 폐기하여 보호된 데이터를 읽을 수 없게 만들 수 있습니다.

Gemini Enterprise Agent Platform 샌드박스는 격리된 환경에서 에이전트의 코드, 브라우저 또는 커스텀 컨테이너를 실행합니다. 이 환경은 고객 콘텐츠를 디스크에 쓰고 샌드박스의 상위 Gemini Enterprise Agent Platform 인스턴스에서 CMEK를 사용 설정하면 CMEK가 보호하는 스냅샷에 체크포인트될 수 있습니다.

Gemini Enterprise Agent Platform 인스턴스를 만들 때만 Gemini Enterprise Agent Platform 샌드박스의 CMEK를 구성할 수 있습니다. CMEK 키는 샌드박스 환경, 템플릿, 스냅샷을 비롯한 Gemini Enterprise Agent Platform 인스턴스와 하위 리소스를 보호합니다.

샌드박스에서 CMEK가 암호화하는 항목

상위 Gemini Enterprise Agent Platform 인스턴스에서 CMEK를 사용 설정하면 샌드박스의 저장 데이터 노출 영역이 키로 암호화됩니다.

  • GKE 노드 부팅 디스크 / 루트 파일 시스템: 세션이 런타임에 쓰는 파일과 디스크로 페이징된 메모리 내 상태 (노드 부팅 디스크 CMEK)
  • 스냅샷 Cloud Storage 버킷: 샌드박스 (스냅샷)의 디스크 및 메모리 체크포인트(버킷 기본 암호화)

리소스 메타데이터 (이름, 라벨, 상태, 연결 정보)와 환경 변수 및 서비스 계정 이메일은 CMEK 키로 암호화되지 않습니다.

커스텀 컨테이너 이미지를 암호화하려면 자체 Artifact Registry 저장소에서 CMEK를 설정하세요.

제한사항 및 고려사항

  • Gemini Enterprise Agent Platform의 CMEK에는 단일 리전 키만 지원됩니다. 멀티 리전, 이중 리전, 전역 키는 지원되지 않습니다.
  • Gemini Enterprise Agent Platform 인스턴스를 만들 때 키는 변경 불가능합니다. 다른 키를 사용하려면 새 Gemini Enterprise Agent Platform 인스턴스를 만들어야 합니다. 동일한 키의 새 버전으로 순환하는 것은 지원되며 자동으로 적용됩니다.
  • 키 버전을 사용 중지하거나 폐기하거나 암호화/복호화 역할을 취소하면 샌드박스를 프로비저닝하거나 재개할 수 없으며 스냅샷 쓰기가 실패합니다. 샌드박스 리소스를 복구하려면 키 액세스를 복원하세요.

시작하기 전에

  • Cloud Key Management Service 키링 및 키가 있거나 만듭니다. 권장사항으로 Gemini Enterprise Agent Platform 워크로드와 별도의 프로젝트에 키를 보관하고 다른 관리자가 관리합니다.
  • 키를 만들고 관리 (roles/cloudkms.admin)하고 Gemini Enterprise Agent Platform 인스턴스를 만들 역할을 보유하고 있는지 확인합니다.
  • 아직 Agent Runtime 서비스 에이전트를 만들지 않았다면 만듭니다.

    # Create the service agent if needed
    gcloud beta services identity create \
        --service=aiplatform.googleapis.com \
        --project=PROJECT_ID
    

Cloud Key Management Service 키 만들기

Gemini Enterprise Agent Platform 인스턴스와 동일한 리전에 단일 리전 키를 만듭니다.

# Key ring (once per region)
gcloud kms keyrings create sandbox-keyring \
    --location=REGION

# Key
gcloud kms keys create sandbox-key \
    --location=REGION \
    --keyring=sandbox-keyring \
    --purpose=encryption

다음을 바꿉니다.

  • REGION: Gemini Enterprise Agent Platform 인스턴스의 Cloud de Confiance 리전 (예: us-central1)

Agent Platform 서비스 에이전트에 키 액세스 권한 부여

키에 Agent Runtime 서비스 에이전트 Cloud Key Management Service CryptoKey 암호화/복호화 역할 (roles/cloudkms.cryptoKeyEncrypterDecrypter)을 부여합니다.

# Grant Encrypter/Decrypter on the key
gcloud kms keys add-iam-policy-binding sandbox-key \
    --location=REGION \
    --keyring=sandbox-keyring \
    --member="serviceAccount:service-PROJECT_NUMBER@gcp-sa-aiplatform-re.s3ns-system.iam.gserviceaccount.com" \
    --role="roles/cloudkms.cryptoKeyEncrypterDecrypter"

다음을 바꿉니다.

  • PROJECT_NUMBER: 귀하의 Cloud de Confiance by S3NS 프로젝트 번호.

Agent Platform 인스턴스에서 CMEK 사용 설정

Gemini Enterprise Agent Platform 인스턴스를 만들 때 encryption_spec.kms_key_name을 설정합니다. 그 아래에서 만드는 모든 샌드박스 템플릿과 샌드박스는 이 키를 상속합니다.

Python SDK

import vertexai

client = vertexai.Client(project="PROJECT_ID", location="REGION",
                        http_options={"api_version": "v1beta1"})
agent_instance = client.agent_engines.create(
    config={
        "encryption_spec": {
            "kms_key_name":
                "projects/PROJECT_ID/locations/REGION/keyRings/sandbox-keyring/cryptoKeys/sandbox-key"
        }
    },
)

REST

REST API를 사용하여 생성 시 reasoningEngines.encryptionSpec.kmsKeyName에서 동일한 값을 설정합니다.

curl -X POST \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
  https://REGION-aiplatform.googleapis.com/v1beta1/projects/PROJECT_ID/locations/REGION/reasoningEngines \
  -d '{
    "display_name": "cmek-protected-engine",
    "encryption_spec": {
      "kms_key_name": "projects/PROJECT_ID/locations/REGION/keyRings/sandbox-keyring/cryptoKeys/sandbox-key"
    }
  }'

샌드박스 만들기 및 CMEK 구성 확인

  1. CMEK로 보호되는 Gemini Enterprise Agent Platform 인스턴스에서 샌드박스 템플릿과 샌드박스를 만듭니다.
  2. 인스턴스 세부정보를 가져와서 Gemini Enterprise Agent Platform 인스턴스가 encryption_spec.kms_key_name에서 키를 보고하는지 확인합니다.
  3. 선택적으로 Cloud Key Management Service 감사 로그를 확인하여 샌드박스가 시작되고 스냅샷이 작성될 때 암호화 및 복호화 작업이 발생하는지 확인합니다.

다음 단계