Do this first: revoke, do not rotate
Revoke the exposed key. Do not rotate it. That distinction is the single most important thing on this page, because the two look interchangeable and are not:
Rotation exists so you can swap a key in a running deployment without an
outage, and the grace window is the whole point of it. In a leak, that same
window is 24 more hours of access for whoever has your key. Rotation is the
routine path and it is the wrong path here.
If you rotate anyway, because a hard cutover would take something important
down, then rotate with
graceMs: 0. That invalidates the old token
immediately and gives you the new one in the same call. graceMs accepts any
integer from 0 up to 72 hours, so the safe value is available and it is not the
default.
How to revoke, today
Revoke it yourself, in the console. Open the Keys page at console.phoneuse.com/keys, signed in to the org the key belongs to, and revoke it. A member can revoke the keys they minted; an admin can revoke any key in the org. Create, rotate, revoke and narrowing to a device subset are all on that page, and it needs nobody’s working hours. If the key was made byphoneuse login, run phoneuse logout on that
machine. It revokes the key the CLI stored and removes it, and says
Logged out: key ... revoked. If it prints warning: could not revoke key
instead, the key is still live: it was only removed from that machine. Revoke
it on the Keys page straight away. A key you set in PHONEUSE_API_KEY is left
alone; revoke that one on the Keys page.
A revoked key is refused from the next request onwards, and a request holding
it fails with revoked_key. If you cannot reach the console, write to the
security contact below, say plainly that a key is exposed and must be revoked
now, and include the key’s id, never the token itself. See
Getting a key.
Security contact
Report a leaked key, or any other security problem, to abdulla@phoneuse.com. Put “urgent” in the subject so it is read first.Then work out what the key could do
A key is not all keys. Before you assume the worst, check what this one was scoped to, because the answer changes how much you have to unwind.- Scopes. A key carries a scope set, and a tool outside it is not merely refused, it is never registered on the connection. A key without an action scope could not have touched a device.
- Device narrowing. A key can be narrowed to a subset of your devices. A narrowed key could not see, let alone drive, anything outside that subset.
- Expiry. A key has an expiry, and an expired key is refused with
expired_key. If the leak is older than the key, the exposure window closed on its own.
What you cannot reconstruct today
Say it here rather than let you discover it during an incident. Receipts record what happened to a device: the org, the device, the idempotency key, the backend kind, the action, a summary of its arguments, the frame it was bound to, the outcome and the timestamps. What a receipt does not record is which key made the call. There is no actor or key id on the ledger, so “what did this specific key do” is not a question this surface can answer yet. The one signal that exists islastUsedAt on the key itself, and it is worth
knowing that it lags, so a quiet key is weak evidence rather than proof of an
unused one.
Two consequences follow, and both point the same way:
- Treat the exposure window as everything the key was scoped to reach, for the whole time it was valid, rather than trying to narrow it from the ledger.
- Revoke first and investigate second. Investigation is the part that is currently limited; revocation is not.