Mastering Broken Access Control
Access Control Basics
Controlling the Gates
Think about the keys on your keychain. You have a key for your house, a key for your car, and maybe one for your office. Each key grants you specific access. You can't use your car key to open your front door, and your house key won't start your car. This is the basic idea behind access control in the digital world.
Access control is a fundamental security practice that regulates who can view or use resources in a computing environment. It's a system of rules that dictates which users get access to which information, and what they're allowed to do with it. Without it, anyone could read your private emails, access sensitive company files, or alter important data.
Access control is about making sure that users can only do what they’re supposed to do—nothing more, nothing less.
The goal is to minimize risk by ensuring users have access only to what's necessary for their tasks. This is guided by a core concept that underpins all secure access control systems.
The Principle of Least Privilege
Imagine you're valet parking your car. You hand the attendant the key, but it's a special valet key that can only start the car and lock the doors. It can't be used to open the trunk or the glove compartment where you might keep valuables. The valet is given the least possible privilege needed to do their job: parking the car.
This is the principle of least privilege (PoLP). It's a simple but powerful security concept: a user should only have the absolute minimum permissions required to perform their specific job functions. A marketing intern doesn't need access to payroll records, and a software developer probably doesn't need to see customer sales data. By limiting access, you drastically reduce the potential damage from a compromised account or a simple mistake.
The principle of least privilege is simple: Only give users the absolute minimum level of access needed to do their jobs.
Applying this principle isn't just a suggestion; it's the foundation for building secure systems. To put it into practice, organizations use different frameworks or models to manage permissions systematically. Two of the most common are Role-Based Access Control and Discretionary Access Control.
Models for Managing Access
Instead of assigning permissions to hundreds or thousands of individual users one by one, which would be chaotic, organizations use access control models to manage permissions efficiently and consistently.
Role-Based Access Control (RBAC)
noun
A method of restricting network access based on a person's role within an organization. Permissions are assigned to roles, and users are assigned to those roles.
In RBAC, access isn't given to people; it's given to roles. Think of a hospital. There are roles like 'Doctor,' 'Nurse,' and 'Receptionist.'
- Doctors can view patient medical histories and prescribe medication.
- Nurses can view patient charts and administer medication prescribed by a doctor.
- Receptionists can view appointment schedules but not detailed medical histories.
When a new doctor, Jane, is hired, she is simply assigned the 'Doctor' role. She automatically inherits all the permissions associated with that role. If Jane leaves, the role is unassigned from her account, instantly revoking all her access. This approach is efficient, scalable, and makes auditing access rights much simpler.
Another common model works a bit differently, giving more control to the people who create and own the data.
Discretionary Access Control (DAC)
noun
An access control model where the owner of a resource is given the discretion to determine who is authorized to access it.
With Discretionary Access Control (DAC), the owner of a file or resource has the power to decide who can access it. If you've ever shared a document from a cloud drive like Google Drive or Dropbox, you've used DAC. You, the owner, can grant 'view' or 'edit' permissions to specific people by entering their email addresses.
This model is flexible and user-friendly, but it can become difficult to manage in large organizations. If every employee controls access to their own documents, it's hard for a central administrator to ensure that company-wide security policies are being followed consistently. A single user could accidentally grant sensitive data access to the wrong person.
| Feature | Role-Based Access Control (RBAC) | Discretionary Access Control (DAC) |
|---|---|---|
| Who controls access? | System Administrator | Resource Owner |
| Basis for access? | User's job function or role | Owner's discretion |
| Best for... | Large organizations with defined roles | Small teams or individual collaboration |
| Scalability | High | Low |
Understanding these fundamental concepts is the first step in recognizing why access control is so critical. When these models are implemented incorrectly or not at all, it creates major security holes that can be exploited.
What is the primary goal of access control in a computing environment?
The Principle of Least Privilege (PoLP) is best described by which of the following scenarios?
With a solid grasp of these principles, we can begin to explore what happens when access control goes wrong.