Chapter 7 — Access governance
Lesson map
Lesson 07 published. Map, example, EX031.
flowchart TD
N0["Learning outcomes"]
N1["7.1 Why review access"]
N2["Lab — Stale and unapproved accounts on a synthetic s"]
N3["7.2 Results"]
N4["7.3 Acting on results"]
N5["7.4 Making it recurring"]
N0 --> N1 --> N2 --> N3 --> N4 --> N5
N5 --> EX["Worked example"]
EX --> Q["Exercise EX031"]
Logical drawing
flowchart LR
N0["Learning outcomes"]
N1["7.1 Why review access"]
N2["Lab — Stale and unapproved accounts on a synthetic s"]
N3["7.2 Results"]
N4["7.3 Acting on results"]
N5["7.4 Making it recurring"]
N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> Q["EX031"]
[Learning outcomes]
|
v
[7.1 Why review access]
|
v
[Lab — Stale and unapproved accounts on a synthetic s]
|
v
[7.2 Results]
|
v
[7.3 Acting on results]
|
v
[7.4 Making it recurring]
|
v
[Worked example] --> [Exercise EX031]
Learning outcomes
You will (1) review access to a governed data set; (2) find stale and unapproved accounts; (3) set up recurring owner reviews.
7.1 Why review access
Access to the shipment data set has grown over years as staff joined, changed roles and left. IT grants access on request, often without asking the owner. Lucía explains that every unnecessary account increases the chance of misuse or a compromised password exposing customer and driver details. She proposes a review that the operations director, as owner, will approve, comparing each account's last use and approval record against agreed rules for who should have access. The owner approves the review plan within a week.
Lab — Stale and unapproved accounts on a synthetic shipment data set
"""Review access to a synthetic shipment data set: stale and unapproved accounts (stdlib only)."""
import random, datetime as dt
random.seed(5)
today = dt.date(2026, 3, 31)
acc = []
for i in range(240):
last = today - dt.timedelta(days=min(400, int(random.expovariate(1/45))))
approved = random.random() > 0.07
acc.append((f"u{i:03d}", last, approved))
stale = [a for a in acc if (today - a[1]).days > 90]
unapp = [a for a in acc if not a[2]]
both = [a for a in stale if not a[2]]
print(f"accounts {len(acc)}; unused over 90 days {len(stale)} ({100*len(stale)/len(acc):.1f}%)")
print(f"no owner approval {len(unapp)}; stale and unapproved {len(both)}")
Run with python3 lab_access.py. Verified output:
accounts 240; unused over 90 days 30 (12.5%)
no owner approval 17; stale and unapproved 2
7.2 Results
The lab reviews 240 synthetic accounts with a reference date of 31 March 2026. Thirty accounts, 12.5 percent, have not been used for more than ninety days. Seventeen have no record of owner approval. Two accounts are both stale and unapproved, making them the highest priority for removal, since nobody approved them and nobody seems to use them. Lucía notes that stale and unapproved accounts are different problems with different fixes, so she reports them separately. Lucía shares the lists with the operations director the same day for decisions.
7.3 Acting on results
The operations director reviews the list. Stale accounts are disabled after their holders' managers confirm no need; three are kept for staff on long leave, with a note and an expiry date. Unapproved accounts are reviewed one by one: most are legitimate and receive retrospective approval, while a few belong to contractors whose work ended, and these are removed. The two accounts in both groups are removed immediately. Each decision is recorded with its reason. The review takes three weeks to complete in full.
7.4 Making it recurring
Lucía proposes quarterly access reviews for the shipment data set and twice-yearly reviews for less sensitive sets. IT changes the request process so that new access requires owner approval, recorded automatically. Leavers' accounts are disabled through the human resources leaver process. Dr. Achebe notes that one-off clean-ups decay quickly, and that sustainable access governance depends on changing the processes that created the problem as well as fixing its current state. The first quarterly review after these changes finds far fewer stale accounts, which suggests that the process changes are working.
Worked example
Lucía reviews 240 accounts, finding 30 unused over ninety days (12.5 percent), 17 unapproved and 2 in both groups, has the owner act on each with recorded reasons and makes reviews and approvals recurring.
Synthetic case. Accounts are synthetic; outputs come from lab_access.py.
Errors and limits
Clean-ups without process changes decay quickly.
Exercises
- EX031 — Stale share. What share of accounts were unused over ninety days? Rubric: 3 = 12.5% (30 of 240);; 2 = partly correct;; 1 = partial;; 0 = none.
- EX032 — Highest priority. Which accounts were highest priority? Rubric: 3 = the two both stale and unapproved;; 2 = partly correct;; 1 = vague;; 0 = none.
- EX033 — Long-leave handling. How were long-leave accounts handled? Rubric: 3 = kept with a note and expiry date;; 2 = partly correct;; 1 = vague;; 0 = none.
- EX034 — Request change. How did IT change the request process? Rubric: 3 = new access requires recorded owner approval;; 2 = partly correct;; 1 = vague;; 0 = none.
- EX035 — Leaver control. How are leavers' accounts handled? Rubric: 3 = disabled through the HR leaver process;; 2 = partly correct;; 1 = vague;; 0 = none.
Continue studying — lesson 07 (chapter 07 of 12)
← Chapter 06 · Course chapter index · Chapter 08 →
Continue to the next authored lesson.