Skip to content

feat(cli): add DEPLOY/READONLY key presets - #1179

Closed
dazip wants to merge 3 commits into
prod-3005-v2-key-creation-via-fal-cli-preset-flags-interactivefrom
prod-3005-keys-policy-preset-wire
Closed

dazip wants to merge 3 commits into
prod-3005-v2-key-creation-via-fal-cli-preset-flags-interactivefrom
prod-3005-keys-policy-preset-wire

Conversation

@dazip

@dazip dazip commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Only FULL and API can be expressed as a legacy scope, so DEPLOY and READONLY are unreachable while presets are mapped onto that field.

Presets now travel in policy_preset with scope left unset, which is what the field's mutual-exclusion rule requires, and DEPLOY and READONLY join the flag choices and the interactive picker. keys.create(scope=...) keeps working as a deprecated alias that maps to the equivalent preset. A key whose permissions have no scope equivalent now lists as - instead of raising and taking the rest of fal keys list down with it.

This must not merge or ship before the server reads policy_preset. Against a server that ignores the field, an absent scope parses as enum 0 — ADMIN — so --preset API would silently mint a full-access key. Since at most one of the three fields may be set, no encoding is safe against both an old and a new server; it has to be deploy ordering.

Stacked on #1178, and carries #1177 for the wire fields.

@dazip dazip changed the title PROD-3005: add DEPLOY/READONLY presets and send policy_preset feat(cli): add DEPLOY/READONLY key presets Sep 18, 2026
Adds optional policy_preset (5) and an inline KeyPolicy policy (6) to
CreateUserKeyRequest, and marks the legacy scope field deprecated and
optional so an explicit ADMIN is distinguishable from an unset scope.
Additive only: nothing behaves differently until the server reads them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dazip
dazip force-pushed the prod-3005-v2-key-creation-via-fal-cli-preset-flags-interactive branch from b4c934d to 67b52c1 Compare September 18, 2026 21:04
@dazip
dazip force-pushed the prod-3005-keys-policy-preset-wire branch from bf9a56e to d226fdd Compare September 18, 2026 21:05
@fal-ai fal-ai deleted a comment from linear-code Bot Sep 18, 2026
dazip and others added 2 commits September 21, 2026 08:04
Presets now travel in policy_preset instead of the deprecated scope,
which is the only way to express DEPLOY and READONLY. keys.create with
the scope keyword keeps working as a deprecated alias, and a key with no
scope equivalent lists as "-" rather than failing the whole listing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dazip

dazip commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1185, which combines all three layers into a single PR so the CLI features ship in one release. The work from this PR is carried over there unchanged apart from the preset no longer being sent on the deprecated scope field.

@dazip dazip closed this Sep 22, 2026
@dazip
dazip deleted the prod-3005-keys-policy-preset-wire branch September 22, 2026 17:46
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.

1 participant