Capability-Based Security
What you'll learn: You'll understand how unforgeable tokens called capabilities grant specific access rights to resources without centralized permission checks.
What Is Capability-Based Security?
Capability-based security flips traditional access control on its head. Instead of asking "Does Alice have permission to read file X?" every time, the system gives Alice an unforgeable token (a capability) that proves she can read file X. Possessing the capability is the authorization.
Think of it like a physical key: if you have the key to a safe, you can open it—no need to check an access control list. The key itself embodies the right to access.
How Capabilities Work
A capability is a protected reference to a resource bundled with specific permissions. It typically contains:
- Resource identifier (what you can access)
- Rights (read, write, execute, etc.)
- Unforgeable signature or cryptographic proof
When a process presents a capability to the operating system or service, the system verifies its authenticity and grants access immediately—no need to consult external permission tables.
Capability vs. Traditional Models
Unlike ACLs (which list "who can do what to this resource") or RBAC (which assigns permissions based on roles), capabilities are:
- Transferable: You can delegate access by passing the capability
- Revocable: Destroying or expiring the capability removes access
- Fine-grained: Each capability grants precisely scoped rights
This approach prevents certain classes of vulnerabilities, like confused deputy problems, because authority is explicit in the capability itself.
Why "Unforgeable" Matters
Capabilities must be cryptographically protected or managed by the kernel to prevent forgery. If an attacker could create fake capabilities, the entire security model collapses.
Key Takeaway: Capability-based security grants access through unforgeable tokens that carry both identity and permission, enabling decentralized, transferable authorization without repeated permission checks.