Modelintro
Access control matrix
Also called Lampson access matrix, protection matrix.
A model of protection state as a matrix whose rows are subjects, whose columns are objects, and whose cells list the rights a subject holds on an object.
The access control matrix is the basic model of a protection state: a table with one row for each subject, one column for each object, and in the cell the set of rights that subject holds on object . A request "may do to ?" is allowed exactly when . Lampson (1971) proposed it, Graham and Denning (1972) gave rules that change it, and the Harrison-Ruzzo-Ullman model (1976) made those rules into a formal system whose safety question is undecidable. Real systems do not store the matrix as a table: they store its columns as access control lists or its rows as capability lists.
The machine
State. A protection state is a triple . is a finite set of subjects (users, processes, domains), is a finite set of objects (files, devices, memory segments, and also the subjects themselves), with , and is a fixed finite set of generic rights, for example . The matrix is a function . Write , and . The subjects are also columns so that rights over a subject, such as the right to stop a process, fit in the same table.
Request. A request is a triple with , and . The decision is
A reference monitor is the component that receives each request and applies this test.
Transitions. The state changes through commands. In the HRU form, a command has parameters, a condition that is a conjunction of tests "", and a body that is a sequence of six primitive operations: enter into , delete from , create subject , create object , destroy subject , destroy object . A command runs its body only when its condition holds. Two typical commands are:
command CREATE-FILE(x, f)- 1
create object f - 2
enter own into A[x, f] - 3
enter r into A[x, f] - 4
enter w into A[x, f] command GRANT-READ(x, y, f)- 5
if own in A[x, f] then - 6
enter r into A[y, f]
The commands are the policy of the system. A system where the owner of an object adds rights for others is discretionary; a system with no command that lets a user change rights on labeled objects is mandatory. Graham and Denning used a fixed set of eight rules: create and destroy an object, create and destroy a subject, read, grant, delete and transfer a right. Their rules use a right own on an object, a right control on a subject, and a copy flag: a holder of may pass or to another subject.
Example. Take three subjects alice, bob and carol, and three objects f1, f2 and p (a printer). The columns for the subjects are left out, because no right on a subject is used.
| f1 | f2 | p | |
|---|---|---|---|
| alice | own, r, w | r | |
| bob | r | own, r, w | w |
| carol | r | w |
The request (bob, f2, w) is allowed. The request (carol, f2, w) is denied, because w is not in . The command GRANT-READ(alice, carol, f1) passes the test of line L5, because alice owns f1, and line L6 enters r into . The command GRANT-READ(carol, alice, f2) does nothing, because carol does not own f2.
What it counts
The model answers two questions of very different cost.
The access decision. For a fixed state, the decision is one membership test. In the word RAM, with the matrix stored as an array of cells and each cell as a bit mask of bits, the test takes time and the state takes bits. Most cells are empty in practice, so systems store only the nonempty cells, as a sparse matrix does. The cost of the decision then depends on the storage:
| storage | what one object or subject keeps | cost of the decision |
|---|---|---|
| full table | nothing; one array | |
| by column (access control list) | each object keeps the list of with | a scan of one list, ; expected with a hash table |
| by row (capability list) | each subject keeps the list of | when the subject names the entry; to search the row |
| authorization relation | the set of triples with | expected with a hash table |
The two views make different questions cheap. "Who can use object ?" is one column, so it is cheap with lists and costs a scan of all rows with capabilities. "What can subject use?" is one row, so it is cheap with capabilities and costs a scan of all lists with access lists. Revoking all rights of one subject, or all access to one object, has the same split.
The safety question. Given a set of commands, an initial state and a right , is there a sequence of commands that enters into a cell of the matrix that did not hold before? HRU call a state where some command does this a leak of , and is unsafe for if a leak is reachable from it. This page uses the plain form, where every subject of counts. HRU also discuss the form where the subjects that are trusted to pass rights are removed first, because those subjects leak rights by design. In the example, with the two commands above, the state is unsafe for r, because GRANT-READ(alice, carol, f1) leaks it. It is also unsafe for w in the plain form, because CREATE-FILE enters w into the new cell of the new file. This shows how coarse the plain question is. The question a defender asks, "can carol ever get w on f2?", has the answer no: line L6 enters only r, and line L4 enters w only into the column of a file that the command creates. The number of states over fixed sets and is , which is for the example; when commands can create subjects and objects, the set of reachable states can be infinite.
Relation to other models
- Graphs. The matrix is the adjacency matrix of a bipartite graph from subjects to objects, with each edge labeled by a set of rights. The Take-Grant model works on this graph directly and adds the rights take and grant as edges between subjects.
- HRU. The Harrison-Ruzzo-Ullman model is the matrix with an arbitrary finite set of commands of the form above. Lampson's matrix is its state; the HRU commands are its transitions.
- Policy models. Discretionary and mandatory access control are classes of command sets. The Bell-LaPadula model keeps a matrix as its discretionary part and adds labels. Role-based access control gives a matrix when the user to role and role to permission relations are composed. Attribute-based and relationship-based access control compute each cell from attributes or from a graph when the request comes, so the matrix is never stored.
- Storage. The access control list is a column of the matrix and the capability list is a row. Both hold the same information as the matrix, but they make different operations cheap.
Known results in the model
- Decision. For a fixed stored state the access decision is a lookup, in time in the word RAM with a full table.
- General safety is undecidable. HRU (1976) proved that the safety question is undecidable for arbitrary command sets, by a reduction from the halting problem of a Turing machine: the matrix holds the tape on its diagonal and each command does one move. See HRU safety undecidability.
- Mono-operational systems. When each command has one primitive operation, safety is decidable, and HRU showed that it is NP-complete. Tripunitara and Li (2013) found an error in the proof that the problem is in NP and gave a corrected proof.
- Monotonic systems. Harrison and Ruzzo (1978) showed that safety stays undecidable when no command deletes a right or destroys a subject or object, and stays undecidable for monotonic systems with conditions of two tests. With one test per condition, the monotonic case is decidable.
- Take-Grant. In the Take-Grant model, safety is decidable in time linear in the size of the graph (Jones, Lipton and Snyder 1976; Lipton and Snyder 1977).
- Storage is exact. Both the set of access lists and the set of capability lists determine the matrix, and the matrix determines both. The proofs are on the access control list and capability list pages, and their code checks the two views against the matrix by brute force.
References
- Butler W. Lampson, Protection, Proceedings of the 5th Princeton Conference on Information Sciences and Systems, 1971, reprinted in ACM SIGOPS Operating Systems Review 8(1), 1974, pages 18 to 24 of the reprint (domains, objects, the access matrix, and its storage by rows as capability lists and by columns as access lists)
- G. Scott Graham and Peter J. Denning, Protection, principles and practice, AFIPS Spring Joint Computer Conference, 1972, pages 417 to 429 (the protection rules with the owner and control rights and the copy flag, and the storage of the matrix)
- Michael A. Harrison, Walter L. Ruzzo and Jeffrey D. Ullman, Protection in operating systems, Communications of the ACM 19(8), 1976, pages 461 to 471 (commands with conditions and primitive operations, the safety question, its undecidability, and the mono-operational case)
- Mahesh V. Tripunitara and Ninghui Li, The foundational work of Harrison-Ruzzo-Ullman revisited, IEEE Transactions on Dependable and Secure Computing 10(1), 2013, pages 28 to 39 (the error in the proof that mono-operational safety is in NP, and a corrected proof)
- Michael A. Harrison and Walter L. Ruzzo, Monotonic protection systems, in R. A. DeMillo, D. P. Dobkin, A. K. Jones and R. J. Lipton (editors), Foundations of Secure Computation, Academic Press, 1978, the undecidability of safety for monotonic systems with two tests per condition, and its decidability with one test
- Richard J. Lipton and Lawrence Snyder, A linear time algorithm for deciding subject security, Journal of the ACM 24(3), 1977, pages 455 to 464 (safety in the Take-Grant model in linear time)
- Matt Bishop, Computer Security: Art and Science, second edition, Addison-Wesley, 2018, ISBN 9780321712332, Chapter 2 (the access control matrix, protection state transitions and copying, owning and attenuation of privilege) and Chapter 3 (the foundational results on safety)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 95ERZP Edit this page History Report an error Markdown