feat: improve API key management flows#337
Open
MaxEriksson2000 wants to merge 7 commits intodevelopfrom
Open
Conversation
…nagement-improvements
…nagement-improvements
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
This PR groups the API key management work into focused commits:
lib/features/api-keys, including shared action menu, state badge, usage state, table helpers, moved dialog/components, read-only view-mode fixes, and a ticking rotation grace badge.rotation_grace_hours: nulland a regression test for that case.sk_API key permissions soresource_permissionsbecomes the primary model for server keys while backend derives the effective top-levelpermission;pk_keys remain excluded from fine-grained permissions.sk_keys withresource_permissions IS NULL, preserving old simple-mode behavior by setting all resource types to the key's currentpermission.permission=readfrom bypassing the guardrail.9038.Why
The API key management changes had grown across staged and unstaged frontend/backend edits. This keeps the ownership boundary clearer, reduces duplicated table/action code, avoids a rotation crash when policy explicitly sends
null, makes view mode less misleading by disabling permission controls, and moves permission synchronization forsk_keys into backend-owned security logic instead of relying on frontend-only calculations.