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, if it is not already enabled.
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, if it is not already enabled.
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。認証情報の自動提供を有効にした後、関連するすべてのストレージ バケットに対する Storage オブジェクト ユーザーロール(
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。