XACML stands for "eXtensible Access Control Markup Language". The standard defines a declarative fine-grained, attribute-based access control policy language, an architecture, and a processing model describing how to evaluate access requests according to the rules defined in policies.
As a published standard specification, one of the goals of XACML is to promote common terminology and interoperability between access control implementations by multiple vendors. XACML is primarily an Attribute Based Access Control system (ABAC), where attributes (bits of data) associated with a user or action or resource are inputs into the decision of whether a given user may access a given resource in a particular way. Role-based access control (RBAC) can also be implemented in XACML as a specialization of ABAC.
The XACML model supports and encourages the separation of the access decision from the point of use. When access decisions are baked into client applications (or based on local machine userids and Access Control Lists (ACLs)), it is very difficult to update the decision criteria when the governing policy changes. When the client is decoupled from the access decision, authorization policies can be updated on the fly and affect all clients immediately.
- 1 History
- 2 Architecture
- 3 Policy elements
- 4 Combining algorithms
- 5 XACML 3.0
- 6 Sample Policies
- 7 Implementations
- 8 Developer orientation
- 9 XACML and Other Standards
- 10 See also
- 11 Notes
- 12 External links
Non normative terminology (following RFC 2904, except for PAP)
|PAP||Policy Administration Point - Point which manages access authorization policies|
|PDP||Policy Decision Point - Point which evaluates access requests against authorization policies before issuing access decisions|
|PEP||Policy Enforcement Point - Point which intercepts user's access request to a resource, makes a decision request to the PDP to obtain the access decision (i.e. access to the resource is approved or rejected), and acts on the received decision|
|PIP||Policy Information Point - The system entity that acts as a source of attribute values (i.e. a resource, subject, environment)|
|PRP||Policy Retrieval Point - Point where the XACML access authorization policies are stored, typically a database or the filesystem.|
- A user sends a request which is intercepted by the 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. If needed it also retrieves attribute values from underlying Policy Information Points.
- The PDP reaches a decision (Permit / Deny / NotApplicable / Indeterminate) and returns it to the PEP
XACML is structured into 3 levels of elements:
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.
XACML provides a target, which is basically a set of simpliﬁed 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 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-id==doctor-id. With conditions, it is possible to implement segregation of duty checks or relationship-based access control.
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.
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 the <Policy> or <PolicySet> elements, respectively. The rule-combining algorithm defines a procedure for arriving at an access decision given the individual results of evaluation of a set of rules. Similarly, the policy-combining algorithm defines a procedure for arriving at an access decision given the individual results of evaluation of a set of policies.
New in XACML 3.0
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 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.0
Time-based Authorization in XACML
This rule grants access if the current time is greater than 9am and less than 5pm.
<xacml3:Rule RuleId="c01d7519-be21-4985-88d8-10941f44590a" Effect="Permit"> <xacml3:Description>Allow if time between 9 and 5</xacml3:Description> <xacml3:Target> <xacml3:AnyOf> <xacml3:AllOf> <xacml3:Match MatchId="urn:oasis:names:tc:xacml:1.0:function:time-less-than"> <xacml3:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">09:00:00</xacml3:AttributeValue> <xacml3:AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" MustBePresent="false" DataType="http://www.w3.org/2001/XMLSchema#time"/> </xacml3:Match> </xacml3:AllOf> </xacml3:AnyOf> <xacml3:AnyOf> <xacml3:AllOf> <xacml3:Match MatchId="urn:oasis:names:tc:xacml:1.0:function:time-greater-than"> <xacml3:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">17:00:00</xacml3:AttributeValue> <xacml3:AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" MustBePresent="false" DataType="http://www.w3.org/2001/XMLSchema#time"/> </xacml3:Match> </xacml3:AllOf> </xacml3:AnyOf> </xacml3:Target> </xacml3:Rule>
|Name||XACML version||Technology||License||Profiles supported|
|Axiomatics Policy Server||XACML 3.0||Java, .NET||Commercial||Core, Multiple Decision Profile, JSON Profile of XACML, REST Profile of XACML, ...|
|ndg-xacml||XACML 2.0||Python||Open Source||Core|
|SunXACML||XACML 2.0||Java||Open Source||Core|
|Balana||XACML 3.0||Java||Open Source||Core|
|OpenAZ (Apache Incubator, previously AT&T XACML)||XACML 3.0||Java||Apache 2||Core, Multiple Decision Profile, JSON Profile of XACML, REST Profile of XACML|
In 2013 and 2014, the XACML Technical Committee focused on designing new profiles to facilitate developer integration. These include:
- The REST profile of XACML written by Remon Sinnema of EMC
- The JSON profile of XACML written by David Brossard of Axiomatics
- The ALFA profile of XACML written by Pablo Giambiagi, Srijith Nair, and David Brossard of Axiomatics
All three profiles were showcased at the Cloud Identity Summit 2014 in Monterey, California. Using these profiles, integrating fine-grained authorization into applications becomes much easier.
XACML and Other Standards
XACML and SAML
SAML is an identity SSO and federation standard used for authentication. SAML is used as a common identity token format between different applications. SAML and XACML are both defined by OASIS. SAML and XACML were designed to interoperate where SAML is used to carry identity information / virtual identities and XACML is used to drive the access control logic through policies.
XACML and OAuth
OAuth 2.0 is considered to be an authorization standard. It differs from XACML though in its origin, its purpose, and its applications. OAuth is about:
- delegated access control: I, the user, delegate another user or service access to the resource I own. For instance via OAuth, I grant Twitter (the service) the ability to post on my Facebook wall (the resource).
- handling the password anti-pattern. Whenever you want to integrate 2 services together, in a traditional, legacy model you have to provide service B with your user credentials on service A so that service B can pretend to be you with Service A. This has many risks of course. Using OAuth eliminates the issues with these patterns and lets the user control what service B can do on behalf of the user with service A.
- HTTP-based services / resources
- managing owner (user) approval
XACML does not handle user approval or delegated access or password management. XACML simply provides:
- An access control architecture with the notion of a Policy Decision Point (PDP) as previously discussed and a Policy Enforcement Point (PEP).
- a policy language with which to express a wide range of access control policies including policies that can use consents handled / defined via OAuth.
XACML and OAuth can be combined together to deliver a more comprehensive approach to authorization.
- Role-based access control
- Attribute Based Access Control
- Mandatory access control
- Discretionary access control
- Model-driven security
- "pure-xacml". www.axiomatics.com. Retrieved 2016-04-27.
- "XACML 3.0 - committee specification 01.". OASIS (oasis-open.org). Retrieved 10 August 2010.
- eXtensible Access Control Markup Language (XACML) V3.0 approved as an OASIS Standard, eXtensible Access Control Markup Language (XACML) V3.0 approved as an OASIS Standard.
- "Understanding XACML combining algorithms". www.axiomatics.com. Retrieved 2016-04-27.
- XACML v3.0 Administrative Policy Version 1.0
- "OAuth: How It Works". Ping Identity. Retrieved 2016-05-26.
- Axiomatics Language for Authorization (ALFA), a free eclipse plugin for XACML 3.0 authoring via a simple DSL
- eXtensible Access Control Markup Language
- XACML for Authorization
- HERAS-AF: An Open Source Project providing an XACML-based Security Framework
- JBoss XACML - Open Source LGPL licensed library
- OASIS XACML committee website
- OASIS declaration of issues with two software patents of IBM
- XACML 2.0 PDP and PAP implemented as Axis2 web services
- XACML authorization for many PAM enabled applications
- ZXID http://zxid.org
- OpenAz - Java and C++ Language bindings for XACML with prototypes based on SUN XACML lib
- Xacml4j XACML 2.0 & 3.0 implementation in Java programming language