Skip to the guide

Authentication vs authorisation

BeginnerConcept3 pages

Authentication answers "who are you?". Authorisation answers "may you do this, to this thing?". They're different checks made in different places, and many breaches in the news are the second one missing: a logged-in user reading someone else's data. Interviewers listen for whether you keep the two apart and put each where it belongs.

A bank counter

You ask a bank teller to withdraw $500 from account 4471. First she checks your ID card: the photo matches, it's in date, you're Maria Lopez. Then she looks up account 4471: is Maria an owner or a named signatory, and is $500 within her daily limit? A perfect ID card doesn't open your neighbour's account. And the ID check happens once per visit, the account check for every withdrawal.

  • the ID card → credentials: a password, a passkey, a code from your phone
  • checking it → authentication, which ends in an identity: "this is user 7"
  • the account's signatories → permissions attached to the data: who may see or change this order
  • the daily limit → rules on attributes: amount, time, country
  • "staff only" behind the counter → roles: admin, support agent, customer
  • account 4471 → the object being asked for, such as order 42