Chuyển đến nội dung
Skillpedia
Bảo mật22k · #10338

iam-helper-for-policy-management

Skill này làm gì

Skill này quản lý ai được làm gì trên Google Cloud qua chính sách IAM allow và chính sách IAM deny. Skill dành cho quản trị viên cần cấp, thay đổi hoặc gỡ quyền truy cập một cách có kiểm soát.

Khi nào nên dùng

  • ✓Khi bạn cần cấp một vai trò cho người dùng, nhóm hoặc service account trên một tài nguyên Google Cloud.
  • ✓Khi bạn muốn tạo hoặc thay đổi một chính sách IAM deny làm rào chắn.
  • ✓Khi bạn cần liệt kê hoặc gỡ các chính sách IAM allow hoặc deny hiện có.

Liên kết skill

https://github.com/google/skills/blob/main/skills/cloud/iam-helper-for-policy-management/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/google/skills/blob/main/skills/cloud/iam-helper-for-policy-management/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Cấp cho nhóm báo cáo quyền đọc vào dự án Google Cloud của tôi và cho tôi xem thay đổi chính sách trước.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill đọc các chính sách hiện tại, chuẩn bị thay đổi và kiểm tra trước khi áp dụng bất cứ thứ gì. Các hành động chỉ đọc chạy ngay, còn thay đổi chờ bạn xác nhận.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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).

Usage Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.


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 permiss
Câu hỏi thường gặp

Skill có thay đổi chính sách mà không hỏi không?

Không. Hành động chỉ đọc chạy ngay, nhưng mọi thay đổi cần bạn xác nhận.

Skill có bao gồm chính sách deny không?

Có. Skill quản lý cả chính sách IAM allow lẫn chính sách IAM deny.

Skill có xử lý lỗi truy cập không?

Không. Việc xử lý lỗi từ chối truy cập do skill khắc phục sự cố IAM đảm nhiệm.

Chi tiết

Mô tả gốc của tác giả

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.

repo: google/skills

Độ phổ biến

Sao GitHub
22k
Vị trí xếp hạng
#10338
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự