Repository navigation
Conversation
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.
Add owner-authenticated organization API-token lifecycle commands:
DEPOT_TOKEN, or--token.Requires depot/api#5890 to deploy before these commands are released. Existing server authentication caches can continue accepting revoked tokens until their entries expire. Previously issued registry JWTs and log grants retain their signed expiry; independent pull/build credentials retain their own lifecycle.
Validation: full Go tests/lint, dependency and formatting checks, native CLI build, generated-proto parity, NPM formatting/type-check. Cross-platform release packaging runs in CI.
Note
High Risk
Introduces credential creation/revocation and hardens token API HTTP behavior; mistakes or misuse affect org-wide API access.
Overview
Adds
depot org tokensunderdepot orgso organization owners can list, create, and revoke organization API tokens from the CLI, backed by a newOrganizationTokenServiceproto/Connect client andNewOrganizationTokensClient()in the API layer.The commands require an owner user API token (
depot login,DEPOT_TOKEN, or--token) and a selected org (--organization,DEPOT_ORG_ID, or current org). List returns metadata only with pagination; create shows the secret once on stdout (guidance on stderr) and does not overwrite saved login credentials or auto-retry; revoke targets an exact token ID. Token-management HTTP calls use a dedicated client that refuses redirects so owner credentials are not replayed on follow-up requests.README documents usage, limits, and revocation/cache behavior. Tests cover the command lifecycle, validation, errors, and redirect policy.
Reviewed by Cursor Bugbot for commit 33b39da. Bugbot is set up for automated code reviews on this repo. Configure here.