Authentication proves who you are; authorization decides what you're allowed to do. Different problems, often confused.
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.
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.
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.
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.
API-key authentication identifies the merchant; authorization scopes restrict which operations and accounts that key may touch
The API gateway authenticates the JWT and authorizes whether the user may create or manage a given short link
Authentication identifies the editor; per-document authorization (owner/editor/viewer) decides who can read vs write each doc