🚦 Security · Security Fundamentals
Authorization
Control what an authenticated identity is allowed to do.
Permissions should follow business roles and data ownership.
A reviewer can read an application but only an approver can approve it.
💡 Like a hotel key card: it proves nothing about who you are, it just decides which doors open for your room.
💡 Why it matters
Knowing who someone is does not mean they should see or change everything. Broken access control is one of the most common and damaging flaws, often letting one user reach another user's data. Good authorization keeps actions tied to real business roles and ownership.
🛠️ How to achieve it
⚠️ Signs of trouble
- •Changing an ID in the URL shows another user's data.
- •Permission checks live only in the frontend.
- •Everyone is effectively an admin because roles were never defined.
- •New endpoints ship with no access checks at all.
🎯 Quick check
Score: 0/3Three questions to test the idea.
1. Authorization decides what?
Answer: What an identity is allowed to do
Authentication proves who you are; authorization decides what that identity may do.
2. Where must access rules be enforced?
Answer: On the server for every request
Hiding a button helps nobody if the server still honors the request; checks must run server-side.
3. A user changes an ID in the URL and sees someone else's record. This is a failure of what?
Answer: Authorization (an ownership check was missing)
The server authenticated the user but never checked they owned that specific record — a broken access control.
