Identity and Access Management(IAM)ポリシー。Google Cloud リソースのアクセス制御を指定します。
Policy
は bindings
をまとめたものです。binding
は、1 つ以上の members
(プリンシパル)を 1 つの role
にバインドします。プリンシパルは、ユーザー アカウント、サービス アカウント、Google グループ、ドメイン(G Suite など)です。role
は権限のリストに名前を付けたものです。role
はそれぞれ、IAM 事前定義ロールまたはユーザー作成のカスタムロールにできます。
Google Cloud リソースの種類によっては、binding
は condition
を指定できます。これは、式が true
と評価された場合にのみリソースへのアクセスを許可する論理式です。条件は、リクエスト、リソース、またはその両方の属性に基づいて制約を追加できます。IAM ポリシーで条件をサポートするリソースについては、IAM のドキュメントをご覧ください。
JSON の例:
{
"bindings": [
{
"role": "roles/resourcemanager.organizationAdmin",
"members": [
"user:mike@example.com",
"group:admins@example.com",
"domain:google.com",
"serviceAccount:my-project-id@appspot.gserviceaccount.com"
]
},
{
"role": "roles/resourcemanager.organizationViewer",
"members": [
"user:eve@example.com"
],
"condition": {
"title": "expirable access",
"description": "Does not grant access after Sep 2020",
"expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')",
}
}
],
"etag": "BwWWja0YfJA=",
"version": 3
}
YAML の例:
bindings:
- members:
- user:mike@example.com
- group:admins@example.com
- domain:google.com
- serviceAccount:my-project-id@appspot.gserviceaccount.com
role: roles/resourcemanager.organizationAdmin
- members:
- user:eve@example.com
role: roles/resourcemanager.organizationViewer
condition:
title: expirable access
description: Does not grant access after Sep 2020
expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
etag: BwWWja0YfJA=
version: 3
IAM とその機能についての説明は、IAM のドキュメントをご覧ください。
JSON 表現 |
---|
{ "version": integer, "bindings": [ { object ( |
フィールド | |
---|---|
version |
ポリシーの形式を指定します。 有効な値は 条件付きロール バインディングに影響するオペレーションでは、バージョン
重要: IAM Conditions を使用する場合、 ポリシーに条件が指定されていない場合、ポリシーに対する操作で有効なバージョンの指定、またはフィールド設定の解除ができます。 IAM ポリシーで条件をサポートするリソースについては、IAM のドキュメントをご覧ください。 |
bindings[] |
1 つの |
auditConfigs[] |
このポリシーに対する Cloud Audit Logging の監査ログを指定します。 |
etag |
重要: IAM Conditions を使用する場合、 base64 でエンコードされた文字列。 |