History
Version 1.0 was ratified byArchitecture
Terminology
Non-normative terminology (following RFC 2904, except for PAP)Flow
# A user sends a request which is intercepted by the Policy Enforcement Point (PEP) # The PEP converts the request into a XACML authorization request # The PEP forwards the authorization request to the Policy Decision Point (PDP) # The PDP evaluates the authorization request against the policies it is configured with. The policies are acquired via the Policy Retrieval Point (PRP) and managed by the Policy Administration Point (PAP). If needed it also retrieves attribute values from underlying Policy Information Points (PIP). # The PDP reaches a decision (Permit / Deny / NotApplicable / Indeterminate) and returns it to the PEPPolicy elements
Structural elements
XACML is structured into 3 levels of elements: * PolicySet, * Policy, * Rule. A policy set can contain any number of policy elements and policy set elements. A policy can contain any number of rule elements.Attributes and categories
Policies, policy sets, rules and requests all use subjects, resources, environments, and actions. * A subject element is the entity requesting access. A subject has one or more attributes. * The resource element is a data, service or system component. A resource has one or more attributes. * An action element defines the type of access requested on the resource. Actions have one or more attributes. * An environment element can optionally provide additional information.Targets
XACML provides a target, which is basically a set of simplified conditions for the subject, resource, and action that must be met for a policy set, policy, or rule to apply to a given request. Once a policy or policy set is found to apply to a given request, its rules are evaluated to determine the access decision and response. In addition to being a way to check applicability, target information also provides a way to index policies, which is useful if you need to store many policies and then quickly sift through them to find which ones apply. When a request to access that service arrives, the PDP will know where to look for policies that might apply to this request because the policies are indexed based on their target constraints. Note that a target may also specify that it applies to any request. Policy set, policy and rule can all contain target elements.Conditions
Conditions only exist in rules. Conditions are essentially an advanced form of a target which can use a broader range of functions and more importantly can be used to compare two or more attributes together, e.g. subject-iddoctor-id. With conditions, it is possible to implement segregation of duty checks or relationship-based access control.Obligations & Advice
Within XACML, a concept called obligations can be used. An obligation is a directive from the policy decision point (PDP) to the policy enforcement point (PEP) on what must be carried out before or after an access is approved. If the PEP is unable to comply with the directive, the approved access ''may'' or ''must'' not be realized. The augmentation of obligations eliminates a gap between formal requirements and policy enforcement. An example of an obligation could look like this:Access control rule: Allow access to resource MedicalJournal with attribute patientID=x if Subject match DesignatedDoctorOfPatient and action is read with obligation on Permit: doLog_Inform(patientID, Subject, time) on Deny : doLog_UnauthorizedLogin(patientID, Subject, time)The XACML's obligation can be an effective way to meet formal requirements (non-repudiation for example) that can be hard to implement as access control rules. Furthermore, any formal requirements will be part of the access control policy as obligations and not as separate functions, which makes policies consistent and centralization of the IT environment easier to achieve. Obligations can be used for "break-the-glass" scenarios or trust elevation ("you cannot transfer $1,000 without two-factor authentication - here is the link to the 2FA page"). In addition to obligations, XACML supports advice which are identical to obligations with the difference that a PEP is not obligated to enforce the advice (hence its name).
Combining algorithms
What happens in XACML if there are two rules (or policies) that contradict each other? Imagine for instance a first rule that would say ''managers can view documents'' and a second rule that would say ''no one can work before 9am''. What if the request is about Alice trying to view a document at 8am? Which rule wins? This is what combining algorithms tell us. They help resolve conflicts. XACML defines a number of combining algorithms that can be identified by a ''RuleCombiningAlgId'' or ''PolicyCombiningAlgId'' attribute of theFunctions
XACML defines a long list of functions (close to 300) to manipulate and compare attributes to other attributes and values: * Equality, inequality and other matching functions * Arithmetic functions * String functions * Logical functions (and, or, not) * Set and bag functions * Higher order functions * Regular expression functions * XPath functions The functions and their identifiers are fullEquality, inequality and other matching functions
Arithmetic functions
String functions
Logical functions (and, or, not)
Set and bag functions
Regular expression functions
XPath functions
Higher order functions
The list of higher order functions is as listed below. For a formal definition, refer to thXACML 3.0
Schema
http://docs.oasis-open.org/xacml/3.0/xacml-core-v3-schema-wd-17.xsdData types
* http://www.w3.org/2001/XMLSchema#anyURI * http://www.w3.org/2001/XMLSchema#base64Binary * http://www.w3.org/2001/XMLSchema#boolean * http://www.w3.org/2001/XMLSchema#date * http://www.w3.org/2001/XMLSchema#dateTime * http://www.w3.org/2001/XMLSchema#dayTimeDuration * http://www.w3.org/2001/XMLSchema#double * http://www.w3.org/2001/XMLSchema#hexBinary * http://www.w3.org/2001/XMLSchema#integer * http://www.w3.org/2001/XMLSchema#string * http://www.w3.org/2001/XMLSchema#time * http://www.w3.org/2001/XMLSchema#yearMonthDuration * urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name * urn:oasis:names:tc:xacml:1.0:data-type:x500Name * urn:oasis:names:tc:xacml:2.0:data-type:dnsName * urn:oasis:names:tc:xacml:2.0:data-type:ipAddress * urn:oasis:names:tc:xacml:3.0:data-type:xpathExpressionNew in XACML 3.0
New profiles
XACML 3.0 introduces administrative delegation, the JSON Profile of XACML (request/response), the REST Profile of XACML, the Multiple Decision Profile of XACML, and many more.= Delegation
= The implementation of delegation is new in XACML 3.0. The delegation mechanism is used to support decentralized administration of access policies. It allows an authority (delegator) to delegate all or parts of its own authority or someone else's authority to another user (delegate) without any need to involve modification of the root policy. This is because, in this delegation model, the delegation rights are separated from the access rights. These are instead referred to as administrative control policies. Access control and administrative policies work together as in the following scenario: A partnership of companies' many services are protected by an access control system. The system implements the following central rules to protect its resources and to allow delegation:Access control rules: Allow access to resource with attribute WebService if subject is Employee and action is read or write. Administration control rules: Allow delegation of access control rule #1 to subjects with attribute Consultant. Conditions: delegation must expire within 6 months, resource must not have attribute StrictlyInternal.(Attributes can be fetched from an external source, e.g. a LDAP catalog.) When a consultant enters the corporation, a delegation can be issued locally by the consultant's supervisor, authorizing the consultant access to systems directly. The delegator (the supervisor in this scenario) may only have the right to delegate a limited set of access rights to consultants.
Other features
Other new features of XACML 3.0 are listed at http://www.webfarmr.eu/2010/07/enhancements-and-new-features-in-xacml-3-axiomatics/ The XACML TC is also publishing a list of changes here: http://wiki.oasis-open.org/xacml/DifferencesBetweenXACML2.0AndXACML3.0Sample policies
Date and time-based authorization in XACML
This rule implements thTime-based authorization in XACML
This rule grants access if the current time is greater than 9am and less than 5pm.Sample requests and responses
XACML 3.0 request
XACML 3.0 responses
XACML 3.0 sample response
XACML 3.0 sample response with obligation
The following contains an Obligation block. Obligations are statements that can be returned along with a decision to enrich the decision flow. In this example, the PEP must log that access was granted.The Multiple Decision Profile of XACML 3.0
By default a PDP processes a single request at a time e.g. "Can Alice view item #1?". The PDP then replies with a single decision. At times, though, it is necessary to send multiple requests in one go e.g. "Can Alice view / edit / delete items #1, #2, #3?". ThSample JSON Request for the Multiple Decision Profile
The way to enable the MDP is to send an array of objects for any of the categories rather than an array of one object (or simply an object). For instance, AccessSubject is an object but Resource is an array of objects. The latter will trigger the MDP process in PDPs that support the profile. Note as well the use of the IncludeInResult attribute which tells the PDP to return the XACML attribute and its value in the response so that decisions can be correlated to the relevant attribute values.Sample JSON Response for the Multiple Decision Profile
Developer orientation
In 2013 and 2014, the XACML Technical Committee focused on designing new profiles to facilitate developer integration. These include: * TheThe ALFA Profile of XACML
ALFA stands for Abbreviated Language for Authorization. It is a lightweight syntax used to implement policy-based access control policies. For examples refer to the main article.The JSON Profile of XACML
The JSON profile of XACML simplifies the integration between the PEP and the PDP.Sample JSON request
Sample JSON response
XACML and other standards
XACML and Open Policy Agent
XACML is almost entirely a policy definition language based on