Authentication vs authorization
Every request a user makes raises two questions, and they get answered in order.
Who is this? and what are they allowed to do?
The first is authentication. The second is authorization. Both get shortened to "auth", both start with the same six letters, and they solve completely different problems.
Proving who you are
Authentication answers one question: is this really who they claim to be?
You've met the common methods as a user:
- A username and password.
- Signing in with Google or GitHub.
- Sending an API key or a token with a request.
Each is a way of presenting evidence. The server's job is to decide whether the evidence holds.
Get this wrong and someone can present themselves as another person. That's spoofing, the S in STRIDE, and it's the failure that makes every other protection irrelevant, because the app is now applying the right rules to the wrong person.
The door doesn't care what you want to do. Its only job is deciding whether you're the person you say you are.
Deciding what you can do
Authorization runs after, and only makes sense once identity is settled:
- A user reading their own data.
- A user updating their own profile.
- A teacher reading their students' records.
- That same request from a student, refused.
Get this wrong and people do things they shouldn't. In STRIDE that's elevation of privilege; in the OWASP Top 10 it's broken access control, which has sat at the top of the list for years.
Being logged in isn't a single permission. It's the starting point for a separate question asked fresh on every request.
The order they run in
Every request that reaches a protected resource passes through both, in the same sequence:
request ──▶ authentication ──▶ authorization ──▶ resource
(who are you?) (may you do this?)Two examples make the shape clear. A user reading their own profile: the request arrives, authentication establishes who they are, authorization confirms the profile belongs to them, access is granted.
An admin reaching an admin-only endpoint: the request arrives, authentication establishes who they are, authorization checks for admin rights, access is granted.
Only one of the four steps differs between those. The identity check is identical, and the permission check is where the two requests part company.
Strong authentication with weak authorization is unsafe. Strong authorization without solid authentication is meaningless.
That's why authentication comes first every time, and why a mistake there undoes everything after it.
Try it
Four situations. For each one, decide whether the failure is authentication or authorization, and name the STRIDE letter it maps to.
- A login form accepts any password for the username
admin. - A logged-in customer changes the id in a URL and sees another customer's order.
- An API endpoint accepts requests with no token at all.
- A support agent can delete accounts, which was only ever meant to be possible for administrators.
Compare your answers
| # | Failure | Why | STRIDE |
|---|---|---|---|
| 1 | Authentication | The app cannot tell who is at the keyboard, so anyone can present themselves as admin | Spoofing |
| 2 | Authorization | The customer really is who they say; nothing checked whether the order belongs to them | Elevation of privilege |
| 3 | Authentication | No claim is presented at all, so the endpoint has no idea who is calling. A 401 is the correct response | Spoofing |
| 4 | Authorization | The agent is correctly identified and the permission check is wrong. A 403 is the right refusal | Elevation of privilege |
Number 2 has a name of its own: an insecure direct object reference. In OWASP terms both 2 and 4 are broken access control.
Two and four are the same class of bug wearing different clothes, which is part of why broken access control stays at the top of the OWASP list. Both apps knew exactly who was asking.
Where this goes next
Authentication happens once, at login. Authorization happens on every request afterwards, and needs to know who the user is each time.
Which leaves an awkward gap, because HTTP doesn't remember anything between one request and the next.
How apps remember you is the problem that gap creates, and the three families of answer the rest of this section works through.

