認証情報のベンディングを有効にする

既存の Apache Iceberg REST カタログで認証情報ベンディング モードを有効にすると、ボーダーレス Lakehouse が、承認されたクエリエンジンまたはワークロードに有効期間の短いスコープダウンされたストレージ トークンをベンディングするように構成されます。

Lakehouse ランタイム カタログ内では、この認証方法により、基盤となる Cloud Storage バケットに対する直接の読み取り / 書き込み権限をユーザーまたはクエリ ランタイムが保持する必要がなくなります。

始める前に

  1. Lakehouse ランタイム カタログについてを読んで、Lakehouse ランタイム カタログの仕組みとサービスの制限事項を確認します。
  2. Google Cloud アカウントにログインします。 Google Cloudを初めて使用する場合は、 アカウントを作成して、実際のシナリオでの Google プロダクトのパフォーマンスを評価してください。新規のお客様には、ワークロードの実行、テスト、デプロイができる無料クレジット $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 serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). 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 serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the API

必要なロール

認証情報ベンダーを有効にするために必要な権限を取得するには、次の IAM ロールを付与するよう管理者に依頼してください。

  • すべて:
  • 自動プロビジョニングされた Apache Iceberg REST カタログ サービス アカウント: 関連付けられたすべての Cloud Storage バケットに対する Storage オブジェクト ユーザー roles/storage.objectUser)。認証情報ベンダーを有効にしたら、関連付けられているすべてのストレージ バケットに対する Storage オブジェクト ユーザーロール(roles/storage.objectUser)を、カタログの自動プロビジョニングされた Apache Iceberg REST カタログ サービス アカウントに明示的に付与します。

ロールの付与については、プロジェクト、フォルダ、組織へのアクセス権の管理をご覧ください。

必要な権限は、カスタムロールや他の事前定義ロールから取得することもできます。

認証情報のベンダーを有効にする

Apache Iceberg REST カタログの認証方法がエンドユーザー認証情報に設定されている場合は、認証情報ベンディング モードに切り替えることができます。

コンソール

  1. Google Cloud コンソールで、[Lakehouse] ページを開きます。

[レイクハウス] に移動

  1. 更新するカタログの行で、 [その他のカタログ操作] > [認証を編集] を選択します。

  2. 認証ダイアログで、[認証情報ベンディング モード] を選択します。自動プロビジョニングされた Apache Iceberg REST カタログ サービス アカウントには、関連付けられているすべての Cloud Storage バケットに対する明示的な Storage オブジェクト ユーザー ロール(roles/storage.objectUser)が必要です。デフォルトでは、アクセス権はありません。このロールがないと、ベンダー認証情報にはストレージ書き込みを実行するのに十分なスコープがありません。

  3. [保存] を選択します。

      Your catalog is updated and the **Catalog details** page opens.
    
  4. [認証方法] で、[バケット権限を設定] を選択します。

  5. ダイアログで [確認] を選択します。

これにより、カタログのサービス アカウントに関連付けられているすべてのストレージ バケットに Storage オブジェクト ユーザー ロール(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: 実際の Google Cloudプロジェクト ID。

    認証情報のベンディングを有効にしたら、関連付けられているすべてのストレージ バケットに対するストレージ オブジェクト ユーザー ロール(roles/storage.objectUser)を、カタログの自動プロビジョニングされた Apache Iceberg REST カタログ サービス アカウントに明示的に付与します。

REST

REST API を使用して認証情報ベンディング モードを有効にするには、UpdateIcebergCatalog エンドポイントに PATCH リクエストを行います。

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

リクエストの本文には、credential_modeVENDED_CREDENTIALS に設定された IcebergCatalog JSON ペイロードを含める必要があります。

次のように置き換えます。

  • PROJECT_ID: 実際の Google Cloud プロジェクト ID。
  • CATALOG_ID: Lakehouse ランタイム カタログの ID。