Section 15.40

Set inclusion and policy order

Definition

Set inclusion is the relation between two sets SS and TT that holds when every element of SS is also an element of TT; it is written S⊆TS \subseteq T and read “SS is a subset of TT”. Applied to access policies, it gives “stricter” an exact meaning: policy PP is at least as strict as policy QQ when the requests PP allows form a subset of those QQ allows. This order is partial: two policies can each allow a request the other refuses, and then neither is stricter.

The idea

Two administrators disagree. One says that policy PP is stricter than policy QQ; the other says the opposite. PP allows reading and writing a file; QQ allows reading and erasing it. Both allow two operations, so counting does not settle the argument, and in fact neither administrator is right: PP refuses an erase that QQ allows, and QQ refuses a write that PP allows. “Stricter” needs a definition before a claim about it can be true or false.

Set inclusion supplies the definition. Picture each policy as a circle drawn around the requests it allows, on one sheet that shows every possible request. PP is at least as strict as QQ when PP’s circle lies entirely inside QQ’s. Two circles can also overlap without either containing the other, and then the two policies are incomparable. This is why the order is called partial: a total order, like the order of numbers, compares every pair, and this order does not.

How it works

  1. Fix the universe: the set UU of all requests the comparison covers, for example every combination of user, operation and object, in one stated context such as a device state. Both policies are judged on the same UU.

  2. Compute each policy’s meaning: the set Allow(P)\mathrm{Allow}(P) of requests in UU that PP allows. This set is what PP does, not how its rules are written; two differently written policies with the same allowed set count as the same policy in this comparison.

  3. Compare by inclusion. PP is at least as strict as QQ, written P≼QP \preceq Q, when Allow(P)⊆Allow(Q)\mathrm{Allow}(P) \subseteq \mathrm{Allow}(Q). Four outcomes are possible: the sets are equal, PP is strictly stricter, QQ is strictly stricter, or neither set contains the other.

  4. Combine if needed. The intersection Allow(P)∩Allow(Q)\mathrm{Allow}(P) \cap \mathrm{Allow}(Q), the requests both allow, is the most permissive policy that is at least as strict as both. The union Allow(P)∪Allow(Q)\mathrm{Allow}(P) \cup \mathrm{Allow}(Q), the requests either allows, is the strictest policy that allows everything either one allows.

  5. Use the order as a rule for change. A tighten-only update rule §19.5.7 accepts a new policy NN in place of the current policy QQ only if N≼QN \preceq Q, so an update can remove permissions but never add one.

When a decision depends on history, as in “erase is allowed only after a backup”, a set of single requests does not describe the policy. Compare traces instead. A trace is a sequence of requests in the order they are made, and Traces(P)\mathrm{Traces}(P) is the set of traces that PP allows from the starting state. Then P≼QP \preceq Q means Traces(P)⊆Traces(Q)\mathrm{Traces}(P) \subseteq \mathrm{Traces}(Q).

Worked example

Let U={read,write,erase}U = \{\mathrm{read}, \mathrm{write}, \mathrm{erase}\} for one user and one file, with Allow(P)={read,write}\mathrm{Allow}(P) = \{\mathrm{read}, \mathrm{write}\} and Allow(Q)={read,erase}\mathrm{Allow}(Q) = \{\mathrm{read}, \mathrm{erase}\}.

Every subset of UU is a possible policy. With 3 requests there are 23=82^3 = 8 policies, and 8×7/2=288 \times 7 / 2 = 28 pairs of different policies. To build a pair with S⊆TS \subseteq T, decide for each of the 3 requests whether it lies in neither set, in TT only, or in both: 33=273^3 = 27 choices, of which 8 have S=TS = T. So 27−8=1927 - 8 = 19 pairs of different policies are comparable, and the remaining 28−19=928 - 19 = 9 pairs, about one pair in three, are incomparable.

Thresholds give inclusion only when their effect is monotone, meaning that a stricter number always accepts a subset. A key-size rule “accept keys of at least mm bytes” over the legal sizes 7 to 16 accepts {m,…,16}\{m, \dots, 16\}, and a larger mm accepts a subset, so these policies form a chain: a family in which every pair is comparable. Policies with two thresholds, a minimum key size and a minimum password length, do not form a chain. The policy (key size at least 16, password length at least 8) accepts the combination (16, 8), which the policy (key size at least 10, password length at least 12) refuses because 8<128 < 12; the second accepts (10, 12), which the first refuses because 10<1610 < 16.

Stated precisely

Let UU be a set of requests and, for each policy PP, let Allow(P)⊆U\mathrm{Allow}(P) \subseteq U be the set of requests PP allows. Define P≼QP \preceq Q to hold exactly when Allow(P)⊆Allow(Q)\mathrm{Allow}(P) \subseteq \mathrm{Allow}(Q), that is, when every request PP allows is also allowed by QQ. Then the relation is:

A relation with these three properties is a partial order §19.2.6. Two differently written policies with equal allowed sets satisfy both P≼QP \preceq Q and Q≼PQ \preceq P, so on written policies the relation is only a preorder (reflexive and transitive); it is a partial order on their meanings.

The order is not total once UU has two or more elements: for different requests aa and bb, the policy that allows only aa and the policy that allows only bb are incomparable. For every pair of policies, the intersection is the greatest policy below both and the union is the least policy above both, so the subsets of UU ordered by inclusion form a lattice; with complement added, they form a Boolean algebra §15.39.

Refusals reverse the order. Let Deny(P)=U\Allow(P)\mathrm{Deny}(P) = U \setminus \mathrm{Allow}(P), the requests in UU that PP does not allow. Then P≼QP \preceq Q exactly when Deny(Q)⊆Deny(P)\mathrm{Deny}(Q) \subseteq \mathrm{Deny}(P). Guarantees about forbidden requests carry over to stricter policies: let Bad⊆U\mathrm{Bad} \subseteq U be a set of requests that must never be allowed, and ∅\emptyset the empty set; if Allow(Q)∩Bad=∅\mathrm{Allow}(Q) \cap \mathrm{Bad} = \emptyset and P≼QP \preceq Q, then Allow(P)∩Bad=∅\mathrm{Allow}(P) \cap \mathrm{Bad} = \emptyset. The same holds for traces: when Traces(P)⊆Traces(Q)\mathrm{Traces}(P) \subseteq \mathrm{Traces}(Q), every property that all allowed traces of QQ have, all allowed traces of PP have too.

These statements assume that both policies are judged on the same universe and in the same context, and that Allow\mathrm{Allow} captures every decision a policy makes. A decision that depends on state or history needs the trace form.

Limits and common mistakes

Counting allowed requests is not the order. A policy that allows two harmless requests is not stricter than one that allows a single dangerous request; the two are incomparable.

The universe and the context must match. A comparison of operation names alone, ignoring users, objects or state, can call two policies equal that differ on a request the comparison left out.

Stricter is not better in every respect. A policy that refuses more may also refuse the requests that recovery needs, so availability §1.10 can fall. Set inclusion orders what a policy permits, not how useful the system remains.

Changing permissions changes what can happen next. A request refused now can make a later state impossible to reach, including a state that recovery depends on. Judge such a change on the reachable states §3.21, the states the system can still get into, not on a single list of requests.

Limits on counts and rates are not sets of requests. A policy that allows three erases per hour is compared on traces, or on a multiset §14.13, which records how many times each request occurs.

A numeric field orders policies only if its meaning is monotone. A reserved value §15.37, such as 255 meaning “check disabled”, breaks the chain of thresholds: it is the least strict setting although it is the largest number.

Deciding inclusion can be hard. For a small finite universe it is a direct check of every request. For policies with rich conditions it may need an SMT solver §3.28 (satisfiability modulo theories solver), a program that searches for a request that one policy allows and the other refuses.

Questions answered

Can two policies each permit an action the other denies?

Yes. Two policies can each permit an action the other denies, and they are then incomparable: neither is stricter than the other. A policy PP is at least as strict as a policy QQ when the set of actions PP permits is a subset of the set QQ permits. If PP permits read and write while QQ permits read and erase, then PP permits write, which QQ denies, and QQ permits erase, which PP denies, so neither set contains the other.

Ordering by set inclusion is therefore a partial order, not a total one: it does not place every pair of policies on one scale from permissive to strict. Such a pair still has a common stricter policy, the intersection (here, read only), and a common more permissive policy, the union (here, read, write and erase). The comparison is meaningful only when both policies are judged on the same set of actions in the same context; for rules that depend on history, compare the allowed sequences of actions instead.

Related entries: Policy versus mechanism (§1.19), Authorization (§1.7), Reachability after update (§8.35), Set versus multiset (§14.13), Partial order, lattice, join, and meet (§19.2.6), Security policy lattice and tighten-only updates (§19.5.7), Threshold and sentinel semantics (§15.37), Boolean algebra and De Morgan laws (§15.39).