Google Cloud IAM (Identity and Access Management) は GCP の権限制御基盤。 本記事では Role 体系、リソース階層、Service Account、Workload Identity Federation、IAM Conditions、Organization Policy まで体系的に解説します。
| 階層 | 説明 |
|---|---|
| Organization | 会社全体のルート (Cloud Identity / Workspace と紐づき) |
| Folder | 事業部 / 環境別 (Prod / Dev)、最大 10 階層 |
| Project | リソースの基本単位、課金単位 |
| Resource | 個別リソース (Bucket、VM、Dataset 等) |
上位のポリシーは下位に継承されます (Union 結合)。
| 種別 | 例 | 用途 |
|---|---|---|
| Basic (旧 Primitive) | roles/owner / editor / viewer | 本番非推奨、開発用 |
| Predefined | roles/storage.objectViewer 等 | 本番標準、サービス別細分化 |
| Custom | 組織独自定義 | Predefined では足りない場合 |
外部 IdP (AWS / Azure / Okta / GitHub Actions / Kubernetes) を Google Cloud が信頼する仕組み。SA キーなしで GCP API を呼び出せるため、CI/CD のセキュリティを大幅向上できます。
属性ベースの権限付与 (Attribute-Based Access Control)。例:
{
"role": "roles/storage.objectAdmin",
"members": ["user:[email protected]"],
"condition": {
"title": "Only specific bucket and during business hours",
"expression": "resource.name.startsWith('projects/_/buckets/prod-data') && request.time.getHours('Asia/Tokyo') >= 9 && request.time.getHours('Asia/Tokyo') < 18"
}
}Primitive / Predefined / Custom Role の違いは?
Primitive (Owner / Editor / Viewer) は粗い権限、本番では非推奨。Predefined はサービス別に細分化されたロール (例: roles/storage.objectViewer)。Custom は組織独自定義。本番は Predefined または Custom が定石。
IAM ポリシー階層は?
組織 (Organization) → フォルダ (Folder) → プロジェクト (Project) → リソース。下位は上位のポリシーを継承します。組織レベルのポリシーは全プロジェクトに波及。
Service Account のベストプラクティスは?
1. デフォルト SA を使わない、2. キーをダウンロードしない (Workload Identity 利用)、3. 必要最小権限、4. 監査ログでアクティビティ追跡、5. SA Impersonation で一時的に権限借用。
Workload Identity Federation とは?
外部 IdP (AWS / Azure / Okta / GitHub Actions 等) を信頼して、SA キーなしで GCP API 呼び出し可能にする仕組み。CI/CD パイプラインで標準化されつつあります。
IAM Conditions で何ができる?
属性ベースの権限制御。例: 「平日 9-17 時のみ許可」「特定リソース名のみアクセス可」「特定の IP からのみ」。Access Level (Context-Aware Access) と組み合わせて強力に。
Organization Policy と IAM Policy の違いは?
IAM は「誰が何をできるか」、Organization Policy は「組織として何を禁止/許可するか」(例: VM の外部 IP 禁止、許可リージョン制限)。両方を組み合わせて統制。
Privileged Access Manager (PAM) とは?
2024 リリースの新機能。特権ロールへの時間限定アクセス申請・承認ワークフロー。緊急時の Just-in-time アクセスを実現します。
Cloud Identity と Google Workspace の違いは?
Cloud Identity = ID 基盤のみ (Free / Premium)、Workspace = ID + Gmail / Drive / Meet 等の SaaS スイート。GCP 単体利用なら Cloud Identity Free で十分。
関連記事・IAM / セキュリティ
Terraform on GCP 完全ガイド|IaC・Provider・Workload Identity・GitHub Actions (2026)
Google Cloud で Terraform を使う IaC 完全ガイド。Google Cloud Provider / Beta、State 管理 (gcs バックエンド)、Workload Identity Federation、Module 設計、GitHub Actions CI、Infracost、Config Connector を 2026 年最新版で網羅。
GitHub Actions + GCP CI/CD 完全ガイド|Workload Identity・Cloud Run/GKE デプロイ (2026)
GitHub Actions で GCP CI/CD を構築する完全ガイド。Workload Identity Federation、setup-gcloud、Cloud Run / GKE デプロイ、Cloud Build 連携、Reusable Workflow、Self-hosted Runner、Secrets 管理を 2026 年最新版で網羅。
GCP Professional Cloud Developer (PCD) 完全ガイド|Cloud Run・GKE・CI/CD・APM
Google Cloud Professional Cloud Developer の試験範囲、Cloud Run / GKE / Cloud Build / Cloud Trace、AWS DVA / Azure AZ-204 比較、学習ロードマップを徹底解説。
GCP Professional Cloud Security Engineer (PCSE) 完全ガイド|IAM・KMS・BeyondCorp・SCC
Google Cloud Professional Cloud Security Engineer の試験範囲、IAM / Cloud KMS / VPC Service Controls / BeyondCorp / Security Command Center、AWS SCS・Azure SC-100 比較を詳解。
※ Google Cloud は Google LLC の商標です。最新情報は IAM 公式 をご確認ください。
NicheeLab編集部
データエンジニアリング・クラウド資格の専門家。Databricks・Snowflake等の認定資格を保有し、実務経験に基づいた問題作成・解説を行っています。NicheeLab運営。
Google Cloud (GCP) 認定資格ロードマップ 2026 完全版|全 15 試験を体系化
Google Cloud 認定資格 全 15 試験 (Foundational 2 + Associate 3 + Pr...
Cloud Digital Leader (CDL) 完全ガイド|出題範囲・学習リソース・合格戦略
Google Cloud Cloud Digital Leader (CDL) の完全ガイド。6 ドメイン 92 bul...
Generative AI Leader (GAIL) 完全ガイド|Google Cloud 生成 AI 認定
Google Cloud Generative AI Leader (GAIL、2025-05-14 リリース) の完全...
Vertex AI 入門|Google Cloud 統合 ML プラットフォームの全機能
Google Cloud Vertex AI の入門解説。Vertex AI Studio / Agent Builde...
GCP Associate Cloud Engineer (ACE) 完全ガイド|試験範囲・受験料・学習ロードマップ
Google Cloud Associate Cloud Engineer (ACE) の試験範囲・受験料 125 US...