3 4
3 4
3
A. Abstracting XACML Policy Components
We consider a subset of XACML that covers more con-
structs than the ones considered in [28] and [16]. We allow
the most general form of Target, take into account Condition,
and cover all four combining algorithms.
XACML components can be abstracted as follows: At-
tributes are the names of elements used by a policy.
Attributes are divided into three categories: subject at-
tributes, resource attributes and action attributes. In the
example policy above, developer, tester and employee
are subject attributes; read and change are action at-
tributes; codes is a resource attribute. A Target is a triple
Figure 3. Logic-based policy reasoning for XACML. ⟨Subjects, Resources, Actions⟩. A Condition is a conjunction
of comparisons. An Effect is either “permit,” “deny,” or
“indeterminate.”
closure of edge.
• An XACML rule can be abstracted as
reachable(X, Y ) ← edge(X, Y )
reachable(X, Y ) ← reachable(X, Z), reachable(Z, Y ) ⟨RuleID, Effect, Target, Condition⟩
Several extensions were made over the last twenty years. where RuleID is a rule identifier. For example, rule r1
The addition of cardinality constraints turns out to be useful in Figure 1 can be viewed as
in knowledge representation. A cardinality constraint is
⟨r1 , permit, ⟨employee, read ∨ change, codes⟩,
of the form lower{l1 , . . . , ln }upper where l1 , . . . , ln are 8 ≤ time ≤ 17⟩.
literals and lower and upper are numbers. A cardinality
constraint is satisfied if the number of satisfied literals in • An XACML policy can be abstracted as
l1 , . . . , ln is in between lower and upper. It is also allowed ⟨PolicyID, Target , Combining Algorithm, ⟨r1 , . . . , rn ⟩⟩
to contain variables in cardinality constraints. For instance,
where PolicyID is a policy identifier, r1 , . . . , rn
more than one edge(X) ← 2{edge(X, Y ) : vertex(Y )}.
are rule identifiers and Combining Algorithm is
means that more than one edge(X) is true if there are at either permit−overrides, deny−overrides, or
least two edges connect X with other vertices. first−applicable. For example, policy p1 in Fig-
The language also has useful constructs, such as strong ure 1 is abstracted as:
negations, weak constraints, and preferences. What distin- ⟨p1 , Null, permit−overrides, ⟨r1 , r2 ⟩⟩.
guishes ASP from other nonmonotonic formalisms is the
availability of several efficient implementations, answer set • Similarly we can abstract an XACML policy set as
solvers, such as SMODELS1 , CMODELS2 , CLASP3 , which led ⟨PolicySetID, Target, Combining Algorithm,
to practical nonmonotonic reasoning that can be applied to ⟨p1 , . . . , pm , psm+1 , . . . , psn ⟩⟩
industrial level applications.
where PolicySetID is a policy set identifier,
III. G ENERAL XACML P OLICY A NALYSIS p1 , . . . , pm are policy identifiers, psm+1 , . . . , psn
We introduce a logic-based policy reasoning approach for are policy set identifiers, and Combining Algorithm
XACML as shown in Figure 3. First, XACML policies are is either permit−overrides, deny−overrides,
converted to ASP programs. Then, by means of off-the-shelf first−applicable, or only−one−applicable. For
ASP solvers, several typical policy analysis services, such example, policy set ps1 can be viewed as
as policy verification, comparison, redundancy and querying ⟨ps1 , Null, first−applicable, ⟨p1 , p2 ⟩⟩.
are utilized. For instance, policy verification is to check
if ASP-based representation of XACML policies entails B. Turning XACML into ASP
the property as certain formulas in its specification, policy
comparison checks the equivalence between two answer set We provide a translation module that turns an XACML
programs, and policy redundancy checking can be viewed as description into a program in ASP. This interprets a formal
an instance of simplification of ASP programs. semantics of XACML language in terms of the Answer Set
semantics.
1 http://www.tcs.hut.fi/Software/smodels .
2 http://www.cs.utexas.edu/users/tag/cmodels.html
The translation module coverts an XACML rule
.
3 http://potassco.sourceforge.net . ⟨RuleID, Effect, Target, Condition⟩