← Security and privacy

Who are you, and what may you do?

Access control has two parts. Authentication proves who you are (a password, and with multi-factor sign-in a code from your phone too). Authorisation (permissions) then decides what you may do. Give each role only what its job needs: least privilege.

You and your teacher both sign in to the same school system. Why can your teacher change marks and you can't?

On a shared system (a school portal, a company network), access control decides who gets in and what they may do. It has two separate parts:

PredictRead the problem and decide what you think before you try anything. A wrong guess is fine: it shows you what to look for.

Signed in, but…

Sam the student signs in with the right password, then tries to change the class marks. What happens?

TryTry it on the board and compare the result with your prediction.

Try: sign in and try

Was your prediction right? Now sign in as Ms Lee and try the same.

Try it yourselfYour edits are saved in this browser.

Sign in as Sam (password maple) and try to change Marks. Then read Marks.

Use the board. This ticks when you get there.

InvestigateWork out why it happens, one step at a time.

Worked example: two checks

Worked exampleBefore each step, say what you think comes next.
  1. Sam types "maple"\text{Sam types "maple"}Authentication: is the password right for Sam?

Now name the authentication step.

Which is **authentication**?

Sam explains what signing in allows. Click the line where it first goes wrong.

Why add a code from a phone (multi-factor sign-in)?

ModifyChange the problem on purpose and see what happens.

Vary: one change at a time

Try it yourselfYour edits are saved in this browser.

Sign in as Ms Lee (password orbit) and change Marks.

Use the board. This ticks when you get there.

Sign out, then try to sign in as Ms Lee with a wrong password, and change Marks.

Use the board. This ticks when you get there.

Turn on multi-factor sign-in and sign in as Ms Lee with her password and the code 4096.

Use the board. This ticks when you get there.

Admins can change Settings but only read Marks. Why not let admins change everything?

PractiseA few on your own, to check you have it.

Access control

Authentication (who are you?) or authorisation (what may you do?)

Typing a password
A fingerprint unlock
A code from an app on your phone
Students may read but not change Marks
Only the class teacher can open the gradebook
A shared folder set to view only

Which password is strongest?

Review: what does DNS do?

MakeMake your own problem using what you have learned. Expect a few tries; that is normal.

Least privilege

Then: which account would an attacker most want to steal, and how would you protect it?

Try it yourselfYour edits are saved in this browser.
Need a hint?

Students: change their homework, read their marks, no settings.

Another hint

Teachers: change homework and marks, no settings.

Another hint

Admins: read homework and marks, change settings.

This table gives everyone too much. Click cells to set least privilege: students change Homework, read Marks, nothing in Settings; teachers change Homework and Marks, nothing in Settings; admins read Homework and Marks, change Settings.

Use the board. This ticks when you get there.

For teachers

Students sign in as different users, try to read and change files, switch on multi-factor sign-in and fix a permissions table, to distinguish authentication from authorisation and apply least privilege (AC9TDI10K01 node 3). About 40 minutes.

Open the teacher guide: answers, solutions, slides and a worksheet.

Students will be able to

Before class

Try the board yourself. The practice accounts are on the board (Sam: maple, Ms Lee: orbit, Admin: quartz-river-71; MFA code 4096); they are made up and only work here.

The one idea (the kit's typical width): authentication proves identity, authorisation decides actions; both are needed on a shared system. Least privilege limits the damage from a stolen or misused account.

Real-world link: the school's own systems (who can see what in the learning management system); avoid showing real accounts.

Running the lesson

  1. Predict: students who chose "it works" hold Sam's misconception.
  2. Try: ask what was checked first, and what second.
  3. Worked example: map each line to authentication or authorisation.
  4. Vary: ask what an attacker would need with MFA on.
  5. Make: ask why admins don't get to change marks.

The hard part (on purpose)

Students treat "signed in" as "allowed". Keep asking two questions in order: who are you? what may you do?

When students get stuck

Stretch and support

Stretch: Some systems use roles (teacher, student) and some give permissions to each person. What are the trade-offs for a school?

Support: Two questions on the board: Who are you? (authentication) What may you do? (authorisation).

Where it leads

Next: Hashes and keys (how passwords are stored and secrets shared).

Links: Secret messages' challenge and response is another way to prove who you are.

What each step is for

Now you can
Next lesson4. Hashes and keysGood sites never store your password. They store a hash: a one-way scramble that is always the same for the same password, so a login can be checked, but can't be turned back. A salt makes the same password hash differently for each person. Public key encryption works like an open padlock: anyone can lock a message with it, but only the owner's private key opens it.