/cloud-skills:cloud-iam-hardeningfrom cloud-skills
Guides hardening IAM across AWS, Azure, and GCP: least-privilege policies, federation (OIDC/Workload Identity), break-glass access, and periodic access review.
Ships in cloud-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Identity is the perimeter in cloud environments — network controls help, but the vast majority of real-world cloud breaches trace back to over-permissioned roles, leaked long-lived credentials, or a human/service account with far more access than its job requires. IAM hardening is not a one-time setup step; it is a continuous discipline of shrinking permissions to what's actually used, replacing static credentials with short-lived federated tokens, and reviewing access on a cadence. This skill applies across AWS IAM, Azure RBAC/Entra ID, and GCP IAM, since the underlying failure modes (privilege creep, standing admin access, long-lived keys) are identical even though the primitives differ.
AdministratorAccess, Owner,
roles/editor) down to least privilege for a specific workload or team.Inventory current access before changing anything. Pull a permissions-usage report:
aws iam generate-service-last-accessed-details.az role assignment list --all cross-referenced with Azure AD
sign-in logs.gcloud recommender recommendations list --recommender=google.iam.policy.Recommender --project=<PROJECT_ID>
or the IAM Policy Analyzer in the console.Replace long-lived credentials with federation. For CI/CD:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::<AWS_ACCOUNT_ID>:oidc-provider/token.actions.githubusercontent.com"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
},
"StringLike": {
"token.actions.githubusercontent.com:sub": "repo:example-org/checkout-service:ref:refs/heads/main"
}
}
}]
}
az ad app federated-credential create) scoped to the specific
repo and environment, eliminating the client-secret entirely.
Delete the static access key / service account key / client secret
only after confirming the federated path works end-to-end in a
non-production pipeline run.Shrink standing permissions to least privilege, iteratively:
AmazonS3FullAccess) with
resource-scoped custom policies naming specific buckets/prefixes.roles/editor, roles/owner) with
predefined or custom roles scoped to the specific service and
project.Owner/Contributor at the subscription level
with built-in roles scoped to a resource group, or custom RBAC
roles listing only the needed actions.Convert standing admin access to just-in-time (JIT) elevation where the platform supports it: AWS IAM Identity Center permission sets combined with a JIT approval workflow, Azure PIM (Privileged Identity Management) for time-bound role activation, or GCP's temporary elevated access via IAM Conditions with an expiry timestamp:
{
"role": "roles/owner",
"members": ["user:[email protected]"],
"condition": {
"title": "temporary-incident-access",
"expression": "request.time < timestamp('2026-08-01T00:00:00Z')"
}
}
Design break-glass access deliberately, not implicitly. Create a small number of emergency-access identities (e.g. an AWS IAM user held in a sealed/rotated-after-use credential vault, or an Azure emergency access account excluded from Conditional Access) with wide permissions but wired to trigger a high-priority alert on every use, and require a post-use incident review.
Set up continuous drift detection: run the IAM Access Analyzer / IAM Recommender / Azure Permissions Management scan on a schedule (weekly, in CI) and fail a pipeline or open a ticket when a new unused-permission finding appears, rather than relying on an annual manual audit.
Review and prune on a cadence. Quarterly at minimum: revoke access for anyone who changed teams/left, delete unused roles/service accounts flagged by the recommender tools, and rotate any credential that IAM hardening hasn't yet fully replaced with federation.
repo:example-org/*) — a wildcard OIDC
trust policy is only marginally better than a static key.sts:AssumeRole sessions instead of standing admin grants.* in an Action or Resource field is a future audit finding.Symptom: A least-privilege policy rollout breaks a production
workload at 2am because a rarely-used code path (e.g. a monthly batch
job) needed a permission the usage report didn't capture.
Fix: Access-usage reports only reflect the lookback window queried
(often 90 days). Before tightening a policy used by infrequent
workloads, either extend the lookback, deploy the tightened policy in
monitor/audit mode first (AWS IAM Access Analyzer policy generation,
GCP dry-run mode is not natively available so stage in a non-prod
project), or keep the change behind a feature flag with a fast
rollback path.
Symptom: OIDC federation trust policy works from the main branch
but any other branch or a fork's PR fails to assume the role — good —
but then someone widens the sub condition to repo:org/*:* to "fix"
a legitimate need, quietly re-opening the exposure.
Fix: Add environment- or branch-specific conditions instead of
wildcarding the whole repo (e.g.
repo:example-org/checkout-service:environment:production), and gate
production environments in the CI platform (GitHub Environments,
GitLab protected environments) so only protected branches can even
request that OIDC token.
Symptom: A quarterly access review finds several service
accounts/roles with no owner, last used over a year ago, holding
broad permissions.
Fix: No lifecycle policy existed for service identities created
during a migration or POC. Add a tagging requirement (owner,
created-for-ticket) enforced at creation (see the landing-zone
skills' tag-policy guardrails), and schedule automatic flagging (not
automatic deletion without human sign-off) of identities unused for
90+ days.
Symptom: Break-glass credentials are used routinely for normal operations because the "proper" federated path is slower or less convenient. Fix: This defeats the purpose of break-glass and erodes its audit-trail value. Treat repeated break-glass use as a signal that the standard access path is missing a legitimate permission — fix the standard path (add a scoped permission or a JIT elevation option) rather than normalizing the emergency path.
Scenario: A security review finds that the checkout-service
deployment pipeline authenticates to AWS using a long-lived IAM user
access key stored as a GitHub Actions secret, with AdministratorAccess
attached "to avoid permission errors."
generate-service-last-accessed-details report —
it shows the pipeline only ever calls s3:PutObject on one bucket
prefix, ecs:UpdateService, and ecr:PutImage/ecr:GetAuthorizationToken.token.actions.githubusercontent.com
and an IAM role checkout-service-ci-deploy with a trust policy scoped
to repo:example-org/checkout-service:environment:production.aws-actions/configure-aws-credentials with role-to-assume instead
of static AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY secrets, and
configure the workflow's production environment as a GitHub
protected environment requiring a reviewer.What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/aws-landing-zone-setupGuides designing and implementing a multi-account AWS landing zone using AWS Organizations, Control Tower, and Account Factory — including the account/OU hierarchy, Service Control Policies, centralized logging, and baseline guardrails. Use when a user asks to "set up a new AWS account structure", "design an AWS landing zone", "implement AWS Control Tower", "create OUs and SCPs", "bootstrap a multi-account AWS environment", or "onboard a new AWS account into our organization".
/azure-landing-zone-setupGuides designing and implementing an Azure landing zone using Management Groups, subscription democratization, Azure Policy, and the Cloud Adoption Framework (CAF) Landing Zone Accelerator pattern. Use when a user asks to "design an Azure landing zone", "set up Management Groups and subscriptions", "implement Azure Policy guardrails", "onboard a new Azure subscription", "structure our Azure tenant", or "migrate to the CAF enterprise-scale landing zone".
/cloud-access-request-and-iam-lifecycle-managementHandles the everyday operational request to grant, time-box, and later revoke a scoped IAM permission for a contractor, new hire, or a temporary need (e.g. "give the new contractor read-only S3 access for 30 days," "grant break-fix access to prod for this incident," "revoke Priya's access, she left the team," "why does this access request keep getting rejected") — including expiry enforcement and the audit trail a security review will ask for. Use for a single access grant/revoke transaction, not for designing the underlying IAM policy/role structure (see cloud-iam-hardening for that).
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin cloud-skillsOther plugins' skills for the same job