alibabacloud-bailian-m…
Explain, evaluate, demonstrate, provision, and integrate Alibaba Cloud Bailian Managed Agent…
管理 Dataphin 列级/字段级资源权限的授权、回收、查询、操作日志和权限点校验。 当用户要控制敏感字段可见性,给手机号、身份证号、薪资等字段授予或回收 SELECT 权限,查询某张表/某个字段当前授权记录,或验证某个用户是否拥有字段权限时进入。 触发词:列级权限、字段权限、字段级权限、column permission、field permission、敏感字段可见性、授权字段、回收字段权限、PHYSICAL_FIELD、LOGICAL_FIELD。 关键限制:公共 OpenAPI 通过资源点授权/回收,不提供内部 grantByResource
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill manage-column-permission --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/manage-column-permissionContext preview
The summary Claude sees to decide when to auto-load this skill.
管理 Dataphin 列级/字段级资源权限的授权、回收、查询、操作日志和权限点校验。 当用户要控制敏感字段可见性,给手机号、身份证号、薪资等字段授予或回收 SELECT 权限,查询某张表/某个字段当前授权记录,或验证某个用户是否拥有字段权限时进入。 触发词:列级权限、字段权限、字段级权限、column permission、field permission、敏感字段可见性、授权字段、回收字段权限、PHYSICAL_FIELD、LOGICAL_FIELD。 关键限制:公共 OpenAPI 通过资源点授权/回收,不提供内部 grantByResource
name: manage-column-permission
description: |-
管理 Dataphin 列级/字段级资源权限的授权、回收、查询、操作日志和权限点校验。
当用户要控制敏感字段可见性,给手机号、身份证号、薪资等字段授予或回收 SELECT 权限,查询某张表/某个字段当前授权记录,或验证某个用户是否拥有字段权限时进入。
触发词:列级权限、字段权限、字段级权限、column permission、field permission、敏感字段可见性、授权字段、回收字段权限、PHYSICAL_FIELD、LOGICAL_FIELD。
关键限制:公共 OpenAPI 通过资源点授权/回收,不提供内部 grantByResource 形态;字段授权前必须先定位字段资源标识;--resource-list 元素需传 JSON 对象(如 '{"ResourceId":"field_guid"}');写操作需 HITL 确认。在 Dataphin 平台管理 / 数据权限中对「列级权限(Column / Field Permission)」做授权、回收、查询和校验。列级权限用于控制敏感字段可见性,例如只允许 HR 角色或指定用户查看 `salary` 字段,只允许合规人员查看 `id_card` 字段。
本 Skill 基于 `dataphin-public` 已开放的资源权限 OpenAPI 实现字段级能力:先通过资产/字段查询定位字段资源点,再使用资源权限命令对 `PHYSICAL_FIELD`、`LOGICAL_FIELD`、`LABEL_FIELD`、`REALTIME_LOGICAL_FIELD`、`REALTIME_MIRROR_FIELD` 等字段资源执行授权、回收与校验。页面内部的 `grantByResource` / `submitAuthRevoke` / `queryPagedPermissionList` 属于内部 REST,不作为外部 Skill 的直接命令入口。
**Architecture**:`Dataphin Tenant → Catalog / Table → Field ResourceId → Resource Permission Grant/Revoke → Permission Record / Operation Log → Runtime Permission Check`
aliyun plugin install --names aliyun-cli-dataphin-public
各操作系统一键安装脚本与版本要求详见 [references/cli-installation-guide.md](references/cli-installation-guide.md)。
> 凭证与环境变量由父 skill `alibabacloud-dataphin-skills` 统一声明并预检(父 §3 + §4 Authentication + §8 Step 0,先于路由到本 skill 执行);本 skill 不重复声明。
> **Pre-check: Alibaba Cloud Credentials Required** > > **Security Rules:** > - **NEVER** 读取、回显或打印凭证环境变量(禁止对 AccessKey ID / Secret 做任何输出或日志) > - **NEVER** ask the user to input AK/SK directly in the conversation or command line > - **NEVER** use `aliyun configure set` with literal credential values > - **ONLY** use `aliyun configure list` to check credential status > > ```bash > aliyun configure list > ``` > Check the output for a valid profile (AK, STS, or OAuth identity). > > **If no valid profile exists, STOP here.** > 1. Obtain credentials from Alibaba Cloud Console > 2. Configure credentials outside of this session > 3. Return and re-run after `aliyun configure list` shows a valid profile
**Pre-check: Aliyun CLI >= 3.4.8 required** > Run `aliyun version` to verify >= 3.4.8. If not installed or version too low, install/update from https://aliyuncli.alicdn.com (see [references/cli-installation-guide.md](references/cli-installation-guide.md) for the OS-specific script).
**Pre-check: Aliyun CLI plugin update required** > [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation. > [MUST] run `aliyun plugin update` to ensure that any existing plugins are always up-to-date.
最小权限策略详见 [../../ram-policies.md](../../ram-policies.md)。
> **[MUST] Permission Failure Handling:** When any command or API call fails due to permission errors at any point during execution, follow this process: > 1. Read `../../ram-policies.md` to get the full list of permissions required by this SKILL > 2. Use `ram-permission-diagnose` skill to guide the user through requesting the necessary permissions > 3. Pause and wait until the user confirms that the required permissions have been granted
> **IMPORTANT: Parameter Confirmation** — Before executing any command or API call, > ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks, > passwords, domain names, resource specifications, etc.) MUST be confirmed with the > user. Do NOT assume or use default values without explicit user approval.
执行任何写操作(grant / revoke)前必须向用户确认以下参数,禁止静默提交:
| 参数 | 必填 | 描述 | 默认值 | |---|---|---|---| | `--tenant-id` | 是 | 租户 ID(大整数,建议字符串传) | — | | `--catalog` | 查询字段时必填 | 资产表 catalog:业务板块或项目空间名称 | — | | `--table-name` | 查询字段时必填 | 目标表名 | — | | `--resource-type` | grant/revoke/check 必填 | 资源类型;字段权限常用 `PHYSICAL_FIELD` / `LOGICAL_FIELD` / `LABEL_FIELD` | — | | `--resource-list` | grant/revoke/check 必填 | 资源权限 API 可识别的字段/表资源点列表;每个元素必须传 JSON 对象,如 `'{"ResourceId":"field_resource_id"}'`。注意:`get-table-columns` 返回的字段 `Guid` 只是候选标识,需用权限记录或 check 结果确认是否可作为资源点 | — | | `--user-id-list` | grant 必填 | 待授权用户 ID 列表,CLI 原生 list 格式 | — | | `--user-id` | revoke/check 必填 | 单个待回收或校验用户 ID | — | | `--operate-list` | grant 必填、revoke 可选 | 操作列表;字段查看通常为 `SELECT` | — | | `--operate` | check 必填 | 单个操作类型,如 `SELECT` | — | | `--effective-end` | grant 必填 | 授权有效期时间戳(毫秒) | — | | `--reason` | grant/revoke 可选但推荐 | 授权或回收原因,便于审计 | — | | `--tab-type` | list 必填 | 授权记录/操作日志页签;表与字段权限使用 `TABLE` | `TABLE` | | `--search-text` | list 可选 | 表名、字段名、账号等关键字 | — | | `--page` / `--page-size` | list 必填 | 分页参数 | `1` / `10` |
版本 `{version}`(Shell 变量 `SKILL_VERSION`)来自套件 `references/manifest.json` 的 `version` 字段,与 session-id 一同继承[父技能 §7](../../../SKILL.md#7-observability)。直接加载本子技能时先完成父层初始化;所有 CLI / SDK 调用使用父技能名称与同一版本,跨 Shell 调用须重新注入这些值。
**session-id 由父 skill `alibabacloud-dataphin-skills` 在套件入口加载时生成(32-char 小写 hex),本子 skill 加载时直接继承同一 session-id,不再重新生成。**
**Rule: Every `aliyun` CLI command that calls a cloud API MUST include the `--user-agent` flag.** Local utility commands (e.g. `configure`, `plugin`, `version`) do not support this flag and should be excluded.
--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-dataphin-skills/{session-id} skill-version/{version}"Example (assuming session-id is `a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6`):
aliyun dataphin-public list-resource-permissions --tenant-id "1234567890123456789" \ --tab-type TABLE --page 1 --page-size 10 \ --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-dataphin-skills/a1b2c3d4e5f6
Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.
Explain, evaluate, demonstrate, provision, and integrate Alibaba Cloud Bailian Managed Agent…
Alibaba Cloud Parse-X intelligent document parsing and extraction tool. Supports two…
Execute code in a secure cloud sandbox via AgentBay SDK. Use this skill whenever users…
Operate Alibaba Cloud AgentLoop Dataset resources with aliyun CLI and the AgentLoop API…
Orchestrate AgentLoop evaluation workflows through the Aliyun CLI plugin with safe previews,…
Proactively use AgentLoop Recall to retrieve prior Alibaba Cloud AgentLoop experience through…