← Years 9–10 Digital Systems

Authentication vs authorisation

Authentication checks who you are, like logging in. Authorisation decides what you can do once you are known, like which files you can open. Authentication always comes first.

Understanding Authentication vs authorisation in Years 9–10 Digital Systems

What it does: The system must confirm who the user is (login_ok) before it can check what that user is allowed to do. Both users proved who they are, but their accounts have different permissions. The teacher can do more once identified. Authentication proves your identity. Deciding what you can open is authorisation. The fix is to say that a password login is authentication. Authorisation happens after, when permissions are checked.

Common mistakes: Logging in is authentication, which checks who you are using a password. canOpen is an authorisation idea (what you can do). Line 2 should be ok ← checkPassword(user, pw). The login failed message should show when authentication fails, meaning user is NULL. With ≠ it would show for people who logged in correctly. Line 2 should be IF user = NULL THEN.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 13–24) and word search (Modules 13–40).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which one describes authentication?
Checking who you are, such as logging in with a username and passwordDeciding which files you are allowed to open
Matches
Logging in with a password = authorisation
↓
Logging in is authentication, not authorisation. It proves who you are and does not decide what you can do.
Applying
Meanings
Term
Authentication vs authorisation
Meaning
Authentication checks who you are, like logging in. Authorisation decides what you can do once you are known, like which files you can open. Authentication always comes first.
Practice
IF password = stored_password THEN
Testing
Gaps
step1 ←
Check Answer
Spots
1user ← 'student1'
2ok ← canOpen(user, pw)

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Leopard' badge — Savannah Perfectionist, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which one describes authentication?
A. Deciding which files you are allowed to open
B. Checking who you are, such as logging in with a username and password ✓
Authentication proves your identity. Deciding what you can open is authorisation.
2. Which one describes authorisation?
A. Deciding what an identified user is allowed to do ✓
B. Checking that a user really is who they say they are
Authorisation sets what a known user can do, like which files they can open, edit or delete.
3. Which step always comes first?
A. Authorisation, then authentication
B. Authentication, then authorisation ✓
The system must know who you are before it can decide what you are allowed to do.
4. Mia types her username and password to get into the school network. What is this?
A. Authentication ✓
B. Authorisation
Logging in proves identity, so it is authentication.
5. Mia is logged in, but she gets the message 'Access denied' when she tries to open the teachers' marks folder. What is this?
A. Authorisation ✓
B. Authentication
The system knows who Mia is. It has decided she is not allowed to open that folder, so this is authorisation.

Match the Pairs

login(username, password) → Authentication: the system checks who you are
if role == "teacher": open(marks) → Authorisation: the system decides what you can open
Authentication always comes first, then authorisation → if login_ok: check_permissions()
A student account and a teacher account are both authenticated but have different authorisation → student: read only | teacher: read, write
Logging in with a password = authorisation → Logging in is authentication, not authorisation. It proves who you are and does not decide what you can do.
if can_open(file): login(user) → The order is wrong. Authorisation is checked before the user has been authenticated.

Key Term

Authentication vs authorisation
Authentication checks who you are, like logging in. Authorisation decides what you can do once you are known, like which files you can open. Authentication always comes first.

Fill in the Blanks

1. step1 ← authentication step2 ← authorisation
Hint: Type the process that checks who you are, which always happens first.
2. step1 ← authentication step2 ← authorisation
Hint: Type the process that decides what the user may do once they are identified.
3. IF account = "teacher" THEN allow ← true ELSE allow ← false
Hint: Type the keyword that covers every other account, such as a student account.
4. authentication ← step 1 authorisation ← step 2
Hint: Type the step number that shows authentication comes before authorisation.
5. user ← login(name, password) IF user.role = "teacher" THEN open(file)
Hint: Type the function name for the step where a person proves who they are.

Spot the Error

Question 1
A user ← 'student1'
B ok ← canOpen(user, pw)
C IF ok THEN
D show('Welcome')
E END IF
Line B — Logging in is authentication, which checks who you are using a password. canOpen is an authorisation idea (what you can do). Line 2 should be ok ← checkPassword(user, pw).
Question 2
A user ← login(name, pw)
B IF user ≠ NULL THEN
C show('Login failed')
D STOP
Line B — The login failed message should show when authentication fails, meaning user is NULL. With ≠ it would show for people who logged in correctly. Line 2 should be IF user = NULL THEN.
Question 3
A user ← login(name, pw)
B IF user = NULL THEN STOP
C role ← getRole(user)
D IF role = 'student' THEN
E open('marks.xlsx')
Line D — Authorisation decides what each account may do. A student account should not open the teacher's marks file. Line 4 should check that role = 'teacher'.
Question 4
A authorise(user, pw)
B authorise(user, 'marks.xlsx')
C open('marks.xlsx')
Line A — Authentication always comes first and checks identity using a password. Authorisation is for checking file access. Line 1 should be authenticate(user, pw).
Question 5
A account ← 'teacher'
B canEdit ← FALSE
C IF account = 'teacher' THEN
D canEdit ← TRUE
Line A — The program is about a student account, which is not authorised to edit. Setting the account to 'teacher' wrongly gives it editing rights. Line 1 should be account ← 'student'.

Student with a class code? Join your class →