Revoked key still shows a future "Stops working" time after rotation

Open Beginner friendly
#91 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript
Domain
frontend

Research direction

Start in apps/web/src/features/settings/keys-section.tsx and trace how the "Stops working" cell uses the key status and timestamps. Check the component tests for the keys table, then add coverage for rotated-then-revoked, rotating and active keys. Done means revoked keys show when they stopped, while rotating and active keys retain their expected expiry display.

Written by the indexing model from the issue text.

Description

area: web type: bug

Problem

The ingestion keys table can contradict itself. Take a key that is first rotated (which keeps it valid for the grace period and sets expires_at) and then revoked. It shows:

Status Stops working
Revoked in 21 hours

Revocation takes effect immediately (docs/ingestion-protocol.md, "Authentication", Rules), so the key already stopped working. "in 21 hours" suggests it is still usable, which matters when someone is checking whether a leaked key is dead.

To reproduce:

  1. Create a key.
  2. Rotate it.
  3. Revoke the old key from the table.
  4. Look at the old key's row.

Cause

apps/web/src/features/settings/keys-section.tsx renders the "Stops working" cell from key.expires_at whenever it's set, whatever the status. The API already returns revoked_at and a computed status (ingestionKeyStatus, used by publicKey in apps/api/src/modules/keys/routes.ts).

Proposal

In the "Stops working" cell:

  • for status === "revoked", show when it stopped (revoked_at), for example "Stopped 2 hours ago"
  • for an expired key, show when it expired
  • show a future expires_at only for active or rotating keys

Acceptance

  • A revoked key never shows a future "Stops working" time.
  • Rotating keys still show their grace expiry.
  • A component test covers rotated-then-revoked, rotating and active keys.
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
1d 2h
Merged PRs (30d)
39

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bigbimbs/jekimo

All issues in bigbimbs/jekimo

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.