Skip to content

API key rotation & lifecycle management #456

Description

@therealjhay

ProblemThe developers page creates keys but has no rotate/revoke/expiry UI; initialKeys are static and Math.random fallback leaks mock behavior.

Solution

  • Add key actions: rotate (revoke + mint replacement, preserving usage history), revoke with confirmation, set expiry, and scope selection (read-only/read-write).
  • Back with /api/keys/:id/rotate, :id/revoke, PATCH /api/keys/:id.
  • Show masked keys with single-copy reveal (never render full key in DOM).
  • Add an audit entry on every rotate/revoke.

Acceptance Criteria

  • Rotating mints a new key and revokes the old immediately.
  • Full keys never appear in the DOM text content.
  • Scope changes are enforced server-side.
  • npm run build passes.

Note for Contributors: Write a clear PR description. Show rotate → new key → old rejected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions