Repository navigation
feat(cli): create keys by preset or custom permission list - #1185
Merged
Merged
Conversation
This was referenced Sep 22, 2026
`fal keys create` took a required --scope of ADMIN or API. Add --preset, naming the permission preset to mint the key with, and pick one interactively when neither flag is given. --scope stays as a deprecated alias mapped to its equivalent preset. Presets go out as policy_preset rather than riding on the deprecated scope field, so raise the isolate-proto floor to the release that carries it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Neither has a v1 scope equivalent, so a key minted from one lists with no scope. Let listing render that rather than fail on every key in the account. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Add --permission for a key no preset covers, repeatable and accepting a comma separated list, and a CUSTOM entry in the interactive picker that prompts for the permissions. CUSTOM is only a picker sentinel; what goes out is the permission list. The server validates the names. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dazip
force-pushed
the
nate/prod-3005-cli-key-creation-combined
branch
from
October 9, 2026 20:51
c77c2f7 to
4f19050
Compare
dazip
marked this pull request as ready for review
October 9, 2026 21:12
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4f19050. Configure here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jim-fal
previously approved these changes
Oct 12, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
E2E against prod (SDK + CLI, all passing)
One SDK fix came out of this: with a default team configured, a key without |
jim-fal
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

fal keys createtook a required--scopeof ADMIN or API. It now takes--preset(FULL, API, DEPLOY, READONLY) or--permissionfor an explicit permission list, and prompts for one when neither flag is given.--scopestays as a deprecated alias mapped to its equivalent preset. Presets and permission lists go out aspolicy_presetandpolicy; nothing is sent on the deprecatedscopefield any more.Why: ADMIN-or-API is too coarse to hand someone a key that can only deploy, or only read.
Do not merge until the server reads these fields. An older server sees no scope and treats that as admin, so a READONLY request would come back as a full-access key.
Supersedes #1178, #1179, #1180, which this replaces in one release.
Note
High Risk
Changes how API keys are minted and authorized on the wire; older servers that ignore
policy_preset/policymay mis-grant access, and scope deprecation affects auth-related client paths.Overview
API key creation now uses permission presets (
FULL,API,DEPLOY,READONLY) or an explicitpermissionslist instead of the old requiredADMIN/APIscope. The Python client (KeysNamespace.create), SDK gRPC (create_user_key), andfal keys createall sendpolicy_presetorpolicyon the wire and no longer populate the deprecatedscopefield.--scoperemains as a deprecated alias mapped viaKeyPreset.from_scope().The CLI adds
--preset, repeatable--permission, an interactive Rich preset/custom picker when neither is set, and--aliasas a synonym for description. Listing keys tolerates scopeless keys (e.g. DEPLOY/READONLY) by allowingUserKeyInfo.scopeto beNone.Credential resolution for API keys with an explicit
--teamnow treats a 403 “Insufficient permissions” on owner lookup as non-fatal (keys withoutaccount:settings:readstill work). Dependencyisolate-protois bumped to>=0.34.4.Reviewed by Cursor Bugbot for commit c547d3d. Bugbot is set up for automated code reviews on this repo. Configure here.