Leaderboard & Counting Service  ·  View 20 of 21  ·  Assurance

Who May Increase a Counter

Four independent refusals before anything is logged; only the fourth is reversible.

Editable source SVG draw.io All views
Member Product client Identity Platform Edge policy Counting API Counter definition Quarantine Event log 1. completes an action 2. member token (cached) 3. short-lived JWT 4. sign event with attestation key 5. POST /events 6. rate limit, bot score 7. admitted 8. subject must equal member_ref 9. is this counter client-writable? 10. type, bounds, version 11. 403 if not client-writable 12. inflation signal matched 13. held, reversible 14. publish accepted event 15. durable 16. 202 + idempotency echo Identity Flow — Who May Increase a Counter Four independent refusals before anything is logged: the token's subject, the counter's client-writability, the declared bounds, and the inflation signal. Only the fourth is reversible. v 1.0 · owner Platform Architecture · date 2026-10

Decisions

  • The token's subject must equal the member reference in the event. A client that can write another member's counter is the whole attack, and this check is the one that prevents it.
  • Client-writability is a property of the counter definition, read at admission. It is not a scope on the token, so revoking it is a configuration change rather than a token rotation.
  • The inflation signal holds rather than refuses, because a false positive that rejects must be re-earned by the member while a false positive that holds can simply be cleared.

What the refusals catch

  • Subject mismatch — writing as someone else. Client-writability — writing a counter the product never exposed. Bounds — a plausible event with an implausible delta. Inflation — plausible events at an impossible rate.
  • The idempotency echo in the response is what lets a client retry safely without a second effect.

Risks

  • Reading the counter definition at admission puts the control plane on the hot path of every client write. It is cached per instance, which makes a revocation eventually consistent by up to the cache TTL.
  • A held contribution is invisible to the member, who sees their action not counted and has no way to learn why.