Date: 2026-05-31
Accepted
We are adding a management-plane view of issued tokens (IATs and stream tokens) so an administrator can list, introspect, and revoke them. The original request asked to show “the IP address each token was issued to.”
Taken literally, that means recording the remote address of the request that
minted the token — the caller of GET /iat, or whoever registered a stream
client. On reflection that signal is near-worthless:
The codebase already has the right raw material for the “where is it used”
question on the stream side: a stream’s RemoteIP (StreamStateRecord) is
refreshed every time the peer connects, and it is captured on the data plane
at no extra cost. The gap was only on the IAT side, where “use” means a
/register call — a cold path, cheap to instrument.
We track redemption, not issuance.
/register: last_redemption_ip,
last_redemption_at, and a redemption_count on the IAT’s TokenRecord.
Last-only — not a full per-redemption trail (deep forensics live in the SET
event journal). The write is best-effort (logged at WARN on failure,
never blocking registration), matching the existing TrackToken posture.RemoteIP (last-seen IP) onto
stream-typed tokens rather than storing a second copy.Parent = the immediate parent JTI at each mint
site (IAT → stream-client token → delivery token), for trace/audit display.redemption_count is deliberately positioned as the data primitive a future
max-uses / redeem-once policy would consume, and the redemption IP as the
input a future IAT-to-IP-mask restriction would check. Neither policy is
built today.
Positive
/register path.Negative
redemption_count may under-report if a best-effort write is lost. Acceptable
for an audit aid; a future max-uses policy that needs a reliable count would
have to revisit the best-effort posture.CONTEXT.md — “Token administration vocabulary”: Redemption, Last-redemption
IP, Last-seen IP.key scope and closing the anonymous IAT endpoint (the IAT
lifecycle this view administers).pkg/ssfModels/model_token.go — TokenRecord.