claude-skills/

Anthropic公式スキル・プラグインの日本語ディレクトリ

last sync 22h ago
スキルOfficialdevelopment

🔐aidp-roles-access

説明

AIDPのロールとアクセスを管理します。具体的には、ロールの一覧表示、権限の確認、ロールの作成、メンバーの追加/削除、およびカタログ・スキーマ・テーブル・ビュー・ボリューム・ワークスペース・ワークスペースオブジェクト・クラスターに対するリソース単位の権限付与/取り消しに対応します。 また、列のマスキング/分類(制限付きビューとオントロジーによる機密性設定)もカバーします(マスキング用のREST APIは存在しません)。 次のような場合に使用: ユーザーがロール/RBACについて質問する場合、誰がどのリソースにアクセスできるかを確認したい場合、任意のリソースに対するアクセスの付与/取り消しを行いたい場合、誰かをロールに追加したい場合、または列のマスキング/分類を行いたい場合。 主要エンジンは公式の `aidp` CLIです。CLIが利用できない場合のフォールバックとして、`oci raw-request` 経由の同等のREST APIを使用します。

原文を表示

Manage AIDP roles and access — list roles, view permissions, create roles, add/remove members, and grant/revoke per-resource permissions on catalogs, schemas, tables, views, volumes, workspaces, workspace objects, and clusters. Also covers column masking/classification (restricted views + ontology sensitivity — no masking REST API exists). Use when the user asks about roles/RBAC, who can access what, granting/revoking access on any resource, adding someone to a role, or masking/classifying columns. Primary engine is the official `aidp` CLI; the same REST API via `oci raw-request` is the no-CLI fallback.

ユースケース

  • ロール/RBACについて質問されるとき
  • リソースへのアクセス権限を確認したいとき
  • リソースへのアクセス権を付与/取り消しするとき
  • ロールにメンバーを追加したいとき
  • 列のマスキング/分類を行いたいとき

本文(日本語訳)

aidp-roles-access — ロール・権限・アクセス管理 (RBAC)

AIDP の RBAC を検査・管理するためのスキルです。

CLI(推奨): aidp role <command> --instance-id <DATALAKE_OCID> --auth api_key --profile DEFAULT --region <r>

  • ロール操作: aidp role list | get | create | update | delete | add-member | remove-member | list-permissions
  • リソースごとの権限付与: aidp <catalog|cluster|volume|schema|workspace|workspace-object> list-permissions | manage-permission

フォールバック(CLI なし): oci raw-request 経由で同一の Role REST API を使用(エンドポイント・認証は同じ)。 権限の書き込み(workspace / cluster / volume への付与)は、設定済みの場合に限り、ゲート付き MCP admin ツールを任意のアクセラレーターとして利用可能です。

検証優先・最小権限の原則: 呼び出し元のアイデンティティに紐付け、その権限を超えるエスカレーションは絶対に行わないこと。 書き込み操作の前に、aidp role list(または GET /roles)を実行して作業パスを確認すること。 認証・ベース URL: references/oci-raw-request.md

次のような場合に使用

  • 「ロールの一覧表示 / アクセス権を持つユーザーの確認」「ロールの作成」「メンバーの追加・削除」「workspace / cluster / volume へのアクセス権の付与・取り消し」

読み取り・ロール CRUD(CLI 推奨)

# ロール一覧の取得(動作確認)— CLI
aidp role list --instance-id <DATALAKE_OCID> --auth api_key --profile DEFAULT --region us-ashburn-1

# ロールへのメンバー追加 — CLI
aidp role add-member --instance-id <DATALAKE_OCID> --role-key <ROLE_KEY> \
  --auth api_key --profile DEFAULT --region us-ashburn-1 \
  --principals '["ocid1.user.oc1..xxxx"]'

変更を伴う操作createupdatedeleteadd-memberremove-membermanage-permission): リクエストボディを .aidp/payloads/ に保存し、実行前に確認を行うこと(references/payloads.md)。


フォールバック(CLI なし)— oci raw-request 経由の REST

ベース URL: https://aidp.<region>.oci.oraclecloud.com/20240831/dataLakes/<DATALAKE_OCID>/…

  • ロール一覧取得GET /roles — ✅ 実環境での 200 確認済み(api_key DEFAULT プロファイル、20240831/dataLakes
  • ロール詳細の確認GET /roles/{k}GET /roles/{k}/permissions
  • 作成 / 更新 / 削除POST /rolesPUT /roles/{k}DELETE /roles/{k}(PUT / DELETE 時は if-match: <etag> ヘッダーを送付)
  • メンバーシップ管理POST /roles/{k}/actions/addMember · POST /roles/{k}/actions/removeMember (ボディ例: {"principals":["ocid1.user.oc1..xxxx"]}
oci raw-request --http-method GET \
  --target-uri "https://aidp.us-ashburn-1.oci.oraclecloud.com/20240831/dataLakes/<OCID>/roles" \
  --profile DEFAULT

401 / 403 / "Security Token" エラーが発生した場合は、oci-raw-request.md の認証ラダーに従って対処すること(AIDP_SESSION のリフレッシュを含む)。


リソースごとの権限付与(全マトリクス)

ロール CRUD・メンバーシップ管理は「どのユーザーがロールに属するか」を制御し、 リソースごとの権限付与は「あるプリンシパルが特定のオブジェクトに対して何を実行できるか」を制御します。

すべてのリソースタイプは list-permissionsmanage-permission のペアを公開しています (CLI 推奨;REST フォールバックは …/<resource>/<key>/permissions…/actions/managePermission)。

付与ボディの形式は共通で {"principals":[…], "permission":"<enum>", "action":"GRANT"|"REVOKE"} です。 各リソースの正確な permission 列挙値は、書き込み前に aidp help <resource> manage-permission または実環境の読み取りで必ず確認すること。

リソース CLI コマンド REST エンドポイント
Catalog aidp catalog list-permissions | manage-permission …/catalogs/<key>/permissions
Schema aidp schema list-permissions | manage-permission …/schemas/<key>/permissions
Table aidp schema list-table-permissions | manage-table-permission <TABLE-KEY> …/tables/<key>/permissions
View aidp schema list-view-permissions | manage-view-permission <VIEW-KEY> …/views/<key>/permissions
Volume aidp volume list-permissions | manage-permission …/volumes/<key>/permissions
Workspace aidp workspace list-permissions | manage-permission(+ list-create-permissions | manage-create-permission …/workspaces/<key>/permissions
Workspace object aidp workspace-object list-permissions | manage-permission …/workspaceObjects/<key>/permissions
Cluster (GA 版 CLI コマンドなし) …/clusters/<key>/permissions
Job / Workflow aidp workflow list-job-permissions <ws> <JOB-KEY> / manage-job-permission <ws> <JOB-KEY> --body …/workspaces/{ws}/jobs/{key}/permissions
Knowledge Base KB 権限の assign|manage|revokeaidp-knowledge-bases …/knowledgeBases/<key>/permissions

Job / Workflow のボディ形式は汎用付与形式と異なります。 CLI の README および SDK により、manage-job-permission{principals, permission, action} を受け付けないことが確認されています。 付与ボディの形式は AssignJobPermissionDetails であり、 {"assignees":{"type":"USER|ROLE|GROUP","targets":[…]},"permissions":["READ"|"USE"|"MANAGE"|"ADMIN"]} となります (permissionsassignees.targets と 1:1 対応するリスト)。 管理ラッパー全体は {"assignJobPermissionDetails":{…},"revokeJobPermissionDetails":{…}} です。

列挙値の名称は引用可能なソースで確認済みです (SDK assign_job_permission_details.py 18〜30 行 / permission_assignees.py 18〜26 行;CLI README workflow manage-job-permission、README 7315〜7377 行)。 書き込み前には必ず aidp help workflow manage-job-permission または list-job-permissions の読み取りで実環境の列挙値を確認すること。

任意のアクセラレーター: ゲート付き aidp MCP が設定されている場合(AIDP_MCP_ENABLE_ADMIN_TOOLS=true + MCP 再起動済み)、 manage_workspace_permission / manage_cluster_permission / manage_volume_permission / manage_create_workspace_permission が同じ書き込み操作をラップします (details_json: {"principals":[…],"permission":"WRITE","action":"GRANT"})。 必須ではなく、上記の REST コマンドが正式な手段です。コンソールからの付与操作も可能です。


カラムマスキングと分類(正直なスコープ — データプレーン API は未確認)

テスト済みテナンシーには、プログラム的なマスキング / 分類用の REST API は存在しません。 GET …/maskingPolicies/dataClassifications/columnMaskingPolicies/tags はすべて 404 を返しました (2026-06-10 調査済み;references/rest-endpoint-map.md に記録)。 存在しない API を作り上げないこと。実際に利用可能な手段は以下のとおりです:

  • 制限付きビュー / 難読化ビュー — 現時点で実用的なカラムレベルの制御手段: 許可されたカラムのみを公開する CREATE VIEW(または CASE 式やハッシュ化による難読化)を作成し、 ベーステーブルではなくビューに権限を付与します(aidp-sql-ddl と上記の View 行を参照)。 「カラムをマスクしたい」という要求には、このパターンを推奨します。

  • オントロジー駆動の機密性管理Ontologies 機能はガバナンス目的でタームにタグを付与します (av:isSensitive / av:requiresRole)が、UI 操作が主体であり、ここでは確認済みの REST インターフェースはありません (aidp-semantic-model の Ontologies に関する注記を参照)。

ユーザーがポリシーベースの動的マスキングを必要としている場合は、現状では UI / オントロジーによる管理となる旨を説明し、 制限付きビューパターンを API ドリブンの代替手段として提案してください。マスキング用エンドポイントが存在するかのような説明は行わないこと。


ワークフロー

  1. まず現在の状態を読み取る(GET /roles + 対象ロールの /permissions)。
  2. 付与 / 取り消しの内容(プリンシパル・権限・対象)を明示し、適用前に確認を取る。
  3. REST(ロール CRUD / メンバーシップ)、または利用可能であればゲート付き admin ツールで適用し、再読み取りで確認する。

ガードレール

  • アクセス変更はセンシティブな操作です。付与 / 取り消しのたびに確認を行い、ユーザーの要求範囲を超えて権限を拡大しないこと。
  • 明示的に依頼されていない IAM / 権限変更を提案しないこと。

参照

references/aidp-cli-map.md · references/payloads.md · references/oci-raw-request.md · references/no-mcp-rest-map.md · references/rest-endpoint-map.md

原文(English)を表示

aidp-roles-access — roles, permissions, access (RBAC)

Inspect and manage AIDP RBAC.

CLI (preferred): aidp role <command> --instance-id <DATALAKE_OCID> --auth api_key --profile DEFAULT --region <r>

  • Roles: aidp role list | get | create | update | delete | add-member | remove-member | list-permissions
  • Per-resource grants: aidp <catalog|cluster|volume|schema|workspace|workspace-object> list-permissions | manage-permission

Fallback (no CLI): same Role REST API via oci raw-request (identical endpoint + auth). Permission writes (workspace/cluster/volume grants) can also use the gated MCP admin tools as an optional accelerator when configured.

Verify-first + least privilege: bind to the caller's identity; never escalate beyond what they have. Confirm the working path with a live aidp role list (or GET /roles) before any write. Auth + base URL: references/oci-raw-request.md.

When to use

  • "List roles / who has access", "create a role", "add/remove a member", "grant/revoke access to a workspace/cluster/volume".

Read & role CRUD (CLI preferred)

# List roles (smoke test) — CLI
aidp role list --instance-id <DATALAKE_OCID> --auth api_key --profile DEFAULT --region us-ashburn-1

# Add a member to a role — CLI
aidp role add-member --instance-id <DATALAKE_OCID> --role-key <ROLE_KEY> \
  --auth api_key --profile DEFAULT --region us-ashburn-1 \
  --principals '["ocid1.user.oc1..xxxx"]'

Mutating ops (create, update, delete, add-member, remove-member, manage-permission): persist the body to .aidp/payloads/ and confirm first (references/payloads.md).

Fallback (no CLI) — REST via oci raw-request

Base: https://aidp.<region>.oci.oraclecloud.com/20240831/dataLakes/<DATALAKE_OCID>/…

  • List rolesGET /roles — ✅ LIVE-VERIFIED 200 (api_key DEFAULT profile, 20240831/dataLakes).
  • Inspect a roleGET /roles/{k}, GET /roles/{k}/permissions.
  • Create / update / deletePOST /roles, PUT /roles/{k}, DELETE /roles/{k} (send if-match: <etag> on PUT/DELETE).
  • MembershipPOST /roles/{k}/actions/addMember · POST /roles/{k}/actions/removeMember (body e.g. {"principals":["ocid1.user.oc1..xxxx"]}).
oci raw-request --http-method GET \
  --target-uri "https://aidp.us-ashburn-1.oci.oraclecloud.com/20240831/dataLakes/<OCID>/roles" \
  --profile DEFAULT

On 401/403/"Security Token", follow the auth ladder in oci-raw-request.md (refresh AIDP_SESSION).

Per-resource permission grants (full matrix)

Role CRUD + membership scope who is in a role; per-resource grants scope what a principal can do to one object. Every resource type exposes a list-permissions + manage-permission pair (CLI preferred; REST …/<resource>/<key>/permissions + …/actions/managePermission fallback). Grant body is consistently {"principals":[…], "permission":"<enum>", "action":"GRANT"|"REVOKE"} — confirm the exact permission enum for each resource via aidp help <resource> manage-permission / a live read before writing.

Resource CLI verbs REST
Catalog aidp catalog list-permissions | manage-permission …/catalogs/<key>/permissions
Schema aidp schema list-permissions | manage-permission …/schemas/<key>/permissions
Table aidp schema list-table-permissions | manage-table-permission <TABLE-KEY> …/tables/<key>/permissions
View aidp schema list-view-permissions | manage-view-permission <VIEW-KEY> …/views/<key>/permissions
Volume aidp volume list-permissions | manage-permission …/volumes/<key>/permissions
Workspace aidp workspace list-permissions | manage-permission (+ list-create-permissions | manage-create-permission) …/workspaces/<key>/permissions
Workspace object aidp workspace-object list-permissions | manage-permission …/workspaceObjects/<key>/permissions
Cluster (no GA CLI verb) …/clusters/<key>/permissions
Job/Workflow aidp workflow list-job-permissions <ws> <JOB-KEY> / manage-job-permission <ws> <JOB-KEY> --body …/workspaces/{ws}/jobs/{key}/permissions
Knowledge Base assign|manage|revoke KB permission (aidp-knowledge-bases) …/knowledgeBases/<key>/permissions

Job/Workflow body shape differs from the generic grant. The CLI README + SDK confirm manage-job-permission does not take {principals,permission,action}. Its grant body is AssignJobPermissionDetails = {"assignees":{"type":"USER|ROLE|GROUP","targets":[…]},"permissions":["READ"|"USE"|"MANAGE"|"ADMIN"]} (permissions is a list aligned 1:1 with assignees.targets); the manage wrapper is {"assignJobPermissionDetails":{…},"revokeJobPermissionDetails":{…}}. Enum names are confirmed-citable (SDK assign_job_permission_details.py lines 18-30 / permission_assignees.py lines 18-26; CLI README workflow manage-job-permission, README lines 7315-7377); still confirm the live enum with aidp help workflow manage-job-permission or a list-job-permissions read before writing.

Optional accelerator: when a gated aidp MCP is configured (AIDP_MCP_ENABLE_ADMIN_TOOLS=true + MCP restart), manage_workspace_permission / manage_cluster_permission / manage_volume_permission / manage_create_workspace_permission wrap the same writes (details_json {"principals":[…],"permission":"WRITE","action":"GRANT"}). Not required — REST verbs above are the source of truth; or apply the grant in the console.

Column masking & classification (honest scope — no data-plane API found)

There is no programmatic masking/classification REST API in the tested tenancyGET …/maskingPolicies, /dataClassifications, /columnMaskingPolicies, /tags all returned 404 (probed 2026-06-10; recorded in references/rest-endpoint-map.md). Do not fabricate one. What actually exists:

  • Restricted / redacting views — the practical column-level control today: CREATE VIEW exposing only permitted columns (or CASE/hashing to redact), then grant on the view, not the base table (aidp-sql-ddl
    • the View row above). This is the recommended pattern when asked to "mask a column".
  • Ontology-driven sensitivity — the Ontologies feature tags terms (av:isSensitive / av:requiresRole) for governance, but it is UI-driven with no confirmed REST surface here (see the Ontologies note in aidp-semantic-model). If the user needs policy-based dynamic masking, surface that it's UI/ontology-governed today and offer the restricted-view pattern as the API-driven equivalent — don't claim a masking endpoint.

Workflow

  1. Read current state first (GET /roles + the relevant role's /permissions).
  2. Show the exact grant/revoke (principal, permission, target) and confirm before applying.
  3. Apply via REST (role CRUD/membership), or the gated admin tool if it's available; re-read to confirm.

Guardrails

  • Access changes are sensitive — confirm every grant/revoke; never broaden beyond the user's request.
  • Don't propose IAM/permission changes that aren't explicitly asked for.

References

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。