OpenCyber Academy
Bachelor's · Chapter 6 · English
Course code: OCA-102Chapter 06: OCA-102-C006

Chapter 6 — Discrete structures

Open, free learning for anyone who wants to protect people and technology. No account is required to read this text or its worked answers.

Permanent link

Public activity · 30d

—Participating browsers

—Page views

—Reading sessions

—Exercise opens

Counts reflect browsers that allowed analytics. A reading session requires 30 seconds on a visible page. Browsers are not people.

Learning outcomes

You will (1) describe users, groups and permissions as sets; (2) use set operations to compare lists; (3) draw relations as tables.

6.1 Sets of accounts

A set is a collection of distinct items. Greenhill's current staff from HR form one set; enabled accounts in the office suite form another. Comparing the two sets answers practical questions. Accounts in the second set but not the first belong to nobody currently employed, which may mean leavers. Staff in the first set but not the second may be new starters waiting for an account. Elena uses set difference, a basic operation, to turn a vague worry about leftover accounts into a precise list to check.

6.2 Groups and permissions

Access is often given through groups: everyone in the housing-officers group can open tenant records. Each group is a set of users, and each permission is linked to groups. A person's access is the union of the permissions of all their groups. When someone is in several groups, their combined access can be more than anyone intended. Elena writes groups and their permissions as a simple table, then computes each person's combined access so it can be compared with what their job requires.

6.3 Relations as tables

A relation connects items from two sets, such as which users belong to which groups. Writing it as a table, with users as rows and groups as columns and a mark where a user belongs, makes patterns easy to see. A row with many marks may be a person who has collected access over years. A column with very few marks may be a group nobody uses. Elena finds such tables easier to discuss with managers than lists, because managers can quickly spot what looks wrong for their team.

Worked example

In a January export, set difference between 140 synthetic HR staff and 147 enabled accounts finds seven accounts with no current employee and none missing.

Synthetic case. Staff, accounts and groups are synthetic.

Errors and limits

Reviewing group names without computing each person's combined access misses access gathered through several groups.

Exercises

  • EX016 — Leftover accounts. Which set operation finds accounts with no current employee?
    Show marking criteria
    Rubric: 3 = enabled accounts minus HR staff;; 2 = difference;; 1 = union;; 0 = none.
  • EX017 — Combined access. How is a person's access computed from groups?
    Show marking criteria
    Rubric: 3 = union of their groups' permissions;; 2 = union;; 1 = intersection;; 0 = none.
  • EX018 — Leftover count. How many accounts with no current employee does the worked example find?
    Show marking criteria
    Rubric: 3 = seven;; 2 = 7;; 1 = vague;; 0 = none.

Synthesis

Sets, unions and relation tables turn account and group lists into clear questions about access.

Continue studying — chapter 06 of 40

← Chapter 05 (draft) · Course chapter index · Chapter 07 (draft) →

Practice the exercises

Open a prompt, write your response, then compare it with the worked answer. Five-choice practice appears where a reviewed question is available.

EX016

Opens in 30 days: — · browsers: —

Checking for a reviewed five-choice question…

EX017

Opens in 30 days: — · browsers: —

Checking for a reviewed five-choice question…

EX018

Opens in 30 days: — · browsers: —

Checking for a reviewed five-choice question…

Worked answers

EX016. Set difference: enabled accounts minus current HR staff.

EX017. As the union of the permissions of all their groups.

EX018. Seven.