Agent Skillsgoogle/skills › iam-helper-for-policy-management

iam-helper-for-policy-management

GitHub

用于管理 Google Cloud IAM v1 允许策略和 v2 拒绝策略的创建、修改、查询及删除,涵盖组织、文件夹和项目级别的安全访问控制配置。

skills/cloud/iam-helper-for-policy-management/SKILL.md google/skills

触发场景

创建或更新 IAM 允许/拒绝策略 查询当前 IAM 策略状态 移除 IAM 角色绑定 管理资源级访问权限

安装

npx skills add google/skills --skill iam-helper-for-policy-management -g -y
更多选项

非标准路径

npx skills add https://github.com/google/skills/tree/main/skills/cloud/iam-helper-for-policy-management -g -y

不安装直接使用

npx skills use google/skills@iam-helper-for-policy-management

指定 Agent (Claude Code)

npx skills add google/skills --skill iam-helper-for-policy-management -a claude-code -g -y

安装 repo 全部 skill

npx skills add google/skills --all -g -y

预览 repo 内 skill

npx skills add google/skills --list

SKILL.md

Frontmatter
{
    "name": "iam-helper-for-policy-management",
    "metadata": {
        "version": "1.0.0",
        "category": "Security"
    },
    "description": "Streamlines the creation, modification, and management of IAM allow policies (v1) and deny policies (v2). Manages access control across Resource Manager resources (Organization, Folder, Project) and individual resources. Use when creating, updating, listing, or deleting IAM allow policies or deny policies. Don't use for access denial troubleshooting (use iam-helper-for-troubleshooting), temporary privileged access (use iam-helper-for-privileged-access-management), configuring VPC Service Controls, or managing network firewall rules."
}

IAM Helper for Policy Management

Orchestrates the lifecycle and management of IAM allow and deny policies across IAM v1 (allow policies) and IAM v2 (deny policies).


Core Concepts & Paradigms

IAM operates across two policy paradigms:

  1. IAM v1 (Allow Policies): Grants roles to principals (users, service accounts, groups, domains) on specific resources. Supports Resource Manager resources (organizations, folders, projects) as well as individual resources across supported Google Cloud services.
  2. IAM v2 (Deny Policies): Sets explicit organization-, folder-, or project-level guardrails that prevent specified principals from using designated permissions, regardless of any allow policies granted. Evaluated before allow policies.

Workflow & Decision Tree

When receiving a policy management request, determine whether the operation is Read-Only or Mutating, and whether it targets IAM v1 (Allow Policies) or IAM v2 (Deny Policies):

1. Read-Only Operations (Autonomous Execution)

Read-only actions include the following:

  • IAM v1 Allow Policies: get-iam-policy on project/folder/organization, or gcloud iam list-testable-permissions //cloudresourcemanager.googleapis.com/projects/PROJECT_ID.
  • IAM v2 Deny Policies: gcloud iam policies list or gcloud iam policies get with --attachment-point and --kind=denypolicies.

For read-only actions, execute the command autonomously to inspect state, and present the query results clearly to the user.

2. Mutating Operations (Plan & Confirm Protocol)

Mutating operations include the following:

  • IAM v1 Allow Policies: add-iam-policy-binding, remove-iam-policy-binding, or set-iam-policy across project, folder, organization, or resource levels (see references/v1-allow-policies.md).
  • IAM v2 Deny Policies: create, update, or delete deny policies on attachment points (cloudresourcemanager.googleapis.com/projects/PROJECT_ID, cloudresourcemanager.googleapis.com/folders/FOLDER_ID, or cloudresourcemanager.googleapis.com/organizations/ORG_ID) using YAML/JSON policy files (see references/v2-deny-policies.md).

For mutating operations, follow the Plan & Confirm Protocol below. DO NOT execute mutating commands autonomously without prior user approval.


Execution & Safety Protocol

  • Plan and Confirm (No Autonomous Mutation): Mutating allow and deny policy changes modify live security perimeters and access controls. You MUST NOT execute mutating gcloud commands directly via tool calls without explicit prior confirmation from the user. When asked to apply a mutating change, do the following:
    1. Formulate the Command: Generate the exact, fully constructed gcloud command (including all parameters such as --member, --role, --attachment-point, --kind=denypolicies, and --policy-file).
    2. Warn of Impact & Propagation: Issue a general warning that the change could impact access in a live environment and takes time to propagate across Google Cloud global infrastructure.
    3. Request User Confirmation: Prompt the user for approval before applying the changes to the live environment.
  • Post-Execution Verification: After the user approves and the mutating policy change is executed, run the corresponding verification command (see references/v1-allow-policies.md and references/v2-deny-policies.md for exact verification steps) to verify that the active state matches expectations before reporting completion.
  • Security Guardrail (Public & Blanket Access Refusal): Never grant allUsers or allAuthenticatedUsers basic roles (roles/owner, roles/editor, roles/viewer, roles/admin, roles/writer, and roles/reader) or broad permissions. Explicitly refuse blanket public access requests, explain the severe security risks of public project ownership/access, and propose scoped, least-privileged role bindings for specific authenticated identities instead.

Supporting Links

版本历史

  • d91e77b 当前 2026-09-22 05:26

同 Skill 集合

plugins/cloud/gemini-api/skills/gemini-api/SKILL.md
plugins/cloud/gemini-api/skills/gemini-interactions-api/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-endpoint-management/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-migrate-from-ai-studio/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-model-registry/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-prompt-management/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-rag-engine-management/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-skill-registry/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-troubleshooting/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-tuning-management/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-tuning/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/gemini-agents-api/SKILL.md
plugins/cloud/google-cloud-core/skills/gcloud/SKILL.md
plugins/cloud/google-cloud-core/skills/google-cloud-recipe-auth/SKILL.md
plugins/cloud/google-cloud-core/skills/google-cloud-recipe-onboarding/SKILL.md
plugins/cloud/google-cloud-developer/skills/gcloud/SKILL.md
plugins/cloud/google-cloud-developer/skills/google-cloud-recipe-auth/SKILL.md
plugins/cloud/google-cloud-developer/skills/google-cloud-recipe-onboarding/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-ai-troubleshooting-jobset-interruption/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-ai-troubleshooting-tpu-dynamic-slices-monitoring/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-ai-troubleshooting-tpu-metrics-monitoring/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-batch-hpc/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-cluster-autoscaler/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-compute-classes/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-cost-optimization/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-inference/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-multitenancy/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-workload-scaling/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-workload-troubleshooting/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-app-onboarding/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-backup-dr/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-basics/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-cluster-creation/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-golden-path/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-networking/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-observability/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-reliability/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-service-networking/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-storage/SKILL.md
plugins/cloud/google-cloud-run/skills/cloud-run-basics/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-cost-optimization/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-operational-excellence/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-performance-optimization/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-reliability/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-security/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-sustainability/SKILL.md
skills/ads/data-manager-api-audience-ingestion/SKILL.md
skills/ads/data-manager-api-event-ingestion/SKILL.md
skills/ads/data-manager-api-setup/SKILL.md
skills/ads/data-manager-api/data-manager-api-audience-ingestion/SKILL.md

元信息

文件数
0
版本
d91e77b
Hash
e430fec7
收录时间
2026-09-22 05:26

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-23 07:32
浙ICP备14020137号-1