Fault Injection Testing のアクセス権を管理する

このページでは、Identity and Access Management(IAM)を使用して Fault Injection Testing 機能へのアクセスを管理する方法について説明します。

リソースの Google Cloud 管理者またはオーナーは、Fault Injection Testing のロールと権限を付与できます

管理者は、ユーザーが必要なアクセス権のみを持ち、それ以上のアクセス権を持たないようにする必要があります(最小権限の原則)。Fault Injection Testing では、実験の構成と実行の両方にアカウントが必要となるため、最小権限が特に重要になります。誤ったリソースで実行された場合や、承認されていないユーザーまたはトレーニングを受けていないユーザーが操作した場合、障害が発生する可能性があります。

Fault Injection Testing の API を有効にする

プロジェクトで Fault Injection Testing API を有効にするには:

  1. Google Cloud コンソールの [API ライブラリ] ページに移動します。
  2. faulttesting を検索し、[Fault Testing API] を選択します。
  3. [有効にする] ボタンを選択します。

API の有効化の進行状況を示すダイアログが表示されます。

必要な権限を設定する

Fault Injection Testing には、次のロールが用意されています。

ロール名

説明

権限

roles/faulttesting.operator

Fault Testing 管理者/オペレーター

Fault Testing リソースに対する完全アクセス権。オペレーターには、影響を受ける Google Cloud リソースに対する編集権限も必要です。

faulttesting.googleapis.com/operations.delete

faulttesting.googleapis.com/operations.cancel

faulttesting.googleapis.com/experiments.create

faulttesting.googleapis.com/experiments.update

faulttesting.googleapis.com/experiments.delete

faulttesting.googleapis.com/validations.create

faulttesting.googleapis.com/validations.delete

faulttesting.googleapis.com/validationResources.create

faulttesting.googleapis.com/validationResources.update

faulttesting.googleapis.com/validationResources.delete

faulttesting.googleapis.com/affectedResources.create

faulttesting.googleapis.com/affectedResources.update

faulttesting.googleapis.com/affectedResources.delete

faulttesting.googleapis.com/experimentTemplates.create

faulttesting.googleapis.com/experimentTemplates.update

faulttesting.googleapis.com/experimentTemplates.delete

cloudresourcemanager.googleapis.com/projects.get

cloudresourcemanager.googleapis.com/projects.list

faulttesting.googleapis.com/operations.list

faulttesting.googleapis.com/operations.get

faulttesting.googleapis.com/locations.list

faulttesting.googleapis.com/locations.get

faulttesting.googleapis.com/experiments.list

faulttesting.googleapis.com/experiments.get

faulttesting.googleapis.com/validations.list

faulttesting.googleapis.com/validations.get

faulttesting.googleapis.com/validationResources.list

faulttesting.googleapis.com/validationResources.get

faulttesting.googleapis.com/affectedResources.list

faulttesting.googleapis.com/affectedResources.get

faulttesting.googleapis.com/experimentTemplates.list

faulttesting.googleapis.com/experimentTemplates.get

roles/faulttesting.viewer

Fault Testing 閲覧者

Fault Testing リソースに対する読み取り専用アクセス権。

cloudresourcemanager.googleapis.com/projects.get

cloudresourcemanager.googleapis.com/projects.list

faulttesting.googleapis.com/operations.list

faulttesting.googleapis.com/operations.get

faulttesting.googleapis.com/locations.list

faulttesting.googleapis.com/locations.get

faulttesting.googleapis.com/experiments.list

faulttesting.googleapis.com/experiments.get

faulttesting.googleapis.com/validations.list

faulttesting.googleapis.com/validations.get

faulttesting.googleapis.com/validationResources.list

faulttesting.googleapis.com/validationResources.get

faulttesting.googleapis.com/affectedResources.list

faulttesting.googleapis.com/affectedResources.get

faulttesting.googleapis.com/experimentTemplates.list

faulttesting.googleapis.com/experimentTemplates.get

Google Cloud CLI を使用してロールと権限を付与します。faulttesting.operator role を付与するには、次のコマンドを実行します。

gcloud projects add-iam-policy-binding ${PROJECT_ID} \
  --member {USER|GROUP|SERVICE_ACCOUNT} \
  --role roles/faulttesting.operator

`example-project` のユーザー anon@example.com in projectfaulttesting.operator を追加する構文の例を次に示します。

gcloud projects add-iam-policy-binding example-project --member=user:anon@example.com --role=roles/faulttesting.operator