Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1assign(user: mia, role: student) | AMia is given the admin role even though she is a student, so she gets far more access than she needs. | |
| 2role: teacher -> read, write | Brole: student -> read | |
| 3Changing a user's role changes what they can access | CGives the user Mia the student role, so she gets all the access that the student role has | |
| 4Permissions are given to a role, not directly to each user on a school network | Dassign(user: sam, role: admin) | |
| 5permission: write -> user: mia permission: write -> user: leo permission: write -> user: zoe | EDefines the permissions that belong to the teacher role, so anyone with this role can read and write | |
| 6assign(user: mia, role: admin) // Mia is a student | FPermissions are given to each user one at a time instead of to a role. This is slow and easy to get wrong when many users need the same access. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Role-based access control (RBAC) — A way to manage access by giving permissions to roles, like student, teacher or admin, then assigning each user a role. Changing a user's role changes what they can access.role teacher = [read, write]
role student = [read]role student = [read]
assign Mia to studentassign Sam to student
assign Sam to teacher
Sam can now read and writeif user.role == "admin":
allow(execute)role admin = [read, write, execute]
assign Tech_Kim to admin