← Concepts
Security·3 min read

Authentication vs Authorization

Authentication proves who you are; authorization decides what you're allowed to do. Different problems, often confused.

First time reading this? Start here

Plain English: authentication (authn) is logging in, proving you are who you say you are. Authorization (authz) is checking whether you're allowed to do a specific thing once you're logged in. Being authenticated doesn't mean you're authorized; they're two separate checks.

Used in:Payment GatewayURL ShortenerGoogle Docs (Realtime Collab)
What it is

Two distinct security steps. Authentication (AuthN) verifies identity, confirming the caller is who they claim to be, via passwords, tokens, certificates, or biometrics. Authorization (AuthZ) verifies permission: given a known identity, deciding whether they may perform a specific action on a specific resource, via roles (RBAC), attributes (ABAC), or policies.

The problem it solves

Systems need to both establish identity and enforce boundaries. Authentication answers 'who are you?', and without it, anyone is anonymous. Authorization answers 'are you allowed to do this?', and without it, any authenticated user could do anything. Separating them keeps each concern clean: you authenticate once and authorize on every sensitive action.

How it works

AuthN: the user presents credentials; the system verifies them and issues a token (a signed JWT, or an opaque session id stored server-side). Standards like OAuth2 (delegated access) and OIDC (identity on top of OAuth2) handle this for third parties. AuthZ: on each request, the system reads the identity from the token and checks it against a policy: RBAC maps users to roles to permissions; ABAC evaluates attributes (department, resource owner, time); policy engines (OPA) externalize the rules. The gateway or service enforces the decision before doing the work.

Why use it
What it costs you
Where it shows up in our architectures
Gotchas

Your notes

Private to you