feat(apikeys): add rotate command#251
Open
LorrisSaintGenez wants to merge 3 commits into
Open
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 35 |
| Duplication | 16 |
TIP This summary will be updated as you push new changes.
Add `algolia apikeys rotate` to rotate the CLI-managed API key for the current application via the Public API (POST .../api-keys/:uuid/rotate), looked up by the UUID stored in state.toml. The new key is persisted for the current application. - config: APIKeyUUID(appID) getter (legacy apps with no UUID return false) - dashboard: RotateAPIKey client method - rotate command: errors with a pointer to 'application select' when no CLI-managed key UUID is stored Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3b397a8 to
5545dac
Compare
A migrated application can have a usable key in the keychain but no api_key_uuid in state.toml, so 'apikeys rotate' has nothing to target. Both 'application select' and 'auth login' reused the existing key and never generated a UUID. They now regenerate a fresh CLI-managed key whenever none is on record. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5545dac to
76f09f5
Compare
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.
What
algolia apikeys rotate: rotates the CLI-managed API key for the current application via the Public API (POST .../api-keys/:uuid/rotate), looked up by the UUID stored instate.toml. The new key is persisted for the current application.algolia application select.algolia application selectandalgolia auth login: a migrated app can have a usable key in the keychain but noapi_key_uuidinstate.toml(sorotatehad nothing to target). Both now regenerate a fresh CLI-managed key whenever none is on record.Test
GROUT-324