Логотип Cloud Iam Hardening

Cloud Iam Hardening

Спільнота
selvarajmurugesan90
cloud-iam-hardening

Guides hardening identity and access management across AWS, Azure, and GCP — least-privilege policy design, eliminating long-lived credentials in favor of federation (OIDC/Workload Identity), break-glass access, and periodic access review. Use when a user asks to "reduce IAM permissions", "remove unused IAM roles", "set up federated/keyless access for CI/CD", "harden our cloud identity posture", "review who has admin access", "implement least privilege", or "get rid of long-lived access keys".

Огляд

Видавецьselvarajmurugesan90
Репозиторійops-engineering-skills
Назва навичкиcloud-iam-hardening
Зірки
44
Форки
18
Файли в пакеті
Лише інструкції
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Видавець на GitHub: selvarajmurugesan90. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Cloud Iam Hardening у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/selvarajmurugesan90/ops-engineering-skills/tree/main/plugins/cloud/skills/cloud-iam-hardening
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/selvarajmurugesan90/ops-engineering-skills.git /tmp/ops-engineering-skills
mkdir -p .claude/skills
cp -r /tmp/ops-engineering-skills/plugins/cloud/skills/cloud-iam-hardening .claude/skills/cloud-iam-hardening
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Cloud Iam Hardening в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Cloud Iam Hardening, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Cloud Iam Hardening не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Cloud IAM Hardening

Purpose

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.

When to use

  • Reducing an over-broad policy (e.g. AdministratorAccess, Owner, roles/editor) down to least privilege for a specific workload or team.
  • Setting up CI/CD pipelines (GitHub Actions, GitLab CI, Azure DevOps) to authenticate to cloud APIs without storing static access keys/service account keys as secrets.
  • Investigating "who can do X" or "why does this role have this permission" during an incident or audit.
  • Implementing break-glass emergency access that bypasses normal SSO/MFA flows only when genuinely needed, with full audit logging.
  • Running a quarterly or post-incident access review to find unused permissions, stale credentials, or orphaned service principals.
  • Responding to a cloud security posture finding like "N IAM users have console access keys older than 90 days" or "M service accounts have organization-level Owner."

Prerequisites & environment

  • Read access to the relevant IAM surface: AWS IAM Access Analyzer / CloudTrail, Azure AD sign-in + audit logs / Entra Permissions Management, or GCP IAM Recommender / Policy Analyzer — these tools generate the "what's actually used" data that least-privilege redesigns depend on; don't guess permissions from documentation alone.
  • For CI/CD federation: the CI platform must support OIDC token issuance (GitHub Actions, GitLab CI ≥ 15.7, CircleCI, Azure DevOps all do natively as of 2024).
  • Terraform ≥ 1.5 (or the cloud-native IaC of choice) if policies are managed as code — strongly recommended over console-managed IAM once past a handful of roles.
  • Organizational agreement on a break-glass process owner and an alerting destination (e.g. a PagerDuty escalation) before implementing break-glass access, so its use is always followed up on.

Step-by-step guidance

  1. Inventory current access before changing anything. Pull a permissions-usage report:

    • AWS: IAM Access Analyzer's "unused access" findings, or aws iam generate-service-last-accessed-details.
    • Azure: Entra Permissions Management (if licensed) or az role assignment list --all cross-referenced with Azure AD sign-in logs.
    • GCP: gcloud recommender recommendations list --recommender=google.iam.policy.Recommender --project=<PROJECT_ID> or the IAM Policy Analyzer in the console.
  2. Replace long-lived credentials with federation. For CI/CD:

    • AWS: configure an OIDC identity provider trusting the CI platform's token issuer, and a role with a trust policy scoped to the specific repo/branch:
      json
      {
        "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"
            }
          }
        }]
      }
    • GCP: use Workload Identity Federation — a workload identity pool mapped to the CI OIDC issuer, with an attribute condition restricting which repo/branch can impersonate the target service account.
    • Azure: use a federated credential on an Entra app registration (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.
  3. Shrink standing permissions to least privilege, iteratively:

    • Start from the access-usage report from step 1, not from a blank policy — build the allow-list from what's actually called.
    • Replace broad AWS managed policies (AmazonS3FullAccess) with resource-scoped custom policies naming specific buckets/prefixes.
    • In GCP, replace basic roles (roles/editor, roles/owner) with predefined or custom roles scoped to the specific service and project.
    • In Azure, replace Owner/Contributor at the subscription level with built-in roles scoped to a resource group, or custom RBAC roles listing only the needed actions.
  4. 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:

    json
    {
      "role": "roles/owner",
      "members": ["user:oncall-engineer@example.com"],
      "condition": {
        "title": "temporary-incident-access",
        "expression": "request.time < timestamp('2026-08-01T00:00:00Z')"
      }
    }
  5. 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.

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

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

Best practices

  • Prefer federation over any long-lived credential — access keys, service account JSON keys, and client secrets are the highest-leverage thing to eliminate; almost every modern CI/CD and workload runtime supports OIDC/Workload Identity Federation today.
  • Scope trust policies to the narrowest subject possible (specific repo + branch/environment, not repo:example-org/*) — a wildcard OIDC trust policy is only marginally better than a static key.
  • Grant permissions to groups/roles, not individual identities — an individual leaving should never require touching resource policies.
  • Treat SCPs/Organization Policies/Azure Policy as a backstop, not the primary control — see the respective landing-zone skills; IAM policy is where least privilege actually lives.
  • Time-box elevated access using PIM, IAM Conditions with expiry, or short-lived sts:AssumeRole sessions instead of standing admin grants.
  • Log every policy change and require peer review on IAM/RBAC Terraform changes the same way you would for application code — IAM is production infrastructure.
  • Avoid policy sprawl from copy-pasted "just in case" permissions — every * in an Action or Resource field is a future audit finding.

Common pitfalls

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

Worked example

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

  1. Pull the IAM user's 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.
  2. Create an OIDC identity provider for 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.
  3. Attach a custom policy to that role granting exactly the three services/actions found in step 1, scoped to the specific bucket ARN, ECS cluster/service ARN, and ECR repository ARN.
  4. Update the GitHub Actions workflow to use 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.
  5. Run the pipeline end-to-end against a staging environment to confirm the scoped role works, then delete the IAM user and its access key.
  6. Add a weekly IAM Access Analyzer scan that alerts if any new IAM user with console/API access keys appears, to prevent regression.

Cross-references

Поширені запитання

Що робить навичка ШІ Cloud Iam Hardening?

Guides hardening identity and access management across AWS, Azure, and GCP — least-privilege policy design, eliminating long-lived credentials in favor of federation (OIDC/Workload Identity), break-glass access, and periodic access review. Use when a user asks to "reduce IAM permissions", "remove unused IAM roles", "set up federated/keyless access for CI/CD", "harden our cloud identity posture", "review who has admin access", "implement least privilege", or "get rid of long-lived access keys".

Навіщо використовувати Cloud Iam Hardening у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Cloud Iam Hardening — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Cloud Iam Hardening у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/selvarajmurugesan90/ops-engineering-skills/tree/main/plugins/cloud/skills/cloud-iam-hardening. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Cloud Iam Hardening?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Cloud Iam Hardening?

Зі скількома забажаєте. У TypingMind ви можете використовувати Cloud Iam Hardening із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Cloud Iam Hardening?

Так. На GitHub цю навичку публікує selvarajmurugesan90 за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі
Логотип openclaw

Openclaw Testing

openclaw
ОрганізаціяПопулярне

Choose proportional OpenClaw tests and checks, diagnose failures, and route environment-sensitive or release proof to its owner.

82.2K
391K
Файлів: 2
Відкрити
Логотип mattpocock

Wizard

mattpocock
СпільнотаПопулярне

Створює інтерактивний майстер у bash, який проводить людину через кроки, доступні лише їй. Використовуйте його для підготовки інфраструктури, налаштування облікових даних або секретів CI, роботи з незнайомою…

22.3K
264.4K
Файлів: 2
Відкрити
Логотип affaan-m

Deployment Patterns

affaan-m
СпільнотаПопулярне

Процеси розгортання, шаблони конвеєрів CI/CD, контейнеризація Docker, перевірки працездатності, стратегії відкату та контрольні списки готовності вебзастосунків до промислового…

39.1K
261.1K
Інструкції
Відкрити
Логотип affaan-m

Docker Patterns

affaan-m
СпільнотаПопулярне

Шаблони Docker і Docker Compose для локальної розробки, безпеки контейнерів, мережевої взаємодії, стратегій роботи з томами та оркестрації кількох сервісів.

39.1K
261.1K
Інструкції
Відкрити

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇