Authentication vs authorization (authn vs authz)
Authentication proves who you are; authorization decides what you may do. Most access bugs live in the second, after a perfectly good login.
Authentication (authn) answers “who is this?”: a password, a passkey, MFA or a company login through SSO. Authorization (authz) answers “is this person allowed to do this, to this record?”, and it has to be checked on every request, on the server. The two are often confused because OAuth is an authorization protocol that many apps use for login, which is why OpenID Connect was added on top.
The split matters in a security questionnaire, which asks about both separately: how users sign in, and how you enforce roles and permissions. Strong login does not help if user A can open user B’s invoice by changing an ID in the URL. That is broken access control, first on the OWASP Top 10 2021. OWASP’s Authorization Cheat Sheet recommends denying by default and checking permissions on every request.
Sources
- OWASP: A01:2021 Broken Access Control owasp.org
- OWASP: Authorization Cheat Sheet cheatsheetseries.owasp.org
Related terms
- SSO (single sign-on): Logging in once with a company account (Microsoft, Google, Okta) to use many apps, managed centrally by IT.
- MFA (2FA, multi-factor authentication): Logging in with two or more kinds of proof, such as a password plus a code from an app or a security key.
- RBAC and ABAC (role-based access control): Two ways to decide who may do what: RBAC grants permissions through roles such as admin or viewer, ABAC through attributes of user, resource and context.
- Broken access control: A flaw that lets users read, change or delete data, or run actions, beyond their permissions; first in the OWASP Top 10 since 2021.
- OpenID Connect (OIDC): An identity layer on top of OAuth 2.0 that lets an app learn who signed in, through an ID token from Google, Microsoft, Okta or another provider.
- OAuth: A standard that lets an app act on a user’s account elsewhere (mail, calendar, files) without ever seeing the password.
