Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

huawei-cloud-iam-diagnose

БесплатноЗапускает вложенные скриптыНе проверен

Invoke this skill to check whether a Huawei Cloud IAM user likely has permission to perform an action/resource — 华为云 IAM 参考性权限分析/诊断. Given a user name and a…

huaweicloudskillот huaweicloudskill462 установки в других каталогах

Об этом скилле

Huawei Cloud IAM Reference Permission Analysis (IAM 参考性权限分析)

Overview

This skill performs reference permission analysis for Huawei Cloud IAM. It answers questions like "does user <u> have permission to do <action> on resource <r>?" by expanding the user's permission chains and statically evaluating policy documents.

Honest Capability Boundary (read first)

Capability Status Notes
User-level permission simulation (AWS IAM Policy Simulator equivalent) ❌ Not available Neither the IAM CLI nor the SDK provide a SimulatePrincipal API
Group-level check ✅ keystone_check_project_permission_for_group, keystone_check_domain_permission_for_group, keystone_checkrole_for_group
Agency-level check ✅ check_project_permission_for_agency, check_domain_permission_for_agency, check_all_projects_permission_for_agency
Check whether a user is in a group ✅ keystone_check_user_in_group
Policy document fetch ✅ get_policy_version_v5, keystone_show_permission, show_custom_policy
Authorization schema metadata ✅ get_authorization_schema_v5

Therefore this skill outputs a "大概率有权限/无权限" (likely has / likely has not) reference verdict — it is NOT an authoritative authentication result. When 100% certainty is required, guide the user to the IAM console, an actual API trial call, or CTS audit logs (see references/verification-method.md).

Architecture

User input: user (+ maybe target action/resource)
    ↓
1. Resolve user_id (v3 keystone by name → fallback v5 full scan)
    ↓
2. Expand permission chains
   ├─ User direct policies      (v5 ListAttachedUserPoliciesV5)
   ├─ User's groups             (v3 keystone_list_groups_for_user)
   │    ├─ group attached policies (v5 ListAttachedGroupPoliciesV5)
   │    └─ group roles: domain / all-projects (v3)
   └─ Agencies                  (v5 ListAgenciesV5 + attached policies/roles)
    ↓
3. Fetch policy documents (get_policy_version_v5 / role.policy)
    ↓
4. Evaluate Allow/Deny per policy doc + grade confidence
    ↓
5. Emit verdict + precision grade + chain trace (+ real check cross-validation)

Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).

Prerequisites

  • Python 3.7+ with huaweicloudsdkcore>=3.1.140 and huaweicloudsdkiam>=3.1.140 (v5 module required by the diagnose scripts).
  • Credentials in either form (checked in this order):
    1. Environment variables HW_ACCESS_KEY / HW_SECRET_KEY (+ optional HW_REGION_NAME, HW_SECURITY_TOKEN, HW_DOMAIN_ID), or
    2. Local KooCLI profile at ~/.hcloud/config.json (created by the KooCLI). ● HCLOUD_PROFILE selects a non-default profile name.
  • An IAM identity with read access to the IAM service. Some chain-listing/check interfaces (domain/agency role listing, real checks) additionally require IAM admin/view permissions; when the current credential lacks them, those steps report HTTP 403 and the verdict is based on the data that could be read (still reference-only).

Run the environment check first:


skill action=exec: bash skill://scripts/check_env.sh

Install dependencies (when the check asks) — requirements.txt in the skill root defines huaweicloudsdkcore and huaweicloudsdkiam.

  • skill-quality-cli — ensured by bash scripts/ensure_cli.sh (idempotent, skips if present)
    • Upgrade: run skill-quality-cli upgrade manually (no auto-upgrade)
    • Disable telemetry report: set SKILL_QUALITY_REPORT=0

Workflow

Step 1 — Environment preparation

Run skill://scripts/check_env.sh. If it fails, fix and re-run before proceeding.

Step 2 — Resolve the target user

Use scripts/list_user_groups.py --user_name=<user> (or --user_id) to resolve, or pass --user_name directly to the diagnose/trace scripts (they resolve internally).

Step 3 — Choose the action

Intent Recommend
Full verdict for one action/resource scripts/diagnose_user_permission.py (--user_name, --action, optional --resource)
List the whole chain (no filtering) scripts/trace_permission_chain.py (--user_name, optional --json)
Real check: does group have role X? scripts/check_group_permission.py (--group_id, --role_id, --scope)
Real check: does agency have role X? scripts/check_agency_permission.py (--agency_id, --role_id, --scope)
Quick data fetch (policies/groups/agencies) the list_* scripts

Always run a script with -h first to confirm parameters before executing it.

Step 4 — Interpret the verdict

Verdicts are always one of:

  • 大概率有权限 — evidence of Allow (unless explicit Deny wins)
  • 大概率无权限 — explicit Deny exists, or chain is empty / no Allow|Deny statement matched the target action (IAM 隐式拒绝 implicit deny)
  • 不确定 — only when a matched statement cannot be
Полный SKILL.md на ClawHub

Установить huawei-cloud-iam-diagnose в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл huawei-cloud-iam-diagnose?

Invoke this skill to check whether a Huawei Cloud IAM user likely has permission to perform an action/resource — 华为云 IAM 参考性权限分析/诊断. Given a user name and a target action (e.g. ecs:servers:list) / resource, it expands the user's permission chains (direct attached policies + user-group inheritance + agencies), parses policy document Allow/Deny statements and outputs a "大概率有权限/无权限" reference verdict with a confidence grade and full chain trace. Group/agency permissions are cross-validated with the real IAM check interfaces. Read-only, R3 auto-execute. Honest boundary: no user-level policy-simulation API exists on Huawei Cloud, so results are reference-only, never an authoritative auth decision; custom policy + Condition + agency-stacking are flagged "仅供参考". Triggers include: 权限分析, 权限诊断, 权限评估, 是否有权限, 查权限, IAM 权限, 权限链路, 谁能访问, 参考性权限分析, 权限检查, permission diagnosis, permission analysis, check permission, IAM permission, permission chain, has permission, policy analysis, who has access, role permission, access denied 排查, unauthorized 排查.

Как установить скилл huawei-cloud-iam-diagnose?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл huawei-cloud-iam-diagnose запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить huawei-cloud-iam-diagnose с