Skip to content
Cloud & Infrastructure
Skill

/manage-column-permission

管理 Dataphin 列级/字段级资源权限的授权、回收、查询、操作日志和权限点校验。 当用户要控制敏感字段可见性,给手机号、身份证号、薪资等字段授予或回收 SELECT 权限,查询某张表/某个字段当前授权记录,或验证某个用户是否拥有字段权限时进入。 触发词:列级权限、字段权限、字段级权限、column permission、field permission、敏感字段可见性、授权字段、回收字段权限、PHYSICAL_FIELD、LOGICAL_FIELD。 关键限制:公共 OpenAPI 通过资源点授权/回收,不提供内部 grantByResource

From plugin
alibabacloud-aiops-skills
213200 skills
Install
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill manage-column-permission --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/manage-column-permission

Context 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

SKILL.md

manage-column-permission.SKILL.md
name: manage-column-permission
description: |-
  管理 Dataphin 列级/字段级资源权限的授权、回收、查询、操作日志和权限点校验。
  当用户要控制敏感字段可见性,给手机号、身份证号、薪资等字段授予或回收 SELECT 权限,查询某张表/某个字段当前授权记录,或验证某个用户是否拥有字段权限时进入。
  触发词:列级权限、字段权限、字段级权限、column permission、field permission、敏感字段可见性、授权字段、回收字段权限、PHYSICAL_FIELD、LOGICAL_FIELD。
  关键限制:公共 OpenAPI 通过资源点授权/回收,不提供内部 grantByResource 形态;字段授权前必须先定位字段资源标识;--resource-list 元素需传 JSON 对象(如 '{"ResourceId":"field_guid"}');写操作需 HITL 确认。

列级权限管理 Skill

1. Scenario Description

在 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`

涉及 Dataphin OpenAPI

  • `GetTableColumns` — 查询资产表字段,辅助定位字段候选 GUID 与字段元数据
  • `GrantResourcePermission` — 通过资源点对用户授权
  • `RevokeResourcePermission` — 回收用户资源授权
  • `ListResourcePermissions` — 分页获取权限授权记录
  • `ListResourcePermissionOperationLog` — 分页获取权限操作日志
  • `CheckResourcePermission` — 校验用户是否拥有指定资源权限点
  • `GetUsers` — 按用户 ID 批量获取用户信息,用于授权前确认对象

2. Installation

aliyun plugin install --names aliyun-cli-dataphin-public

各操作系统一键安装脚本与版本要求详见 [references/cli-installation-guide.md](references/cli-installation-guide.md)。

3. Environment Variables

> 凭证与环境变量由父 skill `alibabacloud-dataphin-skills` 统一声明并预检(父 §3 + §4 Authentication + §8 Step 0,先于路由到本 skill 执行);本 skill 不重复声明。

4. Authentication

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

5. RAM Policy

最小权限策略详见 [../../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

6. Parameter Confirmation

> **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` |

7. Observability (MUST follow for every aliyun command)

**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/manage-column-permission/{session-id}

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/manage-column-permission/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6

Do not skip, alter the format, or omit `--user-agent` on any `aliyun` API command invocation.

8. Core Workflow

TENANT_ID="<大整数租户 ID,字符串>"
SESSION_ID="<inherited from alibabacloud-dataphin-skills>"
UA="AlibabaClo
Read more
Ships withalibabacloud-aiops-skills

Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.

Get the whole plugin

Other skills on alibabacloud-aiops-skills.