既存の Apache Iceberg REST カタログで認証情報ベンディング モードを有効にすると、ボーダーレス Lakehouse が、承認されたクエリエンジンまたはワークロードに有効期間の短いスコープダウンされたストレージ トークンをベンディングするように構成されます。
Lakehouse ランタイム カタログ内では、この認証方法により、基盤となる Cloud Storage バケットに対する直接の読み取り / 書き込み権限をユーザーまたはクエリ ランタイムが保持する必要がなくなります。
始める前に
- Lakehouse ランタイム カタログについてを読んで、Lakehouse ランタイム カタログの仕組みとサービスの制限事項を確認します。
- 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 theresourcemanager.projects.createpermission. Learn how to grant roles. - 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 theresourcemanager.projects.createpermission. Learn how to grant roles.
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
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.
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
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.
必要なロール
認証情報ベンダーを有効にするために必要な権限を取得するには、次の IAM ロールを付与するよう管理者に依頼してください。
-
すべて:
- プロジェクトに対する BigLake 管理者 (
roles/biglake.admin) - プロジェクトに対するストレージ管理者 (
roles/storage.admin)
- プロジェクトに対する BigLake 管理者 (
-
自動プロビジョニングされた Apache Iceberg REST カタログ サービス アカウント: 関連付けられたすべての Cloud Storage バケットに対する Storage オブジェクト ユーザー (
roles/storage.objectUser)。認証情報ベンダーを有効にしたら、関連付けられているすべてのストレージ バケットに対する Storage オブジェクト ユーザーロール(roles/storage.objectUser)を、カタログの自動プロビジョニングされた Apache Iceberg REST カタログ サービス アカウントに明示的に付与します。
ロールの付与については、プロジェクト、フォルダ、組織へのアクセス権の管理をご覧ください。
必要な権限は、カスタムロールや他の事前定義ロールから取得することもできます。
認証情報のベンダーを有効にする
Apache Iceberg REST カタログの認証方法がエンドユーザー認証情報に設定されている場合は、認証情報ベンディング モードに切り替えることができます。
コンソール
- Google Cloud コンソールで、[Lakehouse] ページを開きます。
更新するカタログの行で、 [その他のカタログ操作] > [認証を編集] を選択します。
認証ダイアログで、[認証情報ベンディング モード] を選択します。自動プロビジョニングされた Apache Iceberg REST カタログ サービス アカウントには、関連付けられているすべての Cloud Storage バケットに対する明示的な Storage オブジェクト ユーザー ロール(
roles/storage.objectUser)が必要です。デフォルトでは、アクセス権はありません。このロールがないと、ベンダー認証情報にはストレージ書き込みを実行するのに十分なスコープがありません。[保存] を選択します。
Your catalog is updated and the **Catalog details** page opens.[認証方法] で、[バケット権限を設定] を選択します。
ダイアログで [確認] を選択します。
これにより、カタログのサービス アカウントに関連付けられているすべてのストレージ バケットに 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_mode が VENDED_CREDENTIALS に設定された IcebergCatalog JSON ペイロードを含める必要があります。
次のように置き換えます。
PROJECT_ID: 実際の Google Cloud プロジェクト ID。CATALOG_ID: Lakehouse ランタイム カタログの ID。