gstack/ios-qa/daemon
Garry Tan f31aff1bc6
fix(ios-qa): /auth/sessions no longer hands raw bearer tokens to any local process
The loopback sessions list echoed live tokens — a harvest-and-replay
primitive for anything on the machine (same class as the /health token leak
fixed in v1.63). The list now returns a device-salted 16-hex token_id plus
metadata; the salt is shared with the attempts log so identifiers correlate.
/auth/revoke keeps the list→revoke workflow alive by accepting token_id
alongside the caller's own raw token and identity. saltedHash() is exported
from audit.ts and writeAttempt now reuses it (was inlined).

Integration tests pin raw-token absence, the id shape/metadata, and the
token_id revoke round-trip (verified RED against the leaking handler).

List fix ported from time-attack/gstack (GStack 2); token_id revoke is ours.

Co-authored-by: Sina Matian <sina@time-attack.dev>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 12:35:47 -07:00
..
src fix(ios-qa): /auth/sessions no longer hands raw bearer tokens to any local process 2026-08-14 12:35:47 -07:00
test fix(ios-qa): /auth/sessions no longer hands raw bearer tokens to any local process 2026-08-14 12:35:47 -07:00