Claude
Cursor
GitHub Copilot
Skill
preset-guest-tokens
Prepare and create Preset embedded dashboard guest tokens, external-user claims, resource claims, RLS claims, and token-handling plans through direct Superset API calls. Use only for direct API workflows; Do not use for MCP-only work.
Virus-scanned
Reviewed automatically before listing.
Download
preset-io-agent-skills-plugins_preset-api-skills_skills_preset-guest-tokens-73d2674.zip · 2 KB
Install
skills CLI
npx skills add https://github.com/preset-io/agent-skills/tree/master/plugins/preset-api-skills/skills/preset-guest-tokens
Claude Code
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install preset-io-agent-skills@llmmart
Git
git clone https://github.com/preset-io/agent-skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole preset-io/agent-skills collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
preset-guest-tokens
Use for security-sensitive guest-token payload review and creation.
Always
- Auth and conventions come from
preset-api(JWT exchange, base URLs, Rison); resolve the workspace hostname through the Management API when it is not already known. Consultpreset-embeddingfor embedded-config context when it is missing. - Use
preset-embedded-rlswhen row-level security clauses are present. - Require explicit confirmation before
POST /api/v1/security/guest_token/. - Confirm dashboard/resource UUID, user claims, RLS clauses, token handling, and expiration expectations.
- Do not invent RLS clauses, trusted domains, or authorization details; ask for missing authorization details.
- Never print signed guest tokens in logs, examples, PR comments, or handoff notes.
Decision Rules
- Classify guest token creation as token issuance.
- Require approval summary with dashboard, resource, user, RLS, audience, expiration, and handling.
- Never create or print a signed token before approval.
- Separate embedded config reads from token creation.
Workflow Order
- Inspect dashboard and embedded config metadata.
- Summarize token claims, resources, user payload, RLS, audience, and handling.
- Request explicit approval.
- Stop before creating or printing token.
Retrieve
- Guest-token claims, resources, user payload, RLS, token handling: references/guest-token-claims.md
- Approval policy: load
preset-apiand thenreferences/safety-policy.md.
Files (agent-skills)
-
examples
-
guest_token_claims.py 616 B
def build_guest_token_payload(embedded_dashboard_uuid, rls_clauses=None): return { "user": { "username": "external-user-id", "first_name": "External", "last_name": "Viewer", }, "resources": [ {"type": "dashboard", "id": embedded_dashboard_uuid}, ], "rls": [{"clause": clause} for clause in (rls_clauses or [])], } def create_guest_token_after_confirmation(client, hostname, payload): return client.workspace( "POST", hostname, "/security/guest_token/", json=payload, )["token"]
-
-
references
-
guest-token-claims.md 1.5 KB
# Guest Token Claims Guest tokens grant signed embedded access for external viewers. They are security-sensitive credentials. ## Endpoint | Goal | Endpoint | |---|---| | Create guest token | `POST /api/v1/security/guest_token/` | Confirm the target workspace supports the endpoint through `/api/v1/_openapi` before relying on the payload shape. Reusable Python snippets live in `examples/guest_token_claims.py`; load that file only when implementation detail is needed. ## Required Confirmation Before creating a guest token, summarize: 1. Workspace hostname. 2. Embedded dashboard UUID or resource ID. 3. External user identity claims. 4. Exact resources array. 5. Exact RLS clauses, or state that none will be included. 6. Token handling plan, including where the token will be delivered. 7. Expected expiration behavior, if known. Wait for explicit confirmation. ## Payload Shape Use neutral placeholder claims in examples. The payload must include `user`, `resources`, and any approved `rls` entries. Do not invent identity fields, dashboard IDs, or RLS clauses. Never print signed guest tokens. Return them only through the approved delivery channel for the embedding runtime. ## RLS Handling If row-level security is required, prepare the `rls` entries with `preset-embedded-rls` first. Do not guess tenant, customer, account, or region filters. If the request does not include RLS, explicitly state that the embedded viewer may see all data allowed by the dashboard, datasets, and workspace permissions.
-
-
SKILL.md 1.8 KB
--- name: preset-guest-tokens description: Prepare and create Preset embedded dashboard guest tokens, external-user claims, resource claims, RLS claims, and token-handling plans through direct Superset API calls. Use only for direct API workflows; Do not use for MCP-only work. --- # preset-guest-tokens Use for security-sensitive guest-token payload review and creation. ## Always - Auth and conventions come from `preset-api` (JWT exchange, base URLs, Rison); resolve the workspace hostname through the Management API when it is not already known. Consult `preset-embedding` for embedded-config context when it is missing. - Use `preset-embedded-rls` when row-level security clauses are present. - Require explicit confirmation before `POST /api/v1/security/guest_token/`. - Confirm dashboard/resource UUID, user claims, RLS clauses, token handling, and expiration expectations. - Do not invent RLS clauses, trusted domains, or authorization details; ask for missing authorization details. - Never print signed guest tokens in logs, examples, PR comments, or handoff notes. ## Decision Rules - Classify guest token creation as token issuance. - Require approval summary with dashboard, resource, user, RLS, audience, expiration, and handling. - Never create or print a signed token before approval. - Separate embedded config reads from token creation. ## Workflow Order 1. Inspect dashboard and embedded config metadata. 2. Summarize token claims, resources, user payload, RLS, audience, and handling. 3. Request explicit approval. 4. Stop before creating or printing token. ## Retrieve - Guest-token claims, resources, user payload, RLS, token handling: [references/guest-token-claims.md](references/guest-token-claims.md) - Approval policy: load `preset-api` and then `references/safety-policy.md`.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.