cloud-oidc
/cloud-oidc
Łączy agenta zespołu z OIDC chmury Alibaba RAM, Tencent CAM lub Kubernetes, z uprawnieniami zwykłymi i podwyższonymi po potwierdzeniu.
- Autor
- nia-teams ↗
- Repozytorium
- connect-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 10.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 6
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 5
Brak sygnałów. Repozytorium zmienione 10.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Łączy agenta zespołu z OIDC chmury Alibaba RAM, Tencent CAM lub Kubernetes, z uprawnieniami zwykłymi i podwyższonymi po potwierdzeniu.
Oryginalny opis (EN)
Use when connecting a Nia Teams Agent to Alibaba Cloud RAM OIDC, Tencent Cloud CAM OIDC, or Kubernetes OIDC RBAC via standard Workload OIDC, configuring ordinary permissions, human-confirmed elevated permissions, role prompts, and live token verification from an environment holding cloud administrator credentials.
Jak działa
- Scope & References
- Agent Pairing & Authorization-Role API
- Identity Matrix & Two-Tier Permissions
- Two-Phase Role Prompt Authoring
- Provisioning & Live Verification
Podgląd SKILL.md
---
name: cloud-oidc
description: Use when connecting a Nia Teams Agent to Alibaba Cloud RAM OIDC, Tencent Cloud CAM OIDC, or Kubernetes OIDC RBAC via standard Workload OIDC, configuring ordinary permissions, human-confirmed elevated permissions, role prompts, and live token verification from an environment holding cloud administrator credentials.
---
# Zero-Trust Cloud Access for Agents (`cloud-oidc`)
A Nia Teams Agent’s cloud identity is an AuthorizationRole (`agent.<agentSlug>.<name>`).
External cloud IAM or Kubernetes RBAC trusts its standard OIDC subjects `role:<key>` (ordinary tier) and `role:<key>:elevated` (elevated tier).
Run this skill in the environment holding cloud/cluster administrator CLI credentials—never inside the target Agent being authorized.
## Scope & References
Execute from an authenticated administrator `aliyun` CLI, `tccli`, or `kubectl` environment; if local administrator `aliyun` credentials are absent, guide the user to create a temporary AK/SK with `AdministratorAccess` at https://ram.console.aliyun.com/users and give it to the current local Agent for setup.
Administrator credentials stay in the provisioning environment; Nia Teams stores AuthorizationRole instructions.
Installed resources resolve relative to this file:
- Alibaba Cloud RAM: [references/aliyun.md](references/aliyun.md).
- Tencent Cloud CAM: [references/tencentcloud.md](references/tencentcloud.md).
- Kubernetes OIDC RBAC: [references/kubernetes.md](references/kubernetes.md).
Confirm account/UIN/cluster, region/namespace, enabled permission scope(s), and role name; request only the tiers needed.
The suffix `name` matches `/^[a-z0-9][a-z0-9-]{0,31}$/`; cloud role names are separate objects.
## Agent Pairing & Authorization-Role API
Start pairing using the provisioning client's actual label:
```bash
curl -fsS -X POST https://nia-teams.com/api/agent-connect/start \
-H 'Content-Type: application/json' -d '{"clientLabel":"Claude Code"}'
```
Present `verificationUrl` (`https://nia-teams.com/connect/:code`) to the human.
The browser selects the target native Agent; its owner/admin clicks **确认授权**.
Retain `connectId` and `pollSecret` privately; poll serially every two seconds:
```bash
curl -fsS --get https://nia-teams.com/api/agent-connect/status \
--data-urlencode "reference=${connectId}" --data-urlencode "pollSecret=${pollSecret}"
```
The single-use approved result supplies `teamId`, canonical `agentSlug`, and `workloadToken`.
Save that result before another poll; `expired` requires a fresh pairing.
Use its `elevation_kind: "agent-connect"` setup bearer for the selected Agent's role API:
`GET /api/teams/:teamId/authorization-roles` reads existing configuration;
`PUT /api/teams/:teamId/authorization-roles/:name` upserts the role and binding.
Send all three fields: `systemPrompt`, `elevationPrompt`, `sessionElevationEnabled`.
PUT returns `role` and `tokens`; GET the collection again to verify stored values (Nia Teams trims leading/trailing whitespace on prompt strings, so compare `.strip()` on readback).
## Identity Matrix & Two-Tier Permissions
Derive `ROLE_KEY = agent.<agentSlug>.<name>` from the pairing result.
Standard OIDC Issuer: `https://nia-teams.com`; audience: `nia-teams-workload`; RS256 JWKS: `/oauth2/jwks`.
- **Tier 1 (Ordinary permissions)**: IAM trust accepts `role:<ROLE_KEY>` and `role:<ROLE_KEY>:elevated`; Kubernetes Group binding uses `role:<ROLE_KEY>`.
- **Tier 2 (Elevated permissions)**: IAM trust accepts only `role:<ROLE_KEY>:elevated`; Kubernetes Group binding uses `nia:elevated:role:<ROLE_KEY>` (elevated tokens retain the ordinary group).
Enable Tier 1 alone (`sessionElevationEnabled: false`, `elevationPrompt: ""`), Tier 2 alone (`sessionElevationEnabled: true`, zero standing cloud access), or both tiers together (`sessionElevationEnabled: true`).
When elevated access (such as `AdministratorAccess` or `cluster-admin`) covers the needed permissions and no standing access is needed, grant no permissions before approval and create only the elevated role, not two roles.
Human owner/admin membership gates pairing, role configuration and TaskBar elevation approval;
cloud IAM / Kubernetes RBAC enforces workload access independently.
## Two-Phase Role Prompt Authoring
Write in the target Agent's working language, matching the reference templates' concise factual style.
Substitute approved account IDs / UINs, ARNs, regions, endpoint/CA paths and the exact role key.
`systemPrompt` states identity, ordinary scope, and executable commands using `nia role-token <ROLE_KEY>` when Tier 1 is enabled; when only Tier 2 is enabled, state the gated scope and zero standing access.
Whenever Tier 2 is enabled (`sessionElevationEnabled: true`), require stating target object, action and side effects in `systemPrompt` before calling `request_session_elevation`.
`elevationPrompt` (empty when Tier 2 is disabled) contains the elevated ARN or RBAC scope and executable elevated commands;
elevated ARNs belong exclusively here. Owner/admin approval delivers this prompt with the elevated identity.
## Provisioning & Live Verification
Inspect CLI identity, existing OIDC providers (reuse `NiaTeamsWorkload` when already configured), trust, policies and bindings before writes.
Confirm target objects, policy changes and side effects with the human, then provision the reviewed plan.
Read back changed objects and attached policies; reconcile existing grants when updating tiers.
Use `tokens.roleToken` and `tokens.elevatedRoleToken` from PUT for live checks, isolated from admin CLI auth.
Alibaba: `aliyun sts GetCallerIdentity --mode OIDC`; Tencent: `tccli sts GetCallerIdentity` with `TKE_*` OIDC env vars (matching numeric `RoleId`);
Kubernetes: `kubectl auth can-i` with explicit server, CA and token.
Verify enabled tiers: ordinary token succeeds on Tier 1 and is denied on Tier 2;
elevated token succeeds on Tier 2 (and retains Tier 1 when both are enabled).
Use non-mutating permission probes and check an out-of-scope resource as well as allowed resources.
Report actual test results, provisioned objects and any unavailable live checks.
Keep tokens and STS credentials in memory or private temporary files.
After Alibaba OIDC live verification, clear temporary local bootstrap credentials and prompt the user to disable/delete the temporary AK (and any temporary RAM user created for it) in RAM; keep AK/SK out of remote Nia Teams chats/sandboxes, target Agent prompts/configuration, command arguments, logs and summaries.
Revocation reconciles external trust/bindings and outstanding STS sessions as well as the Nia Teams role.
Pliki w paczce (6)
- README.md 21 KB
- README_CN.md 19 KB
- SKILL.md 6 KB
- references/aliyun.md 10 KB
- references/kubernetes.md 11 KB
- references/tencentcloud.md 11 KB
Wersje
W bazie nie ma innych skilli o nazwie cloud-oidc.
Migawka bazy z 13.11.2026 · wersja paczki 41fd1865cd95 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95nia-teams-mcp
Pomaga budować serwer MCP z SDK Nia Teams, z uwierzytelnianiem OIDC i kartami potwierdzeń w Taskbarze. - 100github-actions
Pisze workflowy GitHub Actions z najmniejszymi uprawnieniami, OIDC zamiast przechowywanych kluczy chmury i akcjami przypiętymi do pełnego SHA. - 95ci-cd
Pomaga ustawić i naprawić GitHub Actions: bramki jakości, uwierzytelnianie OIDC do chmury, macierze testów i publikację artefaktów. - 90cloud-api-operations
Obsługuje zasoby chmury Tencent Cloud przez API, np. alarmy, role CAM i bazy MySQL, gdy brakuje dedykowanego narzędzia. - 90entra-app-credentials
Prowadzi rejestracje aplikacji Entra: sekrety i certyfikaty, federacyjne dane logowania, OIDC w GitHubie, migrację i wycofanie poświadczeń. - 100gcp-auth
Konfiguruje uwierzytelnianie i autoryzację w Google Cloud: Application Default Credentials, impersonację kont usługowych, Workload Identity Federation i tokeny OIDC do komunikacji usługa-usługa.