He left in September
Harry worked in the college finance office until September. In November his account can still raise payments. Nobody meant it: the people team updated their list, and the finance app never heard.
Signing in proves who someone is. What they may then do is authorisation, and it drifts as people join, move and leave. An access review is how an organisation finds the drift and fixes it.
By the end of this lesson
Note
I can run an access review and say what to do about each finding.
Key words
| Word | What it means | Example |
|---|---|---|
| Role | a named set of rights given to people who need them | teacher |
| Least privilege | giving each account only the rights its work needs | |
| Leaver | someone who no longer works for the organisation | |
| Dormant account | an account or grant nobody has used for a long time | |
| Separation of duties | splitting a risky task so no one person does all of it | |
| Access review | a regular check of who can reach what |
The cells students fill in are left blank in this preview.
Starter
Have a go
Starter
3 questionsRoles turn people into rights
Most apps grant rights through a role: teacher, editor, admin. A person gets the role their job needs, and the app checks the role, not the name. This is role-based access control.
Least privilege says each account holds only what its work needs, for only as long as it needs it. Every extra grant is something an attacker can use if that account is taken. The lab's review data is Northfield College's people list and every app's grants.
See what the review covers
docker exec tools python3 steps/review.py summaryShown here, not run. Press Start lab to type it into your own lab’s terminal.
Check
Have a go
Check
3 questionsJoiners, movers and leavers
Access drifts at three moments. A joiner gets roles. A mover changes team and keeps the old team's roles as well as the new. A leaver goes and some app still holds their account. Unused grants pile up and become dormant.
An access review compares two lists: who works here and in which team, and who holds which role in each app. review.py also checks separation of duties: nobody should both raise and approve a payment.
Run the access review
docker exec tools python3 steps/review.pyShown here, not run. Press Start lab to type it into your own lab’s terminal.
Worked example: five kinds of finding
| Kind | Example the review printed | What it means |
|---|---|---|
| leaver | harry finance/raise-payment | He has left, the grant stayed |
| wrong team | isla finance/raise-payment | A computing teacher holds a finance role |
| dormant | kemi marks/teacher, 162 days | A grant nobody uses |
| no owner | backup-bot idp/admin | An admin account no person owns |
| conflict | gita raise-payment+approve-payment | One person can pay herself |
The cells students fill in are left blank in this preview.
Check
Have a go
Check
3 questionsTry it: when is a grant dormant?
from datetime import date
today = date(2026, 11, 20)
last_used = {"isla finance": date(2026, 3, 2), "kemi marks": date(2026, 6, 11),
"ben marks": date(2026, 11, 20)}
limit = 90
for grant, day in last_used.items():
idle = (today - day).days
print(grant, idle, "days", "DORMANT" if idle > limit else "in use")
# A college reviews every 30 days instead. Set limit = 30: does the answer change?
Make a free account to save your work and track your progress.
A common mistake
Warning
Many people think removing a leaver from the identity provider removes all their access. Apps that keep their own accounts, API keys and shared admin logins survive it. Review each app's grants as well as the provider's accounts.
Every finding gets an owner and a decision
A review is only worth its follow-up. Remove a leaver's grants the same day, and disable before you delete so a mistake can be undone. Ask a mover's new manager which old roles to keep. Remove a dormant grant and let the person ask again.
Give a shared account a named owner or replace it with a service identity. Split a conflict between two people. Record each decision: the record is the evidence an auditor asks for.
Worked example: deciding each finding
| Finding | Decision | Who decides |
|---|---|---|
| jonas idp/admin, leaver | Disable today, delete after 30 days | IT, at once |
| kemi marks/teacher, wrong team and dormant | Remove | Her manager |
| gita raise and approve | Remove approve-payment | The head of finance |
| backup-bot idp/admin | Name an owner, narrow the role | IT |
The cells students fill in are left blank in this preview.
Check
Have a go
Check
3 questionsMake the review smaller next time
Single sign-on helps: disabling one account at the provider closes every app that trusts it. Automatic provisioning, for example over SCIM, creates and removes app accounts from the people list. Roles tied to teams move with the person.
Reviews then become regular and short. Many organisations ask managers to confirm their teams' access every quarter, and review admin roles more often.
Assignment: write the access review
Write review(people, grants, today, owners). people maps an email to {"team": ..., "status": "active" or "left"}. grants is a list of dictionaries with email, app, role and last_used (a date). owners maps a role to the set of teams it belongs to. Return a list of findings, each a tuple (kind, email, what).
Go through the grants in order, with what as app + "/" + role. Add "no owner" if the email is not in people; else "leaver" if the status is left; else "wrong team" if the team is not in owners[role]. Then, for an active person only, add "dormant" if the grant is unused for more than 90 days.
Last, for each email in sorted order holding both raise-payment and approve-payment, add ("conflict", email, "raise-payment+approve-payment").
def review(people, grants, today, owners):
return []
Make a free account to save your work and track your progress.
Exit quiz
Have a go