Definition
Set inclusion is the relation between two sets and that holds when every element of is also an element of ; it is written and read “ is a subset of ”. Applied to access policies, it gives “stricter” an exact meaning: policy is at least as strict as policy when the requests allows form a subset of those 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 is stricter than policy ; the other says the opposite. allows reading and writing a file; allows reading and erasing it. Both allow two operations, so counting does not settle the argument, and in fact neither administrator is right: refuses an erase that allows, and refuses a write that 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. is at least as strict as when ’s circle lies entirely inside ’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
Fix the universe: the set 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 .
Compute each policy’s meaning: the set of requests in that allows. This set is what does, not how its rules are written; two differently written policies with the same allowed set count as the same policy in this comparison.
Compare by inclusion. is at least as strict as , written , when . Four outcomes are possible: the sets are equal, is strictly stricter, is strictly stricter, or neither set contains the other.
Combine if needed. The intersection , the requests both allow, is the most permissive policy that is at least as strict as both. The union , the requests either allows, is the strictest policy that allows everything either one allows.
Use the order as a rule for change. A tighten-only update rule §19.5.7 accepts a new policy in place of the current policy only if , 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 is the set of traces that allows from the starting state. Then means .
Worked example
Let for one user and one file, with and .
Is ? No: write is in but not in .
Is ? No: erase is in but not in .
So and are incomparable.
Their intersection is , a policy with and . Their union is itself, the policy that allows everything.
Every subset of is a possible policy. With 3 requests there are policies, and pairs of different policies. To build a pair with , decide for each of the 3 requests whether it lies in neither set, in only, or in both: choices, of which 8 have . So pairs of different policies are comparable, and the remaining 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 bytes” over the legal sizes 7 to 16 accepts , and a larger 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 ; the second accepts (10, 12), which the first refuses because .
Stated precisely
Let be a set of requests and, for each policy , let be the set of requests allows. Define to hold exactly when , that is, when every request allows is also allowed by . Then the relation is:
reflexive: ;
transitive: and imply ;
antisymmetric on meanings: and imply .
A relation with these three properties is a partial order §19.2.6. Two differently written policies with equal allowed sets satisfy both and , 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 has two or more elements: for different requests and , the policy that allows only and the policy that allows only 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 ordered by inclusion form a lattice; with complement added, they form a Boolean algebra §15.39.
Refusals reverse the order. Let , the requests in that does not allow. Then exactly when . Guarantees about forbidden requests carry over to stricter policies: let be a set of requests that must never be allowed, and the empty set; if and , then . The same holds for traces: when , every property that all allowed traces of have, all allowed traces of have too.
These statements assume that both policies are judged on the same universe and in the same context, and that 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 is at least as strict as a policy when the set of actions permits is a subset of the set permits. If permits read and write while permits read and erase, then permits write, which denies, and permits erase, which 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).