cx-platform-admin
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePlatform Admin Skill
Platform Admin Skill
Use this skill for managing access, authentication, and authorization in Coralogix. It covers API key management, role and scope definitions, user administration, team groups, SAML SSO configuration, and IP access restrictions.
当需要管理Coralogix中的访问权限、身份验证和授权时,使用此Skill。它涵盖API密钥管理、角色与作用域定义、用户管理、团队组、SAML SSO配置以及IP访问限制。
Destructive Operation Safety
破坏性操作安全注意事项
All write operations (create, update, delete, set-idp, set-active, set-status) require interactive confirmation. The CLI will prompt before executing. To skip the prompt in scripts, pass .
--yesIMPORTANT: NEVER pass without explicit user approval. Before executing any write operation:
--yes- Describe the exact operation to the user (what will be created/modified/deleted)
- Wait for the user to confirm
- Only then execute with
--yes
Read-only operations (list, get, search, system, sp-params, send-data-keys) do not require confirmation and can be run freely.
所有写入操作(创建、更新、删除、set-idp、set-active、set-status)都需要交互式确认。CLI在执行前会提示确认。若要在脚本中跳过提示,需传入参数。
--yes重要提示:未经用户明确批准,绝不要传入。 在执行任何写入操作前:
--yes- 向用户描述确切的操作内容(将创建/修改/删除什么)
- 等待用户确认
- 确认后再传入执行
--yes
只读操作(列表、获取、搜索、system、sp-params、send-data-keys)无需确认,可自由执行。
Read-Only Mode
只读模式
Use (or ) to block all write operations at the CLI level. This is useful for safe exploration - you can query any IAM resource without risk of accidental modifications.
--read-onlyCX_READ_ONLY=1使用(或)可在CLI层面阻止所有写入操作。这适用于安全探索场景——你可以查询任何IAM资源,无需担心意外修改。
--read-onlyCX_READ_ONLY=1Agent Mode
Agent模式
When running inside an AI agent (Claude Code, Cursor, Codex, etc.), cx automatically detects the agent environment and fails fast on write operations instead of hanging on a stdin prompt. The error message instructs you to get user confirmation first, then re-run with .
--yes当在AI Agent(Claude Code、Cursor、Codex等)中运行时,cx会自动检测Agent环境,若执行写入操作会直接失败,而非挂起等待标准输入提示。错误信息会指示你先获取用户确认,再传入重新运行。
--yesCLI Commands
CLI命令
API Keys
API密钥
| Command | Purpose |
|---|---|
| List all API keys |
| Get a single API key |
| Create an API key |
| Update an API key |
| Delete an API key |
| List send-data API keys |
| List all team members' keys |
| Bulk delete keys |
| Activate/deactivate keys |
| 命令 | 用途 |
|---|---|
| 列出所有API密钥 |
| 获取单个API密钥 |
| 创建API密钥 |
| 更新API密钥 |
| 删除API密钥 |
| 列出send-data API密钥 |
| 列出所有团队成员的密钥 |
| 批量删除密钥 |
| 激活/停用密钥 |
Roles & Scopes
角色与作用域
| Command | Purpose |
|---|---|
| List custom roles |
| Get a role definition |
| Create a custom role |
| Update a custom role |
| Delete a custom role |
| List system (built-in) roles |
| List all scopes |
| Get a scope definition |
| Create a scope |
| Update a scope |
| Delete a scope |
| 命令 | 用途 |
|---|---|
| 列出自定义角色 |
| 获取角色定义 |
| 创建自定义角色 |
| 更新自定义角色 |
| 删除自定义角色 |
| 列出系统(内置)角色 |
| 列出所有作用域 |
| 获取作用域定义 |
| 创建作用域 |
| 更新作用域 |
| 删除作用域 |
Users & Groups
用户与组
| Command | Purpose |
|---|---|
| Search users (optional |
| Get a single user |
| Create user(s) |
| Update user(s) |
| Activate/deactivate users |
| List all team groups |
| Get a group by ID |
| Get a group by name |
| List users in a group |
| Create a group |
| Update a group |
| Delete a group |
| 命令 | 用途 |
|---|---|
| 搜索用户(可选 |
| 获取单个用户信息 |
| 创建用户 |
| 更新用户信息 |
| 激活/停用用户 |
| 列出所有团队组 |
| 通过ID获取组信息 |
| 通过名称获取组信息 |
| 列出组内用户 |
| 创建组 |
| 更新组信息 |
| 删除组 |
SAML & IP Access
SAML与IP访问
| Command | Purpose |
|---|---|
| Get SAML configuration |
| Get service provider parameters |
| Set IDP parameters |
| Activate/deactivate SAML |
| Get IP access settings |
| Create IP access rules |
| Update IP access rules |
| Delete IP access settings |
All commands support for structured output and for profile selection.
-o json-p <profile>| 命令 | 用途 |
|---|---|
| 获取SAML配置 |
| 获取服务提供商参数 |
| 设置IDP参数 |
| 激活/停用SAML |
| 获取IP访问设置 |
| 创建IP访问规则 |
| 更新IP访问规则 |
| 删除IP访问设置 |
所有命令都支持以输出结构化数据,以及以选择配置文件。
-o json-p <profile>Access Audit Workflow
访问审计流程
Use this workflow to produce a comprehensive access report:
使用以下流程生成全面的访问报告:
Step 1: List All Users
步骤1:列出所有用户
bash
cx iam users search -o json
cx iam users search -o json | jq '[.[] | {id, name: .user_name, status, role_ids}]'bash
cx iam users search -o json
cx iam users search -o json | jq '[.[] | {id, name: .user_name, status, role_ids}]'Step 2: List Roles
步骤2:列出角色
bash
cx iam roles list -o json
cx iam roles system -o jsonCross-reference user role IDs with role definitions to understand permissions.
bash
cx iam roles list -o json
cx iam roles system -o json将用户角色ID与角色定义交叉引用,以理解权限范围。
Step 3: List Groups and Memberships
步骤3:列出组与成员身份
bash
cx iam groups list -o json
cx iam groups list -o json | jq '[.[] | {id, name, member_count: (.members | length)}]'For each group, check members:
bash
cx iam groups users <group-id> -o jsonbash
cx iam groups list -o json
cx iam groups list -o json | jq '[.[] | {id, name, member_count: (.members | length)}]'针对每个组,检查成员:
bash
cx iam groups users <group-id> -o jsonStep 4: Inventory API Keys
步骤4:清点API密钥
bash
cx iam api-keys list -o json
cx iam api-keys admin list -o json
cx iam api-keys send-data-keys -o jsonIdentify old or unused keys:
bash
cx iam api-keys list -o json | jq '[.[] | {id, name, created_at, active}] | sort_by(.created_at)'bash
cx iam api-keys list -o json
cx iam api-keys admin list -o json
cx iam api-keys send-data-keys -o json识别陈旧或未使用的密钥:
bash
cx iam api-keys list -o json | jq '[.[] | {id, name, created_at, active}] | sort_by(.created_at)'Step 5: Check IP Restrictions
步骤5:检查IP限制
bash
cx iam ip-access get -o jsonbash
cx iam ip-access get -o jsonStep 6: Check SAML Configuration
步骤6:检查SAML配置
bash
cx iam saml get -o json
cx iam saml sp-params -o jsonbash
cx iam saml get -o json
cx iam saml sp-params -o jsonStep 7: Cross-Reference
步骤7:交叉引用
Produce a summary: which users have admin roles, which API keys are old, which groups have broad access.
生成总结:哪些用户拥有管理员角色,哪些API密钥已过期,哪些组拥有广泛的访问权限。
API Key Rotation
API密钥轮换
Safe key rotation workflow:
- List current keys:
cx iam api-keys list -o json - Identify keys to rotate: filter by age or name
- Create replacement key: (after user approval)
cx iam api-keys create --from-file new-key.json --yes - Deploy the new key to all systems using the old key
- Verify the new key works in all integrations
- Delete the old key: (after user approval)
cx iam api-keys delete <old-key-id> --yes
WARNING: Never delete an API key before its replacement is deployed and verified. Deleting an active key immediately breaks all integrations using it.
安全的密钥轮换流程:
- 列出当前密钥:
cx iam api-keys list -o json - 确定需要轮换的密钥:按创建时间或名称筛选
- 创建替换密钥:(需用户批准后执行)
cx iam api-keys create --from-file new-key.json --yes - 部署新密钥到所有使用旧密钥的系统
- 验证新密钥在所有集成中均可正常使用
- 删除旧密钥:(需用户批准后执行)
cx iam api-keys delete <old-key-id> --yes
警告: 在替换密钥部署并验证可用前,绝不要删除旧密钥。删除活跃密钥会立即中断所有使用该密钥的集成。
Safety Callouts
安全注意事项
Deleting API keys breaks any integration using that key immediately. Always create a replacement first.
Deactivating users () takes effect immediately. The user loses access with no grace period.cx iam users set-status --status INACTIVE
Changing SAML configuration (orcx iam saml set-idp) can lock out the entire team if misconfigured. Always verify SP parameters first withcx iam saml set-active.cx iam saml sp-params
Deleting IP access rules () removes all IP restrictions immediately, potentially exposing the account.cx iam ip-access delete
删除API密钥会立即中断所有使用该密钥的集成。请务必先创建替换密钥。
停用用户()会立即生效。用户将立即失去访问权限,无缓冲期。cx iam users set-status --status INACTIVE
修改SAML配置(或cx iam saml set-idp)若配置错误,可能导致整个团队无法登录。请始终先使用cx iam saml set-active验证服务提供商参数。cx iam saml sp-params
删除IP访问规则()会立即移除所有IP限制,可能导致账户暴露风险。cx iam ip-access delete
Key Principles
核心原则
- Audit before modifying - run the full access audit workflow before making changes
- Never delete keys without replacement - create new key → deploy → verify → delete old
- Use for structured reports - enables jq filtering for precise access analysis
-o json - Multi-profile for cross-environment audits - use or
-p <profile>to audit staging + production--all-profiles - Template from existing - before creating new roles
cx iam roles get <id> -o json > role.json
- 修改前先审计 - 在进行任何更改前,先执行完整的访问审计流程
- 无替换不删除密钥 - 先创建新密钥 → 部署 → 验证 → 再删除旧密钥
- 使用生成结构化报告 - 支持使用jq进行过滤,以精准分析访问权限
-o json - 多配置文件跨环境审计 - 使用或
-p <profile>审计 staging 和生产环境--all-profiles - 从现有模板创建 - 创建新角色前,先执行导出现有角色作为模板
cx iam roles get <id> -o json > role.json
Related Skills
相关技能
- - review what API keys are used for and whether they're still needed
cx-cost-optimization
- - 审查API密钥的用途及是否仍需保留
cx-cost-optimization