このページでは、Identity and Access Management(IAM)のロールと権限を使用して、 Google Cloud リソースの Error Reporting データへのアクセスを制御する方法について説明します。
概要
IAM の権限とロールによって、Error Reporting API とGoogle Cloud コンソールを通じてデータへのアクセス アビリティを判断します。
Google Cloud リソース( Google Cloud プロジェクト、フォルダ、組織など)内で Error Reporting を使用するには、そのリソースに対する IAM ロールが付与されている必要があります。このロールには、適切な権限を含める必要があります。
役割は権限のコレクションです。プリンシパルに直接権限を付与することはできません。代わりに、ロールを付与します。ロールをプリンシパルに付与する際には、そのロールに含まれているすべての権限がプリンシパルに付与されます。1 人のプリンシパルに複数のロールを付与できます。
事前定義ロール
IAM には、特定の Google Cloud リソースに対するきめ細かいアクセス権を付与する事前定義ロールが用意されています。 Google Cloud はこれらのロールを作成、維持し、必要に応じて自動的に権限を更新します(Error Reporting に新機能が追加された場合など)。
次の表に、Error Reporting のロール、ロールのタイトル、説明、含まれている権限、ロールを設定できる最低レベルのリソースタイプを示します。このリソースタイプまたはほとんどの場合に Google Cloud 階層のそれ以上の任意のタイプに特定のロールを付与できます。
ロールに含まれる各権限のリストを取得するには、ロール メタデータの取得をご覧ください。
Role | Permissions |
---|---|
Error Reporting Admin Beta( Provides full access to Error Reporting data. Lowest-level resources where you can grant this role:
|
|
Error Reporting User Beta( Provides the permissions to read and write Error Reporting data, except for sending new error events. Lowest-level resources where you can grant this role:
|
|
Error Reporting Viewer Beta( Provides read-only access to Error Reporting data. Lowest-level resources where you can grant this role:
|
|
Error Reporting Writer Beta( Provides the permissions to send error events to Error Reporting. Lowest-level resources where you can grant this role:
|
|
API 権限
Error Reporting API メソッドでは、特定の IAM の権限が必要になります。次の表に、API メソッドで必要な権限の一覧と説明を示します。
メソッド | 必要な権限 | 説明 |
---|---|---|
deleteEvents |
errorreporting.errorEvents.delete |
エラーイベントの削除。 |
events.list |
errorreporting.errorEvents.list |
エラーイベントの一覧表示。 |
events.report |
errorreporting.errorEvents.create |
エラーイベントの作成または更新。 |
groupStats.list |
errorreporting.groups.list |
ErrorGroupStats の一覧表示。 |
groups.get |
errorreporting.groupMetadata.get |
エラーグループ情報の取得。 |
groups.update |
errorreporting.groupMetadata.update errorreporting.applications.list |
エラー解決ステータスの変更。 |
考慮事項
プリンシパルのユースケースに適用される権限とロールを決定する際は、次に示す Error Reporting のアクティビティと必要な権限の概要を考慮してください。
アクティビティ | 必要な権限 |
---|---|
Error Reporting Google Cloud コンソールのページに対する読み取り専用アクセス権を持つ。 | errorreporting.applications.list errorreporting.groupMetadata.get errorreporting.groups.list |
Google Cloud コンソールでグループの詳細を確認します。 | 読み取り専用権限に加えて次の権限: errorreporting.errorEvents.list |
Google Cloud コンソールでメタデータを変更します。エラーのミュートを含むエラー解決ステータスを変更します。 | 読み取り専用権限に加えて次の権限: errorreporting.groupMetadata.update |
Google Cloud コンソールでエラーを削除します。 | 読み取り専用権限に加えて次の権限: errorreporting.errorEvents.delete |
エラーを作成します( Google Cloud コンソール権限は必要ありません)。 | errorreporting.errorEvents.create |
通知を設定します。 | 読み取り専用権限に加えて次の権限: cloudnotifications.activities.list |
ロールを付与して管理する
IAM ロールの付与と管理には、Google Cloud コンソール、IAM API メソッド、Google Cloud CLI を使用します。ロールの付与と管理の手順については、アクセス権の付与、変更、取り消しをご覧ください。
1 人のユーザーに複数のロールを付与できます。ロールに含まれる権限のリストを取得するには、ロール メタデータの取得をご覧ください。
Google Cloud リソースにアクセスしようとしたときに必要な権限が不足している場合は、リソースのオーナーとして登録されているユーザーにお問い合わせください。
カスタムロール
Error Reporting の権限を含むカスタムのロールを作成するには、API 権限から権限を選択し、カスタムロールの作成の手順に従います。
役割変更の適用遅延
Error Reporting は IAM 権限を 5 分間キャッシュに保存します。このため、ロールの変更が反映されるまでに最大で 5 分ほどかかります。