사용자 인증 정보 제공 사용 설정

기존 Apache Iceberg REST 카탈로그에 사용자 인증 정보 벤더 제공 모드를 사용 설정하면 권한이 부여된 쿼리 엔진 또는 워크로드에 수명이 짧은 다운스코프 스토리지 토큰을 제공하도록 Lakehouse for Apache Iceberg가 구성됩니다.

Lakehouse 런타임 카탈로그 내에서 이 인증 방법을 사용하면 사용자 또는 쿼리 런타임이 기본 Cloud Storage 버킷에 대한 직접 읽기 및 쓰기 권한을 보유할 필요가 없습니다.

시작하기 전에

  1. Lakehouse 런타임 카탈로그 정보를 읽고 Lakehouse 런타임 카탈로그의 작동 방식과 서비스 제한사항을 파악합니다.
  2. 계정에 로그인합니다. Google Cloud 를 처음 사용하는 경우 Google Cloud, 계정을 만들어 실제 시나리오에서 Google Cloud 제품의 성능을 평가하세요. 신규 고객에게는 워크로드를 실행, 테스트, 배포하는 데 사용할 수 있는 $300의 무료 크레딧이 제공됩니다.

    In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

    Verify that billing is enabled for your Google Cloud project.

    Enable the BigLake API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the API

    In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

    Verify that billing is enabled for your Google Cloud project.

    Enable the BigLake API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the API

필요한 역할

사용자 인증 정보 벤더 제공을 사용 설정하는 데 필요한 권한을 얻으려면 관리자에게 다음 IAM 역할을 부여해 달라고 요청하세요.

  • 모두:
  • 자동 프로비저닝된 Apache Iceberg REST 카탈로그 서비스 계정: 스토리지 객체 사용자 (roles/storage.objectUser) 연결된 모든 Cloud Storage 버킷에 대한 사용자 인증 정보 벤더 제공을 사용 설정한 후 연결된 모든 스토리지 버킷에 대한 스토리지 객체 사용자 역할 (roles/storage.objectUser)을 카탈로그의 자동 프로비저닝된 Apache Iceberg REST 카탈로그 서비스 계정에 명시적으로 부여합니다.

역할 부여에 대한 자세한 내용은 프로젝트, 폴더, 조직에 대한 액세스 관리를 참조하세요.

커스텀 역할이나 다른 사전 정의된 역할을 통해 필요한 권한을 얻을 수도 있습니다.

사용자 인증 정보 벤더 제공 사용 설정

Apache Iceberg REST 카탈로그의 인증 방법이 최종 사용자 인증 정보로 설정 된 경우 사용자 인증 정보 벤더 제공 모드로 전환할 수 있습니다.

콘솔

  1. 콘솔에서 Lakehouse 페이지를 엽니다. Google Cloud

Lakehouse로 이동

  1. 업데이트 중인 카탈로그의 행에서 카탈로그 작업 더보기 > 인증 수정을 선택합니다.

  2. 인증 대화상자에서 사용자 인증 정보 벤더 제공 모드 를 선택합니다. 자동 프로비저닝된 Apache Iceberg REST 카탈로그 서비스 계정에는 연결된 모든 Cloud Storage 버킷에 대한 명시적 스토리지 객체 사용자 역할(roles/storage.objectUser)이 필요합니다. 기본적으로 액세스 권한이 없습니다. 이 역할이 없으면 제공된 사용자 인증 정보의 범위가 스토리지 쓰기를 수행하기에 충분하지 않습니다.

  3. 저장 을 선택합니다.

      Your catalog is updated and the **Catalog details** page opens.
    
  4. 인증 방법에서 버킷 권한 설정을 선택합니다.

  5. 대화상자에서 확인 을 선택합니다.

이렇게 하면 카탈로그의 서비스 계정에 연결된 모든 스토리지 버킷에 대한 스토리지 객체 사용자 역할 (roles/storage.objectUser)이 있는지 확인됩니다.

gcloud

gcloud biglake iceberg catalogs update 명령어를 사용합니다.

gcloud biglake iceberg catalogs update \
    CATALOG_NAME \
    --project PROJECT_ID \
    --credential-mode vended-credentials

다음을 바꿉니다.

  • CATALOG_NAME: 카탈로그의 이름입니다. Lakehouse 카탈로그의 경우 커스텀 카탈로그 이름입니다. Cloud Storage 버킷 카탈로그의 경우 REST 카탈로그와 함께 사용되는 Cloud Storage 버킷 ID와 일치합니다. 이 이름은 BigQuery에서 이러한 테이블을 쿼리할 때 카탈로그 식별자로도 사용됩니다.
  • PROJECT_ID: 프로젝트 ID입니다. Google Cloud

    사용자 인증 정보 벤더 제공을 사용 설정한 후 연결된 모든 스토리지 버킷에 대한 스토리지 객체 사용자 역할 (roles/storage.objectUser)을 카탈로그의 자동 프로비저닝된 Apache Iceberg REST 카탈로그 서비스 계정에 명시적으로 부여합니다.

REST

REST API를 사용하여 사용자 인증 정보 벤더 제공 모드를 사용 설정하려면 PATCH 요청 을 UpdateIcebergCatalog 엔드포인트에 전송합니다.

PATCH /iceberg/v1/restcatalog/extensions/projects/PROJECT_ID/catalogs/CATALOG_ID?updateMask=icebergCatalog.credential_mode

요청 본문에는 credential_modeVENDED_CREDENTIALS로 설정된 IcebergCatalog JSON 페이로드가 포함되어야 합니다.

다음을 바꿉니다.

  • PROJECT_ID: 프로젝트 ID입니다. Google Cloud
  • CATALOG_ID: Lakehouse 런타임 카탈로그의 ID입니다.