Abuse and rate limiting on the public claim endpoints
- Dominant language
- Vue
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Question
What protects the unauthenticated, mutating claim endpoints from abuse?
Graduated from the map's fog now that [Data model, schema, and route and permission map](https://github.com/fkeenv/tabby/issues/11) has drawn the route family it was waiting on. Eight routes under `/g/{claimToken}` accept writes from anybody holding a 22-character string, and [ADR-0003](https://github.com/fkeenv/tabby/blob/main/docs/adr/0003-the-claim-link-has-no-identity-boundary.md) makes that deliberate — "the link is the entire attack surface, so its hygiene is the whole defence". The hygiene list it names is partly satisfied by the route map; the rate limiting on it is not, because the shape of the protection was unknowable before the endpoints existed.
- **Token guessing.** 128 bits makes a hit implausible, but an unthrottled endpoint still invites the attempt, and every miss is a database lookup. Whether unknown-token 404s are throttled separately from valid-token traffic — and per IP, since there is nothing else to key on — is the first question.
- **What the throttle key is on a valid token.** Per IP punishes exactly the case the product is designed for: one restaurant table on one wifi, or five phones behind one carrier NAT. Per token punishes the whole table for one bad actor. Per token *and* IP is a third option with different failure modes. There is no session and no account to key on ([ADR-0003](https://github.com/fkeenv/tabby/blob/main/docs/adr/0003-the-claim-link-has-no-identity-boundary.md)), which removes the usual answer.
- **The claim endpoint is chatty by design.** Tap a tile, take a Share — the winning prototype's whole feel depends on that being instant and repeatable, so a limit tuned for a form post will make the product feel broken. What a legitimate burst looks like needs a number.
- **Participant creation is the dangerous one.** [Roster repair](https://github.com/fkeenv/tabby/issues/14) already observes that conjuring a Participant is the strictly more dangerous act than renaming one, and merge and delete are the Organizer's alone — so a flood of junk Participants is repair work that only one person can do. Whether that endpoint gets a tighter limit than claiming is a real choice.
- **What a throttled response says.** A 429 on a screen with no accounts and no support channel has to say something a stranger in a restaurant can act on.
- **Where the limit lives.** Laravel's `throttle` middleware with a named limiter is the default and needs no dependency; a CDN or edge rule is a deployment answer that would leave the app unprotected in local and CI. Pick one and say why.
- **Not in question:** the Claim Link's five powers, and the accepted permanent risk that a holder can claim as somebody else. This ticket is about volume, not about identity.
Blocks the spec.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.