API Key and Token Service · View 13 of 22 · Act 5 · Runtime
Decisions
- The secret is generated, digested and returned inside one request. It is never written, never logged, never re-derivable.
- Scope escalation is refused at issuance against the creating principal's own scopes, which is what stops key creation being a privilege-escalation path.
- Rotation issues a successor first and revokes the predecessor on a timer, so no customer ever has a window with no valid credential.
Assumptions
- 7-day default overlap window, invented. Long enough for a weekly deploy cadence, short enough that a forgotten rotation is not a permanent second key.
- Issuance p99 ≤ 400 ms, including the KMS round trip.
Risk
- The `rot → dev` message reporting the predecessor's last use reads a lossy counter. It informs a human decision and is labelled as approximate; it must never gate the automatic revocation at day 7.