Iam Helper For Privileged Access Management
GoogleOfficialPublished by Google
- Skill
- Tool integration
- Security
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured interface for managing the lifecycle of on-demand, time-bound access in Google Cloud using Privileged Access Manager (PAM). It supports the creation, inspection, and modification of PAM entitlements, as well as the approval or denial of access grants. By replacing permanent IAM bindings with temporary, audited elevations, this skill helps enforce the principle of least privilege.
What it does
- Create, read, update, and delete PAM entitlement configurations.
- Configure approval workflows and maximum request durations for entitlements.
- Search for and list pending access grants across resource hierarchies.
- Approve or deny pending PAM grant requests with required justifications.
- Revoke active or scheduled grants prior to entitlement deletion.
- Enforce safety checks and user confirmation for all destructive operations.
When to use it
- When you need to set up temporary access policies for sensitive Google Cloud resources.
- When you are an authorized approver needing to process pending access requests.
- When you need to audit existing PAM entitlements or active grants.
- When you need to modify entitlement settings like duration limits or approval requirements.
Advantages
- Reduces security risks by replacing permanent IAM roles with time-bound access.
- Provides a clear, step-by-step workflow for managing complex PAM configurations.
- Ensures auditability by requiring justifications for approvals and denials.
- Includes built-in safety checks to prevent accidental deletion of entitlements with active grants.
Usage examples
- “Create a new PAM entitlement for compute-admin access in project my-project.”
- The agent will load the entitlement template, prompt for necessary details like duration and approvers, and execute the creation command after user confirmation.
- “List all pending PAM grants that I am authorized to approve.”
- The agent will search for grants where the caller has approval authority and present a list of pending requests for review.
- “Approve the pending PAM grant with ID 12345.”
- The agent will verify the grant, request a justification from the user, and execute the approval command upon confirmation.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/google/iam-helper-for-privileged-access-management/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip iam-helper-for-privileged-access-management.zip -d .agents/skills
Documentation by Google
Privileged Access Manager (PAM)
This skill provides step-by-step guidance for planning, validating, and executing Privileged Access Manager (PAM) entitlement CRUD operations, approval workflow configurations, access elevations, and grant approval/denial workflows.
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Table of Contents
Core Concepts
Approval Workflows & Max Request Duration
Safety & Confirmation Strategy
Plan-Validate-Execute Pattern
Mode 1: Interactive Access Elevation
Mode 2: Standalone Entitlement CRUD
Mode 3: Approver Workflow
Supporting Links & Resources
Core Concepts {#core-concepts}
Privileged Access Manager (PAM) replaces permanent or ambient IAM role assignments with on-demand, time-bound, and audited access elevations. Rather than appending permanent IAM policy bindings, PAM uses:
Entitlements: Configurations defining access scopes, eligible requesters, and approvers.
Grants: Short-lived requests created against entitlements to activate the entitlement's IAM roles.
Privileged Access (privilegedAccess)
The privilegedAccess block in an entitlement defines the precise access scope that will be granted. An access scope comprises three essential components:
Resource: The target Google Cloud resource (Project, Folder, or Organization) where access is granted.
Role Setup: The IAM role (
roleBindings.role) to be assigned.Condition: (Optional) An IAM condition expression (
roleBindings.conditionExpression) restricting when or where the role applies.
Core Workflow
Administrators create Entitlements.
Requesters can then request Grants against these entitlements.
If the entitlement is configured with approvals, then an approver must approve the requested grant.
Once all necessary approval steps are completed, the grant is activated for the requested time.
The grant automatically ends after the requested duration has elapsed, and the elevated access is removed.
Approval Workflows & Max Request Duration {#approval-workflows}
Approval Workflows (approvalWorkflow)
When sensitive environments require human approval before temporary access is
activated, configure the approvalWorkflow block in the entitlement YAML
manifest (entitlement.yaml).
approvalWorkflow:
manualApprovals:
# Optional: requires approver to supply a justification string
requireApproverJustification: true
steps:
- approvalsNeeded: 1
approverEmailRecipients:
- [email protected]
approvers:
- principals:
- user:[email protected] # or group:[email protected]When to include: Include
approvalWorkflowwhenever the user prompt specifies that manual approval or an approver (user or group) is required.Outcome: When a user requests a grant against an entitlement with
approvalWorkflow, the grant transitions toAPPROVAL_AWAITED. Requesters must await an Approver's decision (Mode 3).
Max Request Duration (maxRequestDuration)
maxRequestDuration defines the maximum single access elevation timeframe a requester
may ask for when placing a grant request.
Flexible Configuration: Configure
maxRequestDurationaccording to the user's specific request (e.g.8 hours/28800s,1 hour/3600s,24 hours/86400s).Default Value: If the user does NOT specify a maximum request duration, default to
4 hours(14400s).YAML Syntax: Always format
maxRequestDurationas a string in seconds in the entitlement YAML (e.g.,"14400s","28800s").
Safety & Confirmation Strategy {#safety-confirmation}
Adhere strictly to these workflow guards:
Modifying / Destructive Executions (Create, Update, Delete, Approve, Deny, Revoke): Always present a plain-text summary of the planned adjustments and prompt the user for explicit confirmation (Yes/No).
Read-Only Inspections (List, Describe, Search): Run autonomously without requesting confirmation.
Batching Bash Commands (Reduce User Confirmations): The host environment requires user approval for every individual shell tool call. To minimize confirmation popups, combine sequential read-only and lookup commands into a single compound bash script within one tool call (e.g., combining project, folder, and organization hierarchy audits into a single multiline execution).
Anti-Loop Strategy: If a command fails with a clear, actionable error, you may attempt to self-debug and retry. If the error is ambiguous, halt immediately, present the stderr output, and await user direction.
Plan-Validate-Execute Pattern {#plan-validate-execute}
For all modifying actions (Mode 1 Step 3, Mode 2 Create, Update, Delete, Mode 3 Approve, Deny):
Plan: Construct the proposed parameters or read the sample entitlement structure. (For entitlement creation, load and use the template: assets/entitlement_template.yaml).
Validate: Inspect the target configuration parameters (resource names, role bindings, duration limits) for compliance with corporate rules.
Execute: Present the validated plan, obtain explicit user confirmation, and run the
gcloudcommand.
Mode 1: Interactive Access Elevation {#mode-1}
When the user requests temporary access elevation as a Requester, load and
follow the detailed instructions in
references/requester.md.
Mode 2: Standalone Entitlement CRUD {#mode-2}
Follow these steps for entitlement configurations.
Required Permissions for Entitlement Admins
roles/privilegedaccessmanager.admin: Required to create, update, and delete entitlement configurations (Mode 1 Step 3andMode 2 CRUD).Scope IAM Admin Rights: Required on the target hierarchy scope because creating an entitlement authorizes future role evaluations and bindings on that scope:
Organizations:
roles/iam.securityAdminFolders:
roles/resourcemanager.folderAdminProjects:
roles/resourcemanager.projectIamAdmin
roles/privilegedaccessmanager.viewer: Required to list and describe entitlements across scopes.
(Rule: For all Standalone Entitlement CRUD commands below, use the flag
matching where the entitlement is defined: pass --project=PROJECT_ID,
--folder=FOLDER_ID, or --organization=ORGANIZATION_ID).
1. Create Entitlement
Check if
ENTITLEMENT_IDexists:
gcloud pam entitlements describe ENTITLEMENT_ID \
--location=global \
--project=PROJECT_IDIf Exists: Halt. Ask: "The requested PAM Entitlement
ENTITLEMENT_IDalready exists. Would you like to view its details or update it instead? (View / Update / Exit)"If NOT_FOUND: Load the template assets/entitlement_template.yaml. Generate IDs in lowercase using hyphen separators derived from the role name (e.g.,
compute-adminforroles/compute.admin). Note:You may specify multiple IAM roles under
roleBindings.You may also include an optional IAM
conditionExpressionfor each role binding.Legacy basic roles (e.g.,
roles/viewer,roles/editor,roles/owner) are NOT supported. Instead, use their v2 basic role equivalents (e.g.,roles/basic.viewer,roles/basic.editor,roles/basic.owner). Ensure you select a valid predefined, custom, or v2 basic role.
Set
maxRequestDurationbased on user specification (e.g."28800s"for 8 hours,"3600s"for 1 hour). If unspecified by the user, default to"14400s"(4 hours). If manual approval is specified by policy or requested by the user, configure theapprovalWorkflowblock inentitlement.yaml. PreserverequesterJustificationConfig: {unstructured: {}}.Prompt: "You are about to create the PAM Entitlement
ENTITLEMENT_ID. Do you approve this creation? (Yes/No)"Deploy:
gcloud pam entitlements create ENTITLEMENT_ID \
--location=global \
--entitlement-file=entitlement.yaml \
--project=PROJECT_ID2. Read Entitlements
Run these read operations autonomously:
List all entitlements at a single scope:
gcloud pam entitlements list \
--location=global \
--project=PROJECT_IDTo list all entitlements defined across the entire resource hierarchy (project, ancestor folders, and organization), use the hierarchy listing script:
bash scripts/list_entitlements_hierarchy.sh --project=PROJECT_ID(Or pass --folder=FOLDER_ID or --organization=ORGANIZATION_ID).
Describe target entitlement:
gcloud pam entitlements describe ENTITLEMENT_ID \
--location=global \
--project=PROJECT_ID3. Update Entitlement
Run the
exportcommand to generate the current config (which includes theetag):gcloud pam entitlements export ENTITLEMENT_ID \ --location=global \ --project=PROJECT_ID > {scratch}/updated_entitlement.yamlIf missing, offer to run
listor exit.Edit the exported
{scratch}/updated_entitlement.yamlfile to apply the requested changes (e.g., updatingmaxRequestDuration,approvalWorkflow, oreligibleUsers). Do not alter theetag.Prompt: "You are about to update the PAM Entitlement
ENTITLEMENT_ID. Do you approve this update? (Yes/No)"Execute:
gcloud pam entitlements update ENTITLEMENT_ID \
--location=global \
--entitlement-file={scratch}/updated_entitlement.yaml \
--project=PROJECT_ID4. Delete Entitlement
Verify existence using
describe. If missing, offer list/exit.Safety Check: An entitlement cannot be deleted if there are open grants. Before deleting, search for any
ACTIVEorSCHEDULEDgrants:gcloud pam grants list \ --entitlement=ENTITLEMENT_ID \ --location=global \ --project=PROJECT_ID \ --filter="state:(ACTIVE, SCHEDULED)"If any open grants are found, prompt the user for permission to revoke them: "There are active or scheduled grants on this entitlement. Do you authorize me to revoke them so the entitlement can be deleted? (Yes/No)"
If Yes, revoke them:
gcloud pam grants revoke GRANT_ID \ --entitlement=ENTITLEMENT_ID \ --location=global \ --project=PROJECT_ID \ --reason="Revoking to delete entitlement"Prompt: "You are about to permanently delete the PAM Entitlement
ENTITLEMENT_ID. Do you approve this deletion? (Yes/No)"Execute:
gcloud pam entitlements delete ENTITLEMENT_ID \
--location=global \
--project=PROJECT_IDMode 3: Approver Workflow {#mode-3}
When an Approver needs to review, approve, or reject pending grant requests,
load and follow the detailed instructions in
references/approver.md.
Supporting Links & Resources {#supporting-links}
For further information on working with Privileged Access Manager, refer to:
Files
- ATTRIBUTION.mdAdded by AutoGineer904 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md12.6 KiB
- assets/entitlement_template.yaml1.2 KiB
- references/approver.md3.1 KiB
- references/attribution.md1.9 KiB
- references/requester.md5.9 KiB
- scripts/list_entitlements_hierarchy.shScript2.9 KiB
- scripts/search_eligible_entitlements.shScript3.0 KiB
LICENSE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs a command-line tool
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/iam-helper-for-privileged-access-management · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google or Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download iam-helper-for-privileged-access-management.zip