Algorithm Search⌘K

Modeladvanced

Take-Grant protection model

Also called take-grant model.

A graph model of protection in which subjects take and grant rights along edges, built so that the safety question is decidable in linear time.

The Take-Grant protection model is a model of protection in which the state is a directed graph and four fixed rules change it. Vertices are subjects and objects, and an edge from xx to yy carries the rights that xx has over yy. Two special rights, take (tt) and grant (gg), move other rights along the edges. Jones, Lipton and Snyder gave the model in 1976 as an answer to the HRU result that safety is undecidable for general protection systems. In Take-Grant the rules are fixed, and the question "can xx come to hold right α\alpha over yy?" has an exact graph characterization and a linear time algorithm.

The machine

Protection graph. A state is a finite directed graph G=(V,E)G = (V, E) with a label λ(x,y)⊆R\lambda(x, y) \subseteq R on each edge, where RR is a finite set of rights that contains tt and gg. The vertices are split into subjects (active) and objects (passive). The graph is the access control matrix written as a graph: λ(x,y)=A[x,y]\lambda(x, y) = A[x, y], and a missing edge is an empty cell.

Rules. Let xx, yy, zz be distinct vertices and let xx be a subject. Write G⊢G′G \vdash G' if one rule takes GG to G′G'.

rule precondition effect
xx takes (α\alpha to zz) from yy t∈λ(x,y)t \in \lambda(x, y), α⊆λ(y,z)\alpha \subseteq \lambda(y, z) add α\alpha to λ(x,z)\lambda(x, z)
xx grants (α\alpha to zz) to yy g∈λ(x,y)g \in \lambda(x, y), α⊆λ(x,z)\alpha \subseteq \lambda(x, z) add α\alpha to λ(y,z)\lambda(y, z)
xx creates (α\alpha to new vertex) yy yy is a new subject or object add yy and the edge x→yx \to y with label α\alpha
xx removes (α\alpha to) yy λ(x,y)\lambda(x, y) exists remove α\alpha from λ(x,y)\lambda(x, y)

These four are the de jure rules: they change rights. Take says that a subject who may take from yy gets any right that yy holds. Grant says that a subject who may grant to yy can give yy any right it holds. In HRU terms each rule is a command with at most two tests and one or two primitive operations, so Take-Grant is one fixed protection system.

The question. For a right α\alpha and vertices xx, yy of G0G_0, define

can_share(α,x,y,G0)  ⟺  ∃G: G0⊢∗G and α∈λG(x,y).\mathit{can\_share}(\alpha, x, y, G_0) \iff \exists G:\ G_0 \vdash^* G \text{ and } \alpha \in \lambda_G(x, y).

Cost. In the word RAM model, store the graph as adjacency lists with nn vertices and mm labeled edges. One rule costs O(1)O(1) expected time with a hash map of edges. The decision procedures below run in O(n+m)O(n + m) time.

What it counts

The model counts which rights can reach which vertices. The adversary in can_share\mathit{can\_share} is a set of subjects that all cooperate: every subject applies any rule that helps the transfer, and no one refuses. So can_share\mathit{can\_share} is false only if no coalition of all the subjects can move the right. A false answer is a proof of safety against any such coalition. A true answer only says that a transfer is possible if the subjects on the path agree.

Paths and words. A tg-path is a path in the graph, with edges taken in either direction, on which each edge has tt or gg in its label. Its word lists the edges in order: t→\overrightarrow{t} for a tt edge in the direction of travel, t←\overleftarrow{t} for one against it, and the same for gg. Two vertices are tg-connected if a tg-path joins them.

Islands, bridges and spans.

  • An island is a maximal tg-connected set of subjects, using only edges between subjects. Inside an island any right held by one subject can reach any other.
  • A bridge is a tg-path between two subjects whose word is in t→∗\overrightarrow{t}^*, t←∗\overleftarrow{t}^*, t→∗ g→ t←∗\overrightarrow{t}^*\,\overrightarrow{g}\,\overleftarrow{t}^* or t→∗ g← t←∗\overrightarrow{t}^*\,\overleftarrow{g}\,\overleftarrow{t}^*. Rights cross a bridge from one island to the next.
  • A subject x′x' initially spans to xx if a tg-path from x′x' to xx has a word in t→∗ g→\overrightarrow{t}^*\,\overrightarrow{g} or is empty: x′x' can take a grant right over xx and then give xx what it holds.
  • A subject s′s' terminally spans to ss if a tg-path from s′s' to ss has a word in t→∗\overrightarrow{t}^* or is empty: s′s' can take what ss holds.

Example. Take subjects pp, qq, ss, zz and an object ff, with the edges p→tsp \xrightarrow{t} s, s→rfs \xrightarrow{r} f and s→gqs \xrightarrow{g} q. Then pp takes (rr to ff) from ss, and ss grants (rr to ff) to qq, so can_share(r,p,f,G0)\mathit{can\_share}(r, p, f, G_0) and can_share(r,q,f,G0)\mathit{can\_share}(r, q, f, G_0) are true. The subject zz has no edges, so no rule involves it, and can_share(r,z,f,G0)\mathit{can\_share}(r, z, f, G_0) is false.

Relation to other models

  • HRU. The HRU model lets the designer choose the commands, and that freedom is what makes safety undecidable. Take-Grant fixes the commands. It shows that a protection system can create vertices without bound and still have a decidable safety question.
  • Capabilities. A tt edge works like a capability to read another subject's capability list, and a gg edge like a capability to write into it. The model is a common way to reason about capability systems.
  • Graph search. The characterizations reduce can_share\mathit{can\_share} to connected components and to reachability in a graph whose edges are the bridges, both found by breadth-first search.
  • Information flow. The de jure rules move rights, not data. Rights are not the same as information, which is the subject of the confinement problem.

Known results in the model

Each item is a theorem.

  • Subject-only graphs (Jones, Lipton and Snyder 1976). If every vertex of G0G_0 is a subject, can_share(α,x,y,G0)\mathit{can\_share}(\alpha, x, y, G_0) holds if and only if α∈λ(x,y)\alpha \in \lambda(x, y) already, or some vertex ss has α∈λ(s,y)\alpha \in \lambda(s, y) and xx and ss are tg-connected.
  • General graphs (Lipton and Snyder 1977). can_share(α,x,y,G0)\mathit{can\_share}(\alpha, x, y, G_0) holds if and only if α∈λ(x,y)\alpha \in \lambda(x, y) already, or all four of these hold: some vertex ss has α∈λ(s,y)\alpha \in \lambda(s, y); some subject x′x' is equal to xx or initially spans to xx; some subject s′s' is equal to ss or terminally spans to ss; and there are islands I1,…,IkI_1, \ldots, I_k with x′∈I1x' \in I_1, s′∈Iks' \in I_k and a bridge from IjI_j to Ij+1I_{j+1} for each jj.
  • Linear time (Lipton and Snyder 1977). The condition can be checked in O(n+m)O(n + m) time: find the islands with one pass, find the bridges by a search whose state is a vertex and a position in the word patterns, and test reachability between islands. The proofs use the create rule, but the conditions mention only the vertices and edges of G0G_0, so the unbounded state space does not enter the test.
  • Removal does not help. The remove rule only deletes rights and no rule tests that a right is absent, so a shortest sequence that shares a right never uses remove.
  • Theft and conspiracy (Snyder 1981, as presented in Bishop, Chapter 3). The predicate can_steal(α,x,y,G0)\mathit{can\_steal}(\alpha, x, y, G_0) asks whether xx can get α\alpha over yy when the subjects that already hold α\alpha over yy never grant it. This changes the adversary: the owners are honest and the others cooperate. It also has a graph characterization. Bishop also treats conspiracy: the smallest number of subjects that must act together for a transfer.
  • De facto rules (Bishop, Chapter 3). The rules post, pass, spy and find model the flow of information along read and write edges, and the predicate can_know(x,y,G0)\mathit{can\_know}(x, y, G_0) asks whether information can flow from yy to xx. It also has a path characterization.

References

  1. Anita K. Jones, Richard J. Lipton and Lawrence Snyder, A linear time algorithm for deciding security, 17th Annual Symposium on Foundations of Computer Science (FOCS), 1976, pages 33 to 41, the take, grant, create and remove rules and the linear time decision procedure
  2. 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, the characterization of can-share and the linear time algorithm
  3. Matt Bishop, Computer Security: Art and Science, second edition, Addison-Wesley, 2018, Chapter 3, Foundational Results (the Take-Grant protection model: sharing of rights, islands, bridges and spans, theft and conspiracy, interpretation of the model)

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.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/W0AS60/text.yaml