Streamlines the creation, modification, and management of IAM allow policies (v1) and deny policies (v2). Manages access control across Resource Manager resourc
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-iam-helper-for-policy-management-7952b4b6422b ,按照其中的说明把「iam-helper-for-policy-management」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Orchestrates the lifecycle and management of IAM allow and deny policies across IAM v1 (allow policies) and IAM v2 (deny policies).
IAM operates across two policy paradigms:
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):
Read-only actions include the following:
get-iam-policy on project/folder/organization,
or gcloud iam list-testable-permissions //cloudresourcemanager.googleapis.com/projects/PROJECT_ID.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.
Mutating operations include the following:
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).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.
gcloud commands directly via tool calls without
explicit prior confirmation from the user. When asked to apply a mutating
change, do the following:
gcloud command (including all parameters such as --member, --role,
--attachment-point, --kind=denypolicies, and --policy-file).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.