Mastering Broken Access Control
Access Control Basics
What Is Access Control?
Think of access control as the digital equivalent of a bouncer at a club. The bouncer's job is to check IDs and make sure only the right people get inside. In the digital world, access control systems manage who can see, use, or change resources on a computer or network. It’s the gatekeeper for your data.
Access control is a vital component of security strategy because it helps keep sensitive information from falling into the hands of bad actors.
This process ensures that sensitive files are kept confidential, that users can't accidentally delete important system files, and that company financial records are only seen by the finance team. At its core, access control answers two simple questions:
- Who are you? (Authentication)
- What are you allowed to do? (Authorization)
You have to prove your identity before the system can decide what you have permission to access.
Authentication
noun
The process of verifying that a user is who they claim to be. This is typically done with a password, a fingerprint, or a security token.
Once you're authenticated, the system needs to figure out what you're allowed to do.
Authorization
noun
The process of determining what an authenticated user is permitted to do. It defines the specific files, data, or applications a user can access and what actions they can perform.
The Principle of Least Privilege
A core idea behind all effective access control is the principle of least privilege. It’s a simple but powerful concept: a user should only have the bare minimum permissions required to perform their job functions.
The principle of least privilege means a user should only have access to the data, resources, and applications needed to complete a required task.
Imagine a cashier at a grocery store. They need access to the cash register to do their job, but they don't need the keys to the manager's office or the combination to the main vault. Giving them access to those areas would create unnecessary risk. The same logic applies to digital systems. By limiting access, you reduce the potential damage from accidents, errors, or security breaches.
Models of Access Control
Systems don't just randomly grant permissions. They follow specific sets of rules, or models, to manage who gets access to what. Let's look at three of the most common models.
Discretionary Access Control (DAC) is the most flexible model. In a DAC system, the owner of a resource gets to decide who can access it. If you create a document, you are its owner. You have the discretion to grant read or edit permissions to your colleagues.
This is the model used by most consumer operating systems like Windows and macOS. While it's easy to manage for personal use, it can become chaotic in large organizations where tracking who has access to what becomes difficult.
Mandatory Access Control (MAC) is the strictest model. Access isn't determined by resource owners, but by the system itself based on security labels. The system administrator assigns a classification (like Confidential, Secret, or Top Secret) to every resource and a clearance level to every user.
A user can only access a resource if their clearance level is equal to or higher than the resource's classification. You see MAC in environments where security is paramount, like military and government systems. It's rigid but provides a very high level of security because individual users can't make their own sharing decisions.
Role-Based Access Control (RBAC) is a popular model that bridges the gap between the flexibility of DAC and the rigidity of MAC. In RBAC, access is based on a user's role or job function within an organization.
Instead of assigning permissions one-by-one to hundreds of employees, an administrator creates roles like 'Accountant', 'Sales Rep', or 'HR Manager'. Each role is given the specific permissions needed to perform its duties. When a new person joins the company, the admin simply assigns them the appropriate role, and they automatically inherit all the necessary permissions.
This model is widely used in corporate environments because it simplifies user management and enforces the principle of least privilege efficiently.
Access Control in the Wild
You interact with these models every day, even if you don't realize it. Let's look at some examples.
| Model | Example Scenario |
|---|---|
| DAC | Sharing a Google Doc. As the owner, you decide who to invite and whether they can view, comment, or edit. |
| MAC | A government intelligence agency. An analyst with 'Secret' clearance can't view a document labeled 'Top Secret', even if their colleague wants to share it. |
| RBAC | Your company's HR portal. An employee can view their own pay stubs, but a manager can view the pay stubs for everyone on their team. The CEO can see records for the entire company. |
Understanding these fundamental models is the first step in appreciating how digital security works. By controlling who can access what, organizations can protect their critical data and ensure their systems run smoothly and securely.
Access control is fundamentally concerned with answering two primary questions. What are they?
A new marketing intern is hired to write blog posts. According to the principle of least privilege, which of the following permissions should they be granted?