Computer Science Grade 10 20 min

8. Authentication and Authorization: Controlling Access to Resources

Learn about authentication and authorization mechanisms for controlling access to network resources.

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Differentiate between authentication (proving identity) and authorization (granting permissions). Identify and explain the three main factors of authentication: something you know, something you have, and something you are. Define Role-Based Access Control (RBAC) and model a simple system using roles and permissions. Analyze a login scenario to trace the flow of authentication and authorization. Explain the Principle of Least Privilege and its importance in system security. Describe the purpose of a session in maintaining a user's logged-in state across multiple web pages. Ever wonder how your school portal knows you're a student who can see grades, but your teacher is an instructor who can enter them? 🔑 Let's unlock the digital gates! Th...
2

Key Concepts & Vocabulary

TermDefinitionExample AuthenticationThe process of verifying the identity of a user, system, or service. It answers the question, 'Who are you?'.Entering your username and password on a website. The system checks if the password matches the one stored for that username to confirm your identity. AuthorizationThe process of determining if an authenticated user has the necessary permissions to access a specific resource or perform an action. It answers the question, 'What are you allowed to do?'.After logging in, a 'student' user can view their own grades, but they are not authorized to view the grades of other students. CredentialsThe secret information used to verify a user's identity during authentication.A username/password combination, a PIN, a securit...
3

Core Syntax & Patterns

The AAA Framework 1. Authentication (Who are you?) -> 2. Authorization (What can you do?) -> 3. Accounting (What did you do?) This is the fundamental sequence for secure access control. A system must always verify a user's identity (authenticate) before checking what they are allowed to do (authorize). The third step, accounting, involves logging actions for auditing purposes. Principle of Least Privilege Grant a user account only the minimum permissions required to perform its specific tasks. Use this principle when designing user roles. It limits the potential damage if an account is compromised. For example, a user whose only job is to write blog posts should not have permission to delete the entire database. Authorization Check Logic (Pseudo-code) IF use...

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Challenging
In the school library database, a new requirement is to allow a specific group of 'Student' users, who are 'Teacher Assistants', to check books in and out for other students—a permission currently only for the 'Librarian' role. According to the Principle of Least Privilege, what is the BEST way to implement this?
A.Create a new role 'TeacherAssistant' with only the 'check_in_out' permission and assign it to those specific students.
B.Give the 'Librarian' role to the Teacher Assistants.
C.Add the 'check_in_out' permission to the general 'Student' role for all students.
D.Tell the Teacher Assistants to share the login credentials of a Librarian.
Challenging
A system is designed where authorization is handled on the client-side (e.g., in JavaScript). After a user logs in, the server sends the user's role ('Admin' or 'User'). The JavaScript code then checks this role and decides whether to show the 'Delete Database' button. What is the fundamental security flaw in this design?
A.The server has to send extra data, which is inefficient.
B.malicious user can modify the client-side JavaScript or intercept the server's response to change their role to 'Admin' and gain access to the button.
C.This design does not allow for Multi-Factor Authentication.
D.The user's role might be spelled incorrectly in the JavaScript code.
Challenging
A company uses RBAC with roles: 'Employee' (view documents), 'Manager' (view/edit documents), and 'Director' (view/edit/publish documents). An employee, Alice, is promoted to Manager. Later, she is also assigned a temporary project role, 'Auditor', which has read-only access to all documents. How should the system handle her permissions?
A.Replace her 'Manager' role with the 'Auditor' role.
B.The system should combine the permissions from both 'Manager' and 'Auditor' roles, giving her the union of all permissions.
C.The system should only apply the permissions of the most restrictive role ('Auditor').
D.The system should ask her which role she wants to use each time she logs in.

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from IV. Network Security: Protecting Data in a Connected World

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.