Definition
Access Control
Access control is the enforcement of a security policy that determines which subjects (users, processes) may perform which operations on which objects (files, devices, resources).
Formally, an access control system consists of:
- A set of subjects
- A set of objects
- A set of operations (rights)
- An access policy that grants or denies requests
Protection Domain
Protection Domain
A protection domain defines the set of objects a subject may access and the operations permitted on each.
A subject operates within exactly one domain at any time. The domain determines the boundaries of what the subject can do.
Domain Switching
A process may switch domains during execution. This occurs when privileges need to change, for example to access restricted resources.
Unix Domain Switching via SETUID
In Unix, a protection domain is defined by the User ID (UID) and Group ID (GID). A process switches domains by executing a file with the
SETUIDbit set. The process temporarily assumes the UID of the file owner, acquiring the corresponding rights.
Access Matrix
Access Matrix
The access matrix is a formal model where rows represent domains and columns represent objects . Each cell contains the set of access rights domain holds for object .
The matrix is typically sparse. Practical systems decompose it along one dimension.
Access Control Lists
Access Control List
An Access Control List (ACL) is a column-wise decomposition of the access matrix. Each object stores a list of pairs.
For object , the ACL is:
Unix File ACL
A Unix file stores permissions as an ACL:
- Owner: read, write, execute
- Group: read, execute
- Others: read
Changing permissions for an object is efficient: modify only that object’s ACL.
Capability Lists
Capability List
A capability list is a row-wise decomposition of the access matrix. Each domain stores a list of pairs.
For domain , the capability list is:
File Descriptor as Capability
In Unix, a file descriptor acts as a capability. The kernel validates the descriptor on each operation; user processes cannot forge valid descriptors.
Capabilities are typically implemented as protected tokens (tickets) that cannot be forged, for example via encryption or kernel-managed references. Checking access is fast: the domain presents its capability, and the system verifies its authenticity.
Lock-Key System
Lock-Key System
In a lock-key system, each object has a set of locks (unique bit patterns), and each domain holds a set of keys . Access is granted if .
The lock-key mechanism provides a middle ground between ACLs and capabilities. Like capabilities, possession of a key grants authority. Like ACLs, the object maintains information (locks) about who may access it.