BOLA Lab — Allow vs Deny
Demonstrate peer allow/deny on 127.0.0.1:8815 with toy users.
Visual · api_bola_lab
Lab: two users, two objects, one token policy. Original Cyberlium.
Evidence is two status codes and a sentence.
Create or use toy users on YOUR lab. Prove allow on own object and deny on peer object.
1. Setup toy users
Use lab tokens userA/userB.
No real customer data.
Command guide
Try these commands — Setup toy users
═══ TOOLS & WEBSITES ═══ Browse / read these (authorized learning only — stay in YOUR lab / program scope)
BOLA testing — https://owasp.org/API-Security/editions/2023/en/0xa1-broken-object-level-authorization/ Postman auth — https://learning.postman.com/docs/sending-requests/authorization/
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install curl sudo apt install jq
macOS:
Command — copy this
brew install jq
Windows: Built-in (PowerShell: Invoke-WebRequest)
Command — copy this
choco install jq
═══ LINUX / macOS ═══
Command — copy this
for id in 1001 1002 1003; do curl -sS -o /dev/null -w "order $id as userA: %{http_code}
" -H "Authorization: Bearer userA" "http://127.0.0.1:8815/orders/$id"; done
curl -sS -H "Authorization: Bearer userA" http://127.0.0.1:8815/orders/1001 | jq .Primary tools to practice this lesson: curl, jq. Reference sites: BOLA testing (https://owasp.org/API-Security/editions/2023/en/0xa1-broken-object-level-authorization/); Postman auth (https://learning.postman.com/docs/sending-requests/authorization/). Run every command in the box — install first, then the usage lines — only on YOUR lab / program scope.
2. Allow/deny matrix
Own object → allow. Peer object → deny.
Save statuses.
3. Finding sentence
Write report-style sentence.
Propose ownership check fix.
4. What you ship: BOLA lab evidence
Allow/deny statuses + finding + fix sentence.
5. What you record before the next lesson
Transcript on :8815. Redacted tokens.
6. Wrong vs right: stranger APIs vs literacy on systems you own
Worked failure — same API word, opposite target. Right never needs a live shop or classmate token.
- Wrong: Run the same IDOR against a hospital portal.
- Right: Lab evidence only. Next: quiz.
Mission: BOLA allow/deny
1) Allow own. 2) Deny peer. 3) Write finding + fix.
Stuck? Ask Cyberlium AI Mentor
Ask Mentor: “How to phrase a BOLA finding?”
APPLY: Lab needs:
APPLY: True or False: Real patient data is OK for demos.
APPLY: Port: