Model reservations and sensitive transitions that can be abused through repeated valid requests below technical rate limits.
Intermediate60 min·updated 2026-11-15
You’re reading a preview. Premium includes the full lesson and specialist practice. View the full curriculum.
Individually valid actions can violate a business rule
A sensitive business flow is a valuable sequence of actions: reserving tickets, claiming rewards, sending invitations, checking out, or advancing payment state. Abuse can use perfectly valid inputs, genuine credentials, and requests below every technical rate limit.
SeatWindow allows each verified customer at most two seats for an event. The API checks that each order contains no more than two seats, but never totals the customer's active allocations. Repeating an ordinary two-seat order three times obtains six seats. No race is required.
The first task is to write the invariant at the right scope. “Each request has quantity <= 2” is not the same as “this verified customer has at most two active seats for this event.”
Continue with Premium
Continue API Security with the complete lessons, guided exercises, code-review challenges and assessments.