Commit 438ce239 authored by cdanger's avatar cdanger

- Added support of OASIS XACML Committee's 2.0 version of conformance

tests upgraded to conform to the XACML 3.0 standard. Most of them have
been submitted to the OASIS XACML Committee in April 2014 by AT&T.
The original files are available on the xacml-comment mailing list: 
https://lists.oasis-open.org/archives/xacml-comment/201404/msg00001.html
and on AT&T's Github repository (MIT License): 
https://github.com/att/XACML/wiki/XACML-TEST-Project-Information
except IIA010, IIA012, IIA024, IID029, IID030 and III.C (test 1 is the
only one support in this latter category)
- Added feature with unit test: Policy Reference depth control and
circular reference detection
- Added feature with unit test: Variable Reference depth control and
circular reference detection
- Added option to enable/disable XPath support (xpathExpression
datatype, AttributeSelector and xpath functions)
- Added support of xpathExpressions in Request with support of
namespace-prefix mappings extracted from XML document
(...xmlns:prefix="uri"...) where the xpathExpression is defined, i.e.
XACML Request or Policy(Set), in native policy finders
- Added support of xpath-node-count function (optional XACML feature)
- Added support of optional XACML features: RequestDefaults/XPathVersion
for evaluation of xpathExpressions in Request, and ReturnPolicyIdList to
return identifiers of policies found applicable for the Request
- New modes of request parsing/filtering for enforce best practices and
tweak performances of Request processing:
1) strictAttributeIssuerMatch: parsing so that AttributeDesignator
without Issuer only match request Attributes without Issuer (better
performance if all Attributes have an Issuer which is recommended, but
not fully XACML (§5.29) compliant)
2) allowAttributeDuplicates: allow defining multi-valued attributes by
repeating the same XACML Attribute (same AttributeId) within a XACML
Attributes element (same Category). Indeed, not allowing this is not
fully compliant with the XACML spec according to a discussion on the
xacml-dev mailing list (see {@linkplain
"https://lists.oasis-open.org/archives/xacml-dev/201507/msg00001.html"}),
referring to the XACML 3.0  core spec, §7.3.3, that indicates that
multiple occurrences of the same <Attribute> with same meta-data
but different values should be considered equivalent to a single
<Attribute> element with same meta-data and merged values
(multi-valued Attribute). Moreover, the XACML 3.0 conformance test
'IIIA024' expects this behavior: the multiple subject-id Attributes are
expected to result in a multi-value bag during evaluation of the
<AttributeDesignator>. Setting this parameter to {@code false} is
not fully compliant, but provides better performance, especially if you
know the Requests to be well-formed, i.e. all AttributeValues of a given
Attribute are grouped together in the same <Attribute> element.
Combined with strictAttributeIssuerMatch == true, this is the most
efficient alternative (although not fully compliant).
- Fixed non-compliance of Request Content parsing for XPath eval (use
the single child element of Content node as XML input doc to XPath eval,
NOT the Content node itself) -> removed useless need of JAXBContext and
creating JAXBSource for parsing into XDMnode -> perf improved
- Fixed AttributeSelector evaluation for XPath to XML attribute value
(return the attribute value as a string instead of an Attribute
node/entry "attributeName=attributeValue"
- Fixed VariableReferenceDepth control (reference chain was not updated
properly)
- Fixed PolicySetIdReference Depth control (reference chain was not
updated properly)
- Use of new immutable version of xacml-model where all XACML/JAXB
objects are immutable -> significant changes in way to create these
objects during evaluation, esp. Obligations and Advices
- Fix ordering of obligations/advices when merging a given Policy(Set)'s
obligations/advices with the child elements' (Policy/Rule) ones
- Fixed static pre-eval on <Apply> with xpathExpression (should not
pre-eval statically, i.e. out of context, since xpathExpression value
depends on context
- Replaced RELEASE-NOTES.md with CHANGELOG.md to adopt conventions from
keepachangelog.com
- Improved unit tests: ability to plug the TestAttributeProviderModule
configured with a file XXXAttributeProvider.xml to the PDP for specific
tests, also to plug referenced Policies for the RefPolicyFinder of the
PDP with 'refPolicies' directory containing Policy(Set)files; and
ability to test for Policy or Request syntax error checking only (no
Request evaluation by PDP)
- Improved test class TestUtils to create a PDP instance with XPath
support disabled/enabled and specific request filter ID on the PDP
- Improved TestAttributeProviderModule supports any static configuration
of Attributes (with contant values); same format as in XACML Requests
- Removed license header of Apache2 (replaced with GPL)
- Removed NOTICE.txt obsolete ("Apache AuthZForce" does not exist)
- Conformance tests split in 'mandatory' and 'optional' folder to
distinguish XACML mandatory feature from optional feature testing
- Change logback dependency scope from 'compile' to 'test' as we need it
only for tests, not for compiling -> simplifies dependencies
- Replaced dependency spring-xml (obsolete) with spring-core because we
only use org.springframework.util.* -> simplifies dependencies 
- Fix header plugin that was missing path to header license, and
'format' goals
- Refactor - extracted PDP interface and moved default implementation to
PDPImpl class, to hide internals from potential PDP API client and
improve genericity
- Refactor - extracted RequestFilter interface from abstract class and
moved abstract class code to BaseRequestFilter class to hide internals
from potential RequestFilter API client and improve genericity; and to
merge common code between DefaultRequestFilter and
MultiDecisionRequestFilter
- Refactor - extracted IndividualDecisionRequest interface from abstract
class and moved abstract class code to MutableIndividualDecisionRequest
and ImmutableIndividualDecisionRequest classes, to hide internals from
potential RequestFilter API client and improve genericity
- Made BasePdpExtensionRegistry mutable to allow adding extensions after
creating instance from an exiting one
- DecisionResult renamed to more explicit name PolicyDecisionResult
- Moved old README content to another project (rest-service) since does
not apply anymore, and replaced with proper content.
parent ce305116

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

# Change log
All notable changes to this project are documented in this file following the conventions at keepachangelog.com.
This project adheres to [Semantic Versioning](http://semver.org).
## Unreleased
## 3.5.5
- License changed to GPLV3
## 3.5.2
- Bug fixed when there were more than one AnyOf and AllOf.
- Only the Match element was evaluated with the "match(context)" function
- Unitary tests were added to complete and prevent that from happening again
## 3.4.2
- Fixing bugs on deny-unless-permit and permit-unless-deny rule combining algorithms (misplaced cast)
## 3.4.0
- Implementation working with XACML 3.0 requests and policies compliant with OASIS XACML model (xsd)
- Artifact name refactored => authzforce-core-authzforce
- Partial implementation of the Multiple Decision Profile. The MultiRequests scheme is not implemented yet
- Functionnal tests added for XACML 3.0 model. This is actually the OASIS functional tests translated to a v3.O model.
- Implementation of the "IncludeInResult" attribute
- Full support of obligations
- Full support of advices
- Apache 2.0 licence headers added to every source file
- XACML 3.0 Combining algorithms implemented: deny-unless-permit, deny-unless-permit, permit-unless-deny, permit-unless-deny
- XACML 3.0 Functions implemented: string-starts-with, string-ends-with, string-contains, string-substring,
## 2.1.4
- Stable version working with XACML 2.0
Apache AuthZForce
Copyright 2013 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
This diff is collapsed.
-------------------------
AuthZForce CORE version @version- Release Notes
-------------------------
-------------------
-- Version @version
-------------------
-------------------
-- Version 3.5.5-SNAPSHOT
-------------------
License changed to GPLV3
-------------------
-- Version 3.5.2-SNAPSHOT
-------------------
Bug fixed when there were more than one AnyOf and AllOf.
Only the Match element was evaluated with the "match(context)" function
Unitary tests were added to complete and prevent that from happening again
-------------------
-- Version 3.4.2
-------------------
Fixing bug on Rule Algorithm:
- DenyUnlessPermitRuleAlg.java
- PermitUnlessDenyRuleAlg.java.
=> A cast was misplaced and an error occured on the combination of rules
-------------------
-- Version 3.4.0
-------------------
Implementation working with XACML 3.0 requests and policies. Based on OASIS model (xsd)
Artifact name refactored => authzforce-core-authzforce in order to be more clear in the Nexus repository
Partial implementation of the Multi Decision Request. The Multi Request is not implemented yet
Functionnal tests added for XACML 3.0 model. This is actually the OASIS functionnal tests translated to a v3.O model
BasicV3 => OK
BasicFunctionV3 => OK
ConformanceV3 => OK
Implementation of the "Include in result" attribute
Full support of obligations
Full support of advices
Apache 2.0 licence headers added to every source file
Audit log based on annotations for Rule and Policies.
Use @Audit(type = [RULE || POLICY]) over a method returning a result. You can also use @Audit(type = DISPLAY) to display and clear the logs.
Non exhaustif list of improvement and implementation
Combining algorithm
OK urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit
OK urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-unless-permit
OK urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-unless-deny
OK urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-unless-deny
Functions
OK urn:oasis:names:tc:xacml:3.0:function:string-starts-with
OK urn:oasis:names:tc:xacml:3.0:function:string-ends-with
OK urn:oasis:names:tc:xacml:3.0:function:string-contains
OK urn:oasis:names:tc:xacml:3.0:function:string-substring
-------------------
-- Version 2.1.4
-------------------
Stable version working with XACML 2.0
Copyright (C) ${inceptionYear}-${currentYear} ${copyrightOwner} - All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\ No newline at end of file
This diff is collapsed.
Copyright (C) ${inceptionYear}-${currentYear} ${copyrightOwner}. All rights reserved. No warranty, explicit or implicit, provided.
\ No newline at end of file
......@@ -42,16 +42,14 @@
<dependencies>
<!-- Third-party dependencies -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<!-- For redirecting Spring logs to slf4j -->
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-xml</artifactId>
<!-- Needed for org.springframework.util.ResourceUtils,SystemPropertyUtils,FileCopyUtils, etc. -->
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<!-- For loading XML schemas with OASIS catalog (CatalogManager) -->
......@@ -87,6 +85,11 @@
<!-- /Authzforce dependencies -->
<!-- Test dependencies -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
......@@ -137,25 +140,30 @@
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*.html</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.txt</exclude>
<exclude>**/*.ec</exclude>
<exclude>**/*.log</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*.js</exclude>
<exclude>**/*.jsp</exclude>
<exclude>**/*.md</exclude>
<exclude>**/*.properties</exclude>
<exclude>**/*.gitignore</exclude>
</excludes>
<header>license/thales-gpl.header.txt</header>
<skipExistingHeaders>true</skipExistingHeaders>
<includes>
<include>src/main/java/org/ow2/authzforce/core/**</include>
<!-- Include test files also -->
<include>src/test/java/**</include>
</includes>
</configuration>
<executions>
<execution>
<id>format-sources-license</id>
<phase>process-sources</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
<execution>
<id>format-test-sources-license</id>
<phase>process-test-sources</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
......
......@@ -52,9 +52,11 @@ public final class NotFunction extends FirstOrderFunction.SingleParameterTyped<B
public static final String NAME_NOT = XACML_NS_1_0 + "not";
/**
* Creates a new <code>NotFunction</code> object.
* Singleton instance of "not" logical function
*/
public NotFunction()
public static final NotFunction INSTANCE = new NotFunction();
private NotFunction()
{
super(NAME_NOT, DatatypeConstants.BOOLEAN.TYPE, false, Collections.singletonList(DatatypeConstants.BOOLEAN.TYPE));
}
......
This diff is collapsed.