Module 2 · Finding, Validating and Reporting Flaws · Lesson 4 of 9
Authentication versus authorisation (IDOR)
Use two lab accounts to test owner, other-user and anonymous access to the same record.
In this lesson · about 24 minutes
- Explain authentication and authorisation
- Build an owner / other-user / anonymous test matrix
- Recognise an insecure direct object reference (IDOR)
Authentication answers "who are you?" (logging in). Authorisation answers "are you allowed to do this to that?". Logging in does not give anyone permission to every account's records.
An insecure direct object reference (IDOR) happens when an app uses an identifier from the request, like /rest/basket/7, and returns the object without checking that it belongs to the caller. Change 6 to 7 and you see someone else's basket. It's one of the most common and most serious web flaws, and it's in the OWASP Top 10 under Broken Access Control.
The three-way test
| Caller | Request | Expected |
|---|---|---|
| Owner (Alice) | Alice's basket | 200 with her data |
| Other user (Bob) | Alice's basket | 403 or 404, no data |
| Anonymous | Alice's basket | 401, no data |
Every authenticated request must still pass a server-side check for that object and action. Hiding a button in the interface is not a check.
Hands-on lab (simulated terminal)
Practice challenge 03: compare two accounts
Two dummy accounts in your local training app: Alice (basket 6) and Bob (basket 7). Their tokens are already stored in the shell variables $ALICE and $BOB, so they never appear in your notes.
Step 1 of 3. Type each command and press Enter. Nothing runs on your computer.
1. As the owner: fetch basket 6 with Alice's token (Authorization: Bearer $ALICE).
Performance-based question (PBQ)
Fill in the access matrix
Record what you observed in the lab above, and what a correct app should do.
Pick the right entry for each cell.
- Alice → basket 6 (her own)
- Bob → basket 6 (Alice's)
- Anonymous → basket 6
Check your understanding0 of 3 correct
Quiz score: 0 of 3
Noviq Academy is free and for learning. Only test systems you own or have explicit written permission to test; unauthorised testing is illegal. Every lab here is simulated or runs locally on your own machine. OWASP, Juice Shop, Burp Suite and Nmap belong to their owners; this course is independent of them.