このページでは、Eventarc で使用可能なアクセス制御オプションについて説明します。
概要
Eventarc は Identity and Access Management(IAM)を使用してアクセスを制御します。
IAM とその機能の概要については、IAM の概要をご覧ください。
許可ポリシーを使用してアクセス権を付与および取り消す方法については、プロジェクト、フォルダ、組織へのアクセスを管理するをご覧ください。
- アクセス ポリシーを使用して Eventarc Advanced でパブリッシュ アクセスを制御するには、パブリッシュ アクセスを制御するをご覧ください。
Eventarc でサポートされる権限とロールについては、以下のセクションをご覧ください。
Eventarc サービス エージェント
一部の Google Cloud サービスには、適切な権限が付与されている場合にサービスがリソースにアクセスできるようにするサービス エージェントがあります。API にサービス エージェントが必要な場合、API を有効にして使用した後、 Google Cloud がサービス エージェントを作成します。
Eventarc は、サービス エージェントを最初に必要になったとき(Eventarc リソースを初めて作成するときなど)にのみ作成するプロビジョニング モデルを使用します。API が最初に有効になったときには作成されません。サービス エージェントのプロビジョニングとシステム全体への変更の伝播には数分かかることがあります。この遅延の詳細については、Eventarc サービス エージェントの使用中に権限が拒否されるをご覧ください。
Eventarc API を有効にする
Eventarc の IAM ロールを表示して割り当てるには、プロジェクトで Eventarc API を有効にする必要があります。API を有効にするまで、 Google Cloud コンソールで Eventarc のロールは表示されません。
Eventarc API と Eventarc Publishing 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.
gcloud
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.
gcloud services enable eventarc.googleapis.comeventarcpublishing.googleapis.com
事前定義ロール
次の表に、Eventarc IAM 事前定義ロールとそのロールに含まれている権限を示します。
事前定義ロールは、一般的なユースケースのほとんどに対応しています。事前定義ロールがユースケースに対応していない場合は、IAM のカスタムロールを作成できます。
Eventarc のロール
| Role | Permissions |
|---|---|
Eventarc Admin( Full control over all Eventarc resources. Lowest-level resources where you can grant this role:
|
|
Eventarc Connection Publisher Beta( Can publish events to Eventarc channel connections. Lowest-level resources where you can grant this role:
|
|
Eventarc Developer( Access to read and write Eventarc resources. Lowest-level resources where you can grant this role:
|
|
Eventarc Event Receiver( Can receive events from all event providers. Lowest-level resources where you can grant this role:
|
|
Eventarc Message Bus Admin( Full control over Message Buses resources. |
|
Eventarc Message Bus User( Access to publish to or bind to a Message Bus. |
|
Eventarc Event Collector Beta( Can collect events from multiple projects in an org for a source resource. |
|
Eventarc Publisher Beta( Can publish events to Eventarc channels. Lowest-level resources where you can grant this role:
|
|
Eventarc Service Agent( Gives Eventarc service account access to managed resources. |
|
Eventarc Viewer( Can view the state of all Eventarc resources, including IAM policies. Lowest-level resources where you can grant this role:
|
|
プロジェクト レベルの IAM の管理
プロジェクト レベルでは、 Google Cloud コンソール、IAM API、Google Cloud CLI を使用して IAM ロールの付与、変更、取り消しを行うことができます。手順については、プロジェクト、フォルダ、組織へのアクセスを管理するをご覧ください。