IAM glossary
Authentication vs authorization
AuthN / AuthZ
Authentication proves who you are (password, passkey, MFA). Authorization decides what you can do once you are in. Most access bugs in real apps are authorization bugs.
How it works
Authentication (AuthN) answers “who are you?”. You prove it with something you know (password), have (phone, security key) or are (fingerprint). The result is an identity and usually a session or a token.
Authorization (AuthZ) answers “what can you do?”. It happens after authentication, on every request: can this user read this invoice, delete this file, approve this payment? It depends on roles, attributes, ownership and context. A perfect login does not protect anything if authorization is missing.
A simple example
At a hotel, showing your ID at the front desk is authentication: they now know you are Maria Rossi. The key card they give you is authorization: it opens room 204 and the gym, not room 205. If any card opened every room, checking your ID would have been pointless.
Common mistakes
- Checking only that the user is logged in, not that the resource belongs to them (change
/invoices/41to/invoices/42and you see someone else’s invoice). - Hiding a button in the interface and thinking that is authorization: the server must check every call.
- Mixing the two in one token without saying what the API must still verify.