In this section, we provide a formal examination of policy inconsistencies resolution for the coexistence of SSoD and SA policies.
3.1. Reducing complexity
Once all the inconsistencies are known, we must find a way to resolve them. However, determining which policy to remove is difficult because there may be many policy inconsistencies. In order to simplify the resolution task, we consider as few policies as possible. Thus we reduce the complexity of reasoning about policy inconsistencies by the techniques of static pruning and minimal inconsistency cover set.
3.1.1. Static pruning
SSoD and SA policies can conflict with each other due to their opposite objectives. In general, not all SSoD or SA policies should be taken into account as they do not cause inconsistencies. The following theorem asserts that the special cases of SSoD(or SA) policies do not affect its compatibility with SA(or SSoD) policies. This enables us to remove them from our consideration. This greatly simplifies the problem.
Theorem 3. Let Q = {e1, ..., e
m
, f1, ..., f
n
}, where e
i
= ssod <P
i
, U
i
, k
i
> (1 ≤ i ≤ m),. If ∃e
i
∈ Q[(|P
i
- R| > 0) ⋁ (|U
i
∩ T| = 0)], where, then let Q' = Q' - {e
i
}; If, where, then let Q' = Q' - {f
j
}. Q is consistent if and only if Q' is consistent.
PROOF. For the "only if" part, it is clear that if Q is consistent then Q' is consistent as Q' ⊆ Q.
For the "if" part, we show that if Q' is consistent then Q is consistent. Q' is consistent implies that there exists an access control state ε satisfies all policies in Q'. We now construct a new state ε' that satisfies both Q' and Q as follows: for each e
i
∈ Q/Q', where |P
i
- R| > 0. Add all users in U
i
to ε, but do not assign any permissions in P
i
∩ R. In this way, ε' satisfies e
i
as no less than k
i
users in U
i
together having all permissions in P
i
, and note that adding new users will not lead to inconsistency of policies in Q'. If |U
i
∩ T| = 0, not assigning any permission in P
i
to any user in U
i
will not lead to inconsistency of policies in Q', but the new state satisfies e
i
. For each f
j
∈ Q/Q', where , add all users in to ε, and assign all permissions in to each user in . Then there is at least one user in each size-t
j
user set in , as u has all the permissions in , thus each size-t
j
user set in together having all the permissions in . In this way, ε' satisfies f
j
, and note that adding new users, and assigning permissions to these new users will not lead to violation of policies in Q'. If , assigning any permissions in to each user in will not lead to inconsistency of policies in Q', and thus the new state ε' satisfies f
j
. Therefore, Q is consistent if and only if Q' is consistent. □
3.1.2. Minimal inconsistency cover set
There may exist many policy inconsistencies in a policy set which contains a large number of SSoD and SA policies. But many of these inconsistencies may result from only a small number of these policies, and they may be disjoint with each other. We find the minimal inconsistency cover set is the minimal number of policies that represent a policy inconsistency. Therefore, the key question is how to organize the policy inconsistencies, so as to examine the minimum number of policies that are responsible for all the inconsistencies.
Definition 6. We define a minimal inconsistency cover (MIC) set responsible for a policy inconsistency that includes the smallest number of policies.
Note that for a policy inconsistency, there might be several policy sets that are responsible for this inconsistency. By definition, we say that a set S is an MIC set, if there does not exist another set S' responsible for this inconsistency and S' ⊂ S. We have the following property for MIC.
Theorem 4. Given any two MIC sets A and B, let P
A
denotes the union of permissions in all policies in A, and U
A
denotes the union of users in all policies in A. P
B
and U
B
have the similar meanings. Then (P
A
∩ P
B
= ∅) ⋁ (U
A
∩ U
B
= ∅).
PROOF. We assume that (P
A
∩ P
B
= ∅) ⋁ (U
A
∩ U
B
= ∅) is false, then (P
A
∩ P
B
≠ ∅) ⋀ (U
A
∩ U
B
≠ ∅). There are four cases should be considered:
-
(1)
Permissions and users for {e 1 , ..., e
m
} ⊆ A(m ≥ 1) and are shared;
-
(2)
Permissions and users for {e 1 , ..., e
m
} ⊆ A(m ≥ 1) and {f 1 , ..., f
n
} ⊆ B(n ≥ 1) are shared;
-
(3)
Permissions and users for {f 1 , ..., f
m
} ⊆ A(m ≥ 1) and are shared;
-
(4)
Permissions and users for {e 1 , ..., e
m
, f 1 , ..., f
n
} ⊆ A(m ≥ 1, n ≥ 1) and are shared.
For case (1), there exists at least one permission , but p does not belong to any other policies in A. By Theorem 3, {e1, ..., e
m
} does not affect the inconsistency of other permissions in A, and thus {e1, ..., e
m
} can be removed from A. This would contradict the assertion that A is an MIC set. Moreover, there exists at least one permission , but p does not belong to any other policies in B. Thus also can be removed from B. For case (2) and case (3), the proof is essentially the same as the case (1). It should be noted that there exists at least one user u belongs to the policies in {f1, ..., f
n
}, but u does not belong to any other policies in B. Thus {f1, ..., f
n
} should be removed from B by Theorem 3. For case (4), no policies can be removed from , which means these policies may conflict with each other due to their opposite objectives. Therefore, these policies should be included by only one MIC set. This would contradict the assertion that A and B are two MIC sets. Together with the above discussions, given any two MIC sets, that (P
A
∩ P
B
= ∅) ⋁ (U
A
∩ U
B
= ∅). □
We now give an algorithm to generate the MIC sets for an access control policy set. Algorithm 1 includes an underlying presumption that all SSoD and SA policies which do not cause policy inconsistencies have been removed from our consideration by using "static pruning" technique. Given a policy set Q, the algorithm first divides Q into several subsets by the step 1 to 20. By the step 21 to 27, the algorithm combines the different sets which share the permissions and users. This algorithm has a worst-case time complexity of O(mnMN), where m is the number of SSoD policies, n is the number of SA policies, M is the number of users, N is the number of permissions. The fact that CCP is intractable (coNP-complete) means that there exist difficult problem instances that take exponential time in the worst case, while efficient algorithms for CCP exist when the number of policies is not too large. MIC helps to reduce the complexity of reasoning about policy inconsistencies.
Example 2. Continuing from Example 1, we add four policies {e3, e4, f3, f4} to Q, Consider the combination of following SSoD and SA policies.
By Theorem 3, no policy can be removed from our consideration by static pruning. But the permissions in {p4, p5, p6} and the users in {u4, u5, u6} only exist in {e3, e4, f3, f4}, and the policies in {e3, e4, f3, f4} do not affect the consistency of {e1, e2, f1, f2}. By Algorithm 1, Q' can be divided into two policy set , and , such that each set is an MIC set. As shown in Example 1, the policies in are inconsistent. It is easy to find that the policies in are inconsistent, too. Continuing from Example 2, assume that there exist another two policies e5 = ssod <p1, p2, p4, p5, p6}, {u1, u2, u3, u4, u5, u6}, 3> and f5 = sa <{p1, p2, p3, p4, p5, p6}, {u1, u2, u4, u6}, 3>, then the whole policies in {e1, e2, e3, e4, e5, f1, f2, f3, f4, f5} is only one MIC set.
3.2. Measuring the safety-utility tradeoff
Given an MIC set for a policy inconsistency. Often, there may exist many choices for resolving this inconsistency. An interesting question for them is "which choice is optimal?". Our methodology helps policy administrators answer this question.
Algorithm 1. ComputeMIC (Q)
Input: Q = {e1, ..., e
m
, f1, ..., f
n
}
Output: the MIC sets of Q : S1, ..., S
x
1: initialize S1 = ∅, i = 1, j = 1, k = 1;
2: while (i < m||j < n) do
3: ifthen
4: S
k
= S
k
∪ e
i
;
5: i + +;
6: else
7: k + +;
8: continue;
9: end if
10: k = 1;
11: ifthen
12: S
k
= S
k
∪ f
j
;
13: j + +;
14: else
15: k++;
16: continue;
17: end if
18: k = 1;
19: end while;
20: MIC(Q) ← S1, ..., S
x
;
21: for S
k
∈ MIC(Q) do
22: ifthen
23: MIC(Q) = MIC(Q) - S
t
- S
k
;
24: S
k
= S
k
∪ S
t
;
25: MIC(Q) ← S
k
;
26: end if
27: end for
28: return MIC(Q).
Example 3. Let us consider the same policies as the one from Example 1. After removing some policies from Q, the rest of policies will be consistent with each other. For example, resolving the policy inconsistency has the following choices.
-
Removing only one policy:{e1}, {f1}, or {f2}.
-
Removing two policies:{e1, e2}, {e1, f1}, {e1, f2}, {e2, f1}, {e2, f2}, or {f1, f2}.
-
Removing three policies:{e1, e2, f1}, {e1, e2, f2}, {e1, f1, f2}, or {e2, f1, f2}.
Currently we lack a method for measuring the safety-utility tradeoff in policy inconsistency resolving. Removing SSoD policies result in safety loss for the whole safety requirement in Q. Similarly, Removing SA policies result in utility loss for the whole utility requirement in Q. Hence before making the choice, one must ensure that the safety loss and utility loss are limited to an acceptable level. To use our method, one must choose a measure for safety loss (S
loss
) and utility loss (U
loss
).
Definition 7. Let e1and e2be two SSoD policies, we say thatif and only if e1 ≽ e2. Andif and only if e1 ≻ e2.
Where denotes the safety loss caused by removing e1. As is intuitive, choosing to remove the policy with higher restrictive will cause more safety (or utility) loss.
Theorem 5. For any SSoD policies e1= ssod <P1, U1, k1> and e2= ssod <P2, U2, k2>, e1 ≻ e2if and only if (U1 ⊇ U2) ⋀ (k1≥ k2 + | P1 - P2|).
PROOF. For the "if" part, given (U1 ⊇ U2) ⋀ (k1≥ k2 + | P1 - P2|), we show that . There are two cases for (U1 ⊇ U2) ⋀ (k1≥ k2 + | P1 - P2|): (1) P1 ⊆ P2, (2) P1 ⊃ P2. being true means that there exist k2-1 users in U2 together having all the permissions in P2. For case (1), there also exists k2-1 users in U1 together having all the permissions in P1 as (P1 ⊆ P2) ⋀ (U1 ⊇ U2), and (k1 ≥ k2 + |P1 - P2|) ⇒ (k1- 1) ≥ (k2 - 1). Therefore, there exists k1-1 users in U1 together having all the permissions in P1, in other words, is true. For case (2), there also exist k2-1 users in U1 together having all the permissions in P1 ∪ {P2 - P1} as (U1 ⊇ U2). At most |P1 - P2| users together having all the permissions in {P2 - P1}, and (k1 ≥ k2 + | P1 - P2|) ⇒ (k2 - 1) ≤ (k1 - 1) - |P1 - P2|. Thus there exists k1-1 users in U1 together having all the permissions in P1, is also false. Therefore, is true.
For the "only if" part, given e1 ≽ e2, we show that (U1 ⊇ U2) ⋀ (k1 ≥ k2 + |P1 - P2|) is true. Suppose, for the sake of contradiction, that ¬((U1 ⊇ U2) ⋀ (k1 ≥ k2 + |P1 - P2|)) is true. In other words, both U1 ⊇ U2 and k1 ≥ k2 + |P1 - P2| are false. Let e1 and e2 are two SSoD policies, where e1 = ssod <P1, U1, k1>, e2 = ssod <P2, U2, k2>. If U1 ⊇ U2 is false, then ∃u ∈ U2/U1. Assuming that is true, assign all the permissions in P2 to u, and then is false as k2> 1. Therefore, U1 ⊇ U2 is true. If k1 ≥ k2 + |P1 - P2| is false, then k1< k2 + |P1 - P2|. If P1 ⊆ P2, then k1< k2 ⇒ k1 ≤ k2 - 1. being true means that at least k1 users in U1 together having all the permissions in P1. We assume that there exist k1 users in U1 together having all the permissions in P1 in ε; then there exist k2-1 users in U2 together having all the permissions in P2 as to ε (let U1 = U2, and these k1 users also have all the permissions in {P2 - P1}), then is false. If P1 ⊃ P2, let k1< k2 + |P1 - P2|; given an access control state ε that is true, for each permission in {P2 - P1}, assign it to |P1 - P2| different users, and these users are not assigned any other permissions in P1, and then k1-|P1 - P2| users together having all the permissions in P1. Therefore, there exist less than k2 users in U2 together having all the permissions in P2 (let U1 = U2), and therefore, is false. This contradicts the assumption that e1 ≽ e2. Therefore, if e1 ≽ e2, then (U1 ⊇ U2) ⋀ (k1 ≥ k2 + |P1 - P2|). □
Definition 8. Let f1and f2be two SA policies, we say thatif and only if f1 ≽ f2. Andif and only if f1 ≻ f2.
Theorem 6. For any SA policies f1= sa <P1, U1, t1> and f2= sa <P2, U2, t2>, f1 ≽ f2if and only if (P1 ⊇ P2) ⋀ (U1 ⊇ U2) ⋀ (t1 ≤ t2).
PROOF. For the "if" part, given (P1 ⊇ P2) ⋀ (U1 ⊇ U2) ⋀ (t1 ≤ t2), we show that is true. being true means that any size-t1 user set from U1 together having all the permissions in P1. Since (P1 ⊇ P2) ⋀ (U1 ⊇ U2) ⋀ (t1 ≤ t2), for each , and . Therefore, is also true.
For the "only if" part, given f1 ≽ f2, we show that (P1 ⊇ P2) ⋀ (U1 ⊇ U2) ⋀ (t1 ≤ t2) is true. Suppose, for the sake of contradiction, that ¬( P1 ⊇ P2) ⋀ (U1 ⊇ U2) ⋀ (t1 ≤ t2) is true, thus (P1 ⊂ P2) ⋁ (U1 ⊂ U2) ⋁ (t1> t2) is true, then ∃P ∈ P2/P1. Assuming that there exists an access control state ε, and is true. Let P be not assigned to any user in U2, that does not affect . But is false, as no size-t2 user set from U2 can together cover P2. Thus the assumption is false, and P1 ⊇ P2 is true.
If U1 ⊂ U2 is true, then ∃u ∈ U2/ U1. We now can construct a state ε that makes true, but false. By Theorem 1, sat
f
(ε) being true means that each size-t user sets from U cover the permission set P. The above discussion shown that P1 ⊇ P2 is true, and let t1 = t2. As |U2| + 1 - t2> |U1| + 1 - t1, is true, which contradicts the assumption, and thus U1 ⊇ U2 is true.
If t1> t2 is true, let . As shown above, , such as for any state ε that . Thus we only need to construct a state ε that is true, but is false as follows. Find a size-t1 user set U' ⊂ U2, and partition P2 into t1 disjoint sets , such that the permissions in each set be assigned to each user in U', respectively. Without any one user in U' can not cover P2. Since t1> t2, we can find a size-t2 user set U'' ⊂ U' that the users in U'' do not together have all the permissions in P2. In other words, is false, and is also false. This contradicts the assumption, and thus t1 ≤ t2 is true. Consequently, if f1 ≽ f2, then (P1 ⊇ P2) ⋀ (U1 ⊇ U2) ⋀ (t1 ≤ t2). □
After computing the rank of S
loss
for each SSoD policy and U
loss
for each SA policy. A fundamental problem in inconsistency resolving is how to make the right tradeoff between safety and utility. However, it is inappropriate to directly compare safety with utility. The most important reason is that removing SSoD policies will increase the safety loss for the whole policies, but will not increase the utility gain. Similarly, removing SA policies will increase the utility loss for the whole policies, but will not increase the safety gain. For example, if we choose to remove {e1, e2} in Example 5, then S
loss
= 100%, U
loss
= 0%. And if we choose to remove {f1, f2}, then S
loss
= 0%, U
loss
= 100%.
If safety and utility cannot be directly compared, how should one consider them in a policy set for inconsistency resolution? For this, given a number of policy sets that are candidates for removing, for each of which we measure its safety loss S
loss
and its utility loss U
loss
. We can obtain a set of (S
loss
, U
loss
) pairs, one for each set. An ideal (but unachievable) choice will have the smallest S
loss
and U
loss
. For this, we need to be able to compare two different (S
loss
, U
loss
) pairs.
Definition 9. Given two pairs (S
loss
, U
loss
)1, and (S
loss
, U
loss
)2, we define (S
loss
, U
loss
)1 ≤ (S
loss
, U
loss
)2if and only if. And (S
loss
, U
loss
)1 < (S
loss
, U
loss
)2if and only if.
Definition 10. Let A and B be two policy sets; removing A will caused (S
loss
, U
loss
)
A
, and removing B will caused (S
loss
, U
loss
)
B
. We say that the choice of removing A is at least as optimal as removing B (denoted by (S
loss
, U
loss
)
A
⊵ (S
loss
, U
loss
)
B
) if (S
loss
, U
loss
)
A
≤ (S
loss
, U
loss
)
B
. And the the choice of removing A is better than removing B (denoted by (S
loss
, U
loss
)
A
⊳ (S
loss
, U
loss
)
B
) if (S
loss
, U
loss
)
A
< (S
loss
, U
loss
)
B
.
Example 4. Let us consider the following policy sets from Example 3 that can be removed to resolve the policy inconsistency. S1 = {e1}, S2 = {f1}, S3 = {e1, e2}, S4 = {f1, f2}, S5 = {e1, e2, f1}.
Obviously, , and . Thus S1 and S2 are two ideal choices to resolve the policy inconsistency.
3.3. Prioritized-based resolution
The notion of priority is very important in the study of knowledge based systems, since inconsistencies have a better chance to be resolved. The following subsections present two prioritized-based approaches to deal with policy inconsistencies. We first present the possibilistic logic approach, which selects one consistent subbase. And we then give the lexicographical inference approach, which selects several maximally consistent subbases [7]. We assume that knowledge bases Ψ are prioritized. Prioritized knowledge bases have the form Ψ = Ψ E ∪ Ψ F , where , , E and F denote all the SSoD and SA policies in the system, respectively. Formulas in (or ) have the same level of priority and have higher priority than the ones in (or ) where j > i. (or ) contains the one which have the highest priority in Ψ, and (or ) contains the one which have the lowest priority in Ψ.
3.3.1. Possibilistic logic approach
Possibilistic logic approach selects one suitable consistent prioritized sub-base of Ψ, whereas the other policies in complement set for the subbase of Ψ
Algorithm 2. GeneratePoss(Ψ)
Input: knowledge bases Ψ = Ψ E ∪ Ψ F
Output: Poss(Ψ)
1: initialize, i = 1, j = 1;
2: while (i ≤ m&&j ≤ n) do
3: if Poss(Ψ) is inconsistent then
4: ;
5: if is consistent then
6: ;
7: i++;
8: else
9: fordo
10: if Poss(Ψ) ∪ p is consistent then
11: Poss(Ψ) = Poss(Ψ) ∪ p;
12: end if
13: end for
14: end if
15: if is consistent then
16: ;
17: j + +;
18: else
19: fordo
20: if Poss(Ψ) ∪ f is consistent then
21: Poss(Ψ) = Poss(Ψ) ∪ f;
22: end if
23: end for
24: end if
25: else
26: i++;
27: j ++;
28: ;
29: end if
30: end while;
31: return Poss(Ψ).
should be removed. We should extract a subbase φ(Ψ) from Ψ, which is made of the first x-important and consistent strata(levels): φ(Ψ) = S1 ∪ ⋯ ∪ S
x
, such that S1 ∪ ⋯ ∪ S
x
is consistent, but S1 ∪ ⋯ ∪ Sx+1 is inconsistent.
Definition 11. We define Poss(Ψ) as the set of the preferred consistent possibilistic subbase of Ψ : Poss(Ψ) = {A: A ⊆ Ψ is consistent and ∄B ⊆ Ψ is consistent where B ⊃ A}.
We now give an algorithm to compute the Poss(Ψ) for Ψ (shown in Algorithm 2). This algorithm iteratively adds the SSoD and SA policies with higher priority. Removal of the policies not in Poss(Ψ) is essential to satisfy the consistency for the other policies in Ψ. This algorithm has a best-case time complexity of O(mn), and a worst-case time complexity of O(mnM 2 N ), wherem is the number of SSoD policies, n is the number of SA policies, M is the number of users, and N is the number of permissions.
Example 5. Consider the combination of following SSoD and SA policies.
By Theorems 5 and 6, we can find that e1 ≻ e2, f1 ≻ f2. Thus Ψ = Ψ E ∪ Ψ F , where , , , , , . By Algorithm 2, . Therefore, the removal of f3 is an optimal choice to resolve the policy inconsistency.
3.3.2. Lexicographical inference approach
The possibilistic way of dealing with inconsistency is not entirely satisfactory since it only considers the first x-important consistent formulas having the highest priority. However, the less certain formulas may be not responsible for inconsistencies that should also be taken into account. The idea of lexicographical inference approach is to select not only one consistent subbase but several maximally consistent subbases. Obviously, the lexicographical inference is more expensive than the possibilistic logic.
Definition 12. A consistent subbase A ⊆ Ψ is said to be lexicographically preferred to a consistent subbase B ⊆ Ψ, denoted by A ⊳
lex
B, if there exists a level i(1 ≤ i ≤ m) and j(1 ≤ j ≤ n) such that:
Definition 13. We define Lex(Ψ) as the set of all preferred consistent lexicographical subbases of Ψ : Lex(Ψ) = {A: A ⊆ Ψ is consistent and ∄B ⊆ Ψ is consistent, B ⊳
lex
A}.
We now give an algorithm to generate Lex(Ψ) that covers all preferred consistent possibilistic subbases of Ψ. The algorithm is similar to Algorithm 2, but we add following improvements as follows. Given the knowledge bases Ψ = Ψ E ∪ Ψ F : if or is inconsistent, the algorithm does not stop (While in Algorithm 2, any policies in , will not be considered, where k > i, l > j), by repeatedly adding policies in and to Poss(Ψ). In the enumeration approach, the algorithm tries all possibilities. Eventually, the algorithm outputs all preferred consistent possibilistic subbases of Ψ, such as Lex(Ψ). In Example 4. There exists two lexicographically consistent subbases that A = {e1, e2, f1, f2}, B = {e1, f1, f2, f3}, then Lex(Ψ) = {A, B}.