Skip to content

Fix fine-grained permissions help example (data_insert -> data_add) - #1074

Open
LeMikaelF wants to merge 2 commits into
mainfrom
claude/db-token-permissions-test-gm7qld
Open

LeMikaelF wants to merge 2 commits into
mainfrom
claude/db-token-permissions-test-gm7qld

Conversation

@LeMikaelF

@LeMikaelF LeMikaelF commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The --permissions / -p help text (used by db tokens create, group tokens create and the org JWKS template) gives comments:data_insert as an example. The server doesn't accept data_insert. A token created with it fails on every query with:

JWT error: JSON error: unknown variant `data_insert`, expected one of `data_read`, `data_update`, `data_add`, `data_delete`, `schema_update`, `schema_add`, `schema_delete`

Changes

Help text only:

  • The example now uses data_add.
  • The help now lists the valid actions, taken from the server error above.

The CLI still doesn't validate the actions you pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DgxSuLhPPnHaTEntaVaeBx

The --permissions help text suggested `data_insert`, which the server
rejects. The CLI passed it through, producing a valid-looking token that
only failed later with an opaque JWT error on every query.

Use `data_add` in the example, list the valid actions in the help, and
reject unknown actions when parsing the flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DgxSuLhPPnHaTEntaVaeBx
@LeMikaelF LeMikaelF changed the title Validate fine-grained permission actions and fix help example Fix fine-grained permissions help example (data_insert -> data_add) Nov 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants