iam-helper-for-policy-management

Manage IAM allow and deny policies across Google Cloud Resource Manager and service resources.

23.7k|2.0k|Updated Mar 31, 2026
Ready to run
npx skills add https://github.com/google/skills --skill iam-helper-for-policy-management-google
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: iam-helper-for-policy-management
Source: https://github.com/google/skills/tree/main/skills/cloud/iam-helper-for-policy-management
Command: npx skills add https://github.com/google/skills --skill iam-helper-for-policy-management-google

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? This Skill eliminates the complexity of managing IAM policies across Google Cloud organizations, folders, and projects by automating policy creation, modification, and verification while enforcing security guardrails against public access. ## Core Features & Use Cases - IAM v1 Allow Policies: Add, remove, or set role bindings for users, service accounts, groups, and domains across Resource Manager hierarchy levels and individual resources. - IAM v2 Deny Policies: Create organization-, folder-, or project-level deny policies that prevent specified principals from using designated permissions, regardless of allow policies. - Verification & Attribution: Automatically verify policy changes against live state and track usage with skill-specific metrics attribution. - Use Case: Your organization needs to grant a data analyst read-only access to a BigQuery dataset and simultaneously enforce a deny policy preventing any principal from deleting the dataset, even if accidentally granted broad permissions. ## Quick Start Provide the target resource (project, folder, or organization ID), the principal (user email, service account, or group), the role or permissions to modify, and whether you are managing allow or deny policies, and this Skill will construct the appropriate gcloud command, explain the impact, and await your confirmation before applying changes.

Frequently Asked Questions about iam-helper-for-policy-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I grant a service account read-only access to a Google Cloud project?▼

Use the add-iam-policy-binding command on the project with the service account principal and the roles/viewer role. This Skill constructs the exact gcloud command, explains the impact, requests confirmation, executes the binding, and verifies the principal appears in the project's IAM policy.

What is the difference between IAM v1 allow policies and IAM v2 deny policies?▼

IAM v1 allow policies grant permissions to principals via roles at any resource level. IAM v2 deny policies prevent specific permissions for specific principals at organization, folder, or project levels regardless of allow policies. Deny rules are evaluated first and block access if matched.

Can I prevent all users from deleting a Cloud Storage bucket using deny policies?▼

Yes. Create an IAM v2 deny policy at the project level with denied principals (e.g., principalSet://goog/public:all) and denied permissions (storage.googleapis.com/buckets.delete). Exception principals can be added to allow specific administrators to delete if needed.

Why does the Skill refuse to grant roles/owner to allUsers?▼

Granting basic roles like owner, editor, or viewer to allUsers or allAuthenticatedUsers creates severe security risks by exposing your entire Google Cloud environment publicly. This Skill enforces this as a mandatory security guardrail and proposes scoped, least-privileged alternatives instead.

How long does it take for IAM policy changes to take effect?▼

Allow and deny policy changes propagate across Google Cloud global infrastructure within minutes but can take up to 7 minutes or longer in some cases. This Skill reminds you of this propagation delay after verifying each mutating change.

What permissions do I need to create or update deny policies?▼

You need the roles/iam.denyAdmin (Deny Admin) role on the target attachment point (organization, folder, or project). This Skill references the required role in deny policy operations and validates command structure before execution.