Access Control Fundamentals
What you'll learn: The core building blocks that determine who can do what in a secure application.
What Is Access Control?
Access control is the security mechanism that determines whether someone (or something) should be allowed to perform a specific action on a resource. Think of it like a museum: not everyone can touch the exhibits, only authorized staff can enter the restoration room, and visitors can only view certain areas during specific hours.
The Four Core Components
Subjects
The subject is who (or what) is trying to perform an action. This could be:
- An authenticated user
- A service account
- An API client
- A background process
After authentication (like we've learned with OAuth, OIDC, SAML, and JWTs), your application knows the identity of the subject.
Objects
The object is the resource being accessed. Examples include:
- A database record
- A file or document
- An API endpoint
- A user profile
Actions
The action is what the subject wants to do to the object:
- Read/view
- Create
- Update/edit
- Delete
- Execute
Permissions
Permissions are the rules that tie everything together. They define which subjects can perform which actions on which objects. For example: "User Alice can edit her own profile" or "Admin role can delete any user record."
Why This Matters
Authentication (verifying identity with passwords, MFA, OAuth, etc.) only tells you who someone is. Access control tells you what they're allowed to do. Even with a valid JWT token, a regular user shouldn't be able to delete admin accounts—that's where access control enforcement becomes critical.
Key Takeaway: Access control uses four components—subjects (who), objects (what resource), actions (what operation), and permissions (the rules)—to enforce security policies after authentication succeeds.