How a Convenience Endpoint Grows Teeth¶
Run the How a Convenience Endpoint Grows Teeth MicroSim Fullscreen
About This MicroSim¶
This is a hypothetical example. A builder adds a small route so they can check, from a phone, how many scans ran today. It returns one number and has no sign-in check. Its only protection is an address that is hard to guess.
Over the following months the route picks up features. The timeline shows five versions of it. The top row shows what each version can do. The bottom row shows the existing check, which never changes. The middle row fills in as you go, with the check each version needs.
For each version you answer two questions: what check it needs, and whether the existing check still fits. After the fifth, you name the version where drift first turned the route into a hole. Each step looks reasonable on its own day. That is the point.
The needed check follows the most sensitive thing the route can do, from least to most: show a harmless number, reveal IDs, reveal personal data, spend money, hand out private photos.
How to Use¶
- Read the version below the timeline and pick the check it needs.
- Say whether the existing check still fits: Yes or No. Answers lock once you pick them.
- Read the result and the reason. The needed check appears on the timeline, blue if the existing check fits and orange if there is a gap.
- Press Add the next version and repeat.
- After version 5, pick the version where drift first became a hole.
- Click any version on the timeline to read its reason again. Press Start over to try again.
Iframe Embed Code¶
You can add this MicroSim to any web page by adding this to your HTML:
<iframe src="https://arunbatchu.github.io/good-enough-engineering/sims/convenience-endpoint-drift/main.html"
height="674px"
width="100%"
scrolling="no"></iframe>
Lesson Plan¶
Grade Level¶
Adult professional (Good Enough Engineering)
Duration¶
10-15 minutes
Prerequisites¶
Security drift, convenience endpoint risk, broken access control and attack surface, from Chapter 16.
Learning Objective¶
Judge, for each of five versions of a convenience endpoint, what access check the endpoint needs given what it can do, and identify the first version at which its unchanged check no longer fits.
Activities¶
- Exploration (5 min): Step through all five versions and answer each question.
- Guided Practice (5 min): Version 2 was added "to make debugging faster". Discuss why a list of IDs is already enough to need a check.
- Assessment (5 min): Pick a convenience route in an app you work on. List what it could do when it was added and what it can do now, and say whether its check still fits.
Assessment¶
Mastery is at least 4 of 5 "check it needs" answers correct and the correct drift version, version 2. Watch for these mistakes:
- Treating an address nobody knows as protection.
- Deciding the route is safe because no single change was dangerous.
- Assuming a route that returns only numbers or IDs never needs a check.
- Expecting tests to find drift.
References¶
- OWASP Top Ten: Broken Access Control - The top web risk, and the kind of failure drift produces.
- vis-timeline documentation - The library used to draw the timeline.
- Chapter 16: Security as a Habit - The chapter this MicroSim supports.