Carrel Hardens Room Passcodes Against Brute-Force Without Stalling Live Typing
The developer of Carrel, a real-time collaborative CodeMirror 6 workspace, found that slow scrypt passcode hashing could block Node's event loop or saturate libuv's threadpool under brute-force attempts. To fix this, the server caps concurrent scrypt verifications with a four-slot limiter and applies per-IP progressive lockouts, ignoring X-Forwarded-For unless a proxy is explicitly trusted. Successful verification yields a short-lived, single-use HMAC ticket that is consumed on WebSocket upgrade to block replays. The system also uses a one-byte routing prefix on binary WebSocket frames to separate CRDT updates, awareness data, and control events, and handles host disconnects with a five-second grace period before seniority-based promotion.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in