cli: Add rotate-api-key admin command - #529
Open
KatyaRomashko wants to merge 3 commits into
Open
Conversation
- Show api_key alongside client_secret in create-agent table output - Fix --write-config to write api_key instead of client_secret - Show api_key in rotate-secret table output (server regenerates both) - Update docstrings and help text to reflect both values Fixes redhat-ai-americas#458
KatyaRomashko
requested review from
raycarroll,
rdwj and
srampal
as code owners
August 17, 2026 08:29
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.
Summary
Adds
memoryhub admin rotate-api-key <client_id>to rotate just theapi_keyfor an agent without touchingclient_secret— mirrors the existingrotate-secretcommand, following the same pattern.Linked issues
Closes #459
Design reference
docs/identity-model/cli-requirements.mdType of change
type:feature— new user-visible capabilitySubsystem
Closest existing label:
subsystem:clientTest plan
pytestpasses locally (or the affected subset)pytest memoryhub-cli/tests/test_admin.py— all tests pass, including newTestRotateApiKey(happy path, JSON output, 404 not-found).Reviewer checklist
subsystem: Imperative summaryformatRelease readiness (if this PR touches
sdk/ormemoryhub-cli/)pyproject.tomlversion matches__init__.py__version__CHANGELOG.mdhas an entry for the new versionBREAKINGand links the tracking issue