A token refresh whose response is lost signs the user out: the rotated refresh token is revoked and the browser never gets its replacement #451
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil#451
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found with the admin console smoke harness (#430), in a run where the machine's network addresses changed and Chromium aborted requests in flight.
What happens
POST /api/auth/refreshrotates the refresh token: it issues a replacement (as the HttpOnly cookie) and revokes the one that was sent. When the response does not reach the browser (the connection drops after the server has processed the request: a network change, a proxy timeout, a laptop that changes Wi-Fi), the browser still holds the revoked token. Every later refresh answers 401 and the console session is over; the user has to sign in again. In the harness run, one aborted refresh (net::ERR_NETWORK_CHANGED /api/auth/refresh) was followed by401 /api/auth/refreshon every later visit of that user.Why it needs a decision
Rotation with immediate revocation is the strict choice and it detects a stolen token that is replayed. The usual way to survive a lost response is a short reuse window: the revoked token is accepted once more for a few seconds and answers with the replacement that was already issued (not a second new one), so a replay outside the window still fails and still can be treated as theft. That is a security trade-off, so it wants a design note first.
Wanted