RelayRoom keeps a revoked Burrow forwarding when its sweep's row read fails
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 42/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
Start with RelayRoom.#sweep and RelayRoom.alarm in hosted/server/relay-room.ts, then read the timing constants in hosted/server/relay-room-contract.ts and the stalled row-read test in hosted/server/tests/relay-room.test.ts. Resolve the fail-open versus retry policy, update the code and test, and align the Relay boundary FAIL IF in docs/specs/security-hosted.md with the chosen behavior.
由索引模型根據 Issue 內容生成。
描述
Code: RelayRoom.#sweep in hosted/server/relay-room.ts; the alarm in RelayRoom.alarm re-arms RELAY_ROOM_SWEEP_MS (one hour, hosted/server/relay-room-contract.ts) out whatever the sweep did.
Failure path: a Burrow is removed or de-entitled by any path that does not reach closeBurrow (an entitlement change, or a removal whose closeBurrow RPC failed, which the DELETE route logs and answers 204 anyway). The next alarm calls #sweep. #rows throws (database error, or RELAY_ROW_READ_TIMEOUT_MS passes), the catch logs "could not sweep" and returns, and alarm() arms the next sweep an hour later. The socket keeps forwarding authenticated frames past the sweep it should have died at. If the database stays unreachable, it keeps forwarding through every later sweep too.
This breaks the docs/specs/security-hosted.md -> "Relay boundary" FAIL IF: "a removed or de-entitled Burrow's [socket] outlives the next sweep, at most RELAY_ROOM_SWEEP_MS while any Burrow socket is held". hosted/server/tests/relay-room.test.ts ("a stalled row read … leaves the sweep for later, the object's sockets open") pins the current behavior. Keeping sockets open on a failed read was a deliberate choice: #rows says a stalled read must not reset "the object and every socket it holds".
Suggested fix: decide the policy first, then change the code, test, and FAIL IF together. Options:
- Fail closed. On a failed sweep read, retire every held Burrow with a retryable close code. Each one reconnects through the upgrade, which rechecks its row under
blockConcurrencyWhileand is refused while the database is down. This meets the FAIL IF exactly, at the cost of dropping every session during a database blip. - Retry soon. On failure, arm the alarm at
now + RELAY_ROW_READ_TIMEOUT_MS(or about a minute), not an hour, and fail closed only after N consecutive failures or onceRELAY_ROOM_SWEEP_MShas passed since the last good sweep. Then reword the FAIL IF to "withinRELAY_ROOM_SWEEP_MSof the last successful sweep".
Option 2 keeps the bound at one sweep interval, or a small multiple of it, without resetting sockets on a single slow query.
Found while trimming #904, which had parked this as a spec "Known gap".
🤖 Generated with Claude Code
- 主要語言
- TypeScript
- 星號
- 5
- 分支
- 1
- 平均合併
- 12 小時 19 分鐘
- 30 天內合併 PR
- 442
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
diffplug/dormouse 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 86/100
diffplug/dormouse#912 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 1-2 天 新手友好度 25/100
diffplug/dormouse#1235 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 1-2 天 新手友好度 48/100
diffplug/dormouse#1234 · 1 則留言 ·
維護者通常 1 天內回覆
-
security
難度 5/5 一週以上 新手友好度 18/100
diffplug/dormouse#1194 · 2 則留言 ·
維護者通常 1 天內回覆
-
enhancement security
難度 5/5 一週以上 新手友好度 25/100
diffplug/dormouse#1166 · 1 則留言 ·
維護者通常 1 天內回覆
查看 diffplug/dormouse 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
mobile-next/mobile-mcp#526 ·
維護者通常 1 天內回覆
-
e2e-failure ready-to-code
難度 1/5 1 小時以內 新手友好度 73/100
redhat-developer/rhdh-plugin-export-overlays#4470 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
anthropics/anthropic-sdk-typescript#1273 ·
維護者通常 10 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
CopilotKit/OpenBot#815 ·
維護者通常 1 天內回覆