Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

6.11 (3 of 4): Choosing how to give access

The whole lesson, free. Read it and have a go at the activities. To work the tasks and labs in the real lesson, press Start lab, with no account needed.

45 minutes

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

Three systems, three needs

A school app, a shop and a hospital all keep data. All three must let the right people in.

The school app lets parents see homework. The shop lets a partner company check stock. The hospital lets a doctor read a patient file, but only on the ward.

The needs are different. So the method of access must be different too.

Key words

WordWhat it meansExample
PlatformA kind of system that uses the data.An app and a website
RBACRole-based access control: permissions belong to roles.Doctors may read files
RuBACRule-based access control: a rule about time or place decides.Only on the ward
APIA door that lets one program ask another for data.A stock check by a partner
Sensitive dataData that could harm a person if the wrong people see it.Health records
Access requirementWhat a job needs: who, how often, how safe.Only on the ward

The cells students fill in are left blank in this preview.

Benefits and drawbacks of each method

MethodBenefitDrawback
RBACSimple. Easy to give a new person the right access.Not flexible. Too many roles become a mess.
RuBACFlexible. Can use time, place or device.Rules are hard to write and to test. A wrong rule locks out the right person.
APIOne safe door for many platforms. The data stays in one place.Takes time to build. A weak API is a risk for all platforms.

The cells students fill in are left blank in this preview.

Quick check: benefit or drawback?

Have a go

Quick check: benefit or drawback?

4 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Start with the need

Before you pick a method, ask four questions.

Who needs the data? How many platforms use it? How sensitive is it? Do you need a rule about the time or the place?

The answers point to the method. This is how you make a judgement.

Three systems and what they need

SystemWho needs itPlatformsSensitive?Rule needed?
School appParents, teachers, studentsPhone and websiteSomeNo
Shop stockStaff, a partner companyWebsite, partner systemNoNo
Hospital filesDoctors, nursesWard screens, phonesVeryYes: only on the ward

The cells students fill in are left blank in this preview.

Picking the methods

A flowchart: from "Start with RBAC" to "Need a time or place rule?", where yes leads to "Add RuBAC" and no to "Many platforms?"; "Add RuBAC" also leads to "Many platforms?", where yes leads to "Add an API" and then "Done", and no leads to "Done".A flowchart: from "Start with RBAC" to "Need a time or place rule?", where yes leads to "Add RuBAC" and no to "Many platforms?"; "Add RuBAC" also leads to "Many platforms?", where yes leads to "Add an API" and then "Done", and no leads to "Done".

Match the need to the method

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Watch: choosing how to give access

Press Play on the short film below. It starts with three systems that keep data. Then it shows the three methods, a benefit and a drawback of each, the school app's need, and one myth.

Film: Choosing how to give access

Choosing how to give access

Every scene, as text

  1. Three systems, three needs. A school app, a shop and a hospital (all three: keep data). All three must let the right people in. The needs are different, so the method of access must be different too.
  2. The three methods: RBAC, RuBAC and API. RBAC: permissions belong to roles (stands for: role-based access control). RuBAC: a rule about time or place decides (stands for: rule-based access control). API: a door that lets one program ask another for data.
  3. Benefits and drawbacks of each method. RBAC (benefit: easy to give a new person access; drawback: too many roles become a mess). RuBAC (benefit: can use time, place or device; drawback: rules are hard to write and test). API (benefit: one safe door for many platforms; drawback: takes time to build).
  4. Start with the need: the school app. Every system starts with RBAC. Who needs it: parents, teachers, students (so: RBAC, the roles decide). Platforms: phone and website (so: an API, both use the same door). Sensitive? Some. Rule needed? No (so: no RuBAC).
  5. Myth (false): use an API for everything. That is not true: an API has drawbacks. An API (drawback: takes time to build; drawback: a weak API risks all platforms). Teachers may edit marks but students may only read them (so: RBAC, the roles decide).

Extra: Two more ideas you may hear

IdeaWhat it isBenefitDrawback
Direct accessA program or person connects to the data store itself.Fast and simple for one trusted program.Risky. Anything that connects can see everything.
Audit logA record of who looked at or changed data, and when. For example: Dr Khan read file 12 at 10:15.You can find out who saw sensitive data.It shows misuse after it happens. It does not stop it.

The cells students fill in are left blank in this preview.

Your turn: suggest the methods

Two steps. Read the comments in the starter for the exact rules. 1. suggest_methods gets two facts about a system and gives back a list of access methods. 2. risk_level rates the risk as "high", "medium" or "low". Press Run Tests to check your work.

Code: python
def suggest_methods(many_platforms, needs_rule):
    # Give back a list of access methods for a system. Use this order:
    #   "RBAC"       always (every system gives permissions by role)
    #   "RuBAC"      if needs_rule is True (a time or place rule is needed)
    #   "API"        if many_platforms is True (a phone app, a website, partners)
    return []


def risk_level(sensitive, many_platforms):
    # "high" if the data is sensitive AND many platforms use it.
    # "medium" if only one of those is True.
    # "low" if neither.
    return ""

Make a free account to save your work, or press Start lab to work through the whole lesson.

Give your advice in writing

A college builds an app for school trips. Parents use a phone app. Teachers use a website. A bus company must see the list of students on its bus. The list has names and medical notes. Say which access methods you would use and why. Write at least eight sentences. Include one benefit and one drawback of your choice.

A teacher marks this in a college. Nothing you write here is kept: it goes when you leave the page.

Make a free account to save your work, or press Start lab to work through the whole lesson.

Key words crossword

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Final check

Have a go

Final check

5 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Remember

Important

Start with the need: who, how many platforms, how sensitive, which rules. RBAC for roles, RuBAC for rules, an API for many platforms.

Teach this lesson with your class

On a college account your students work the tasks and the labs as well, and every mark is kept for you.