diff --git a/CHANGELOG.md b/CHANGELOG.md index 021bc3f7..ddf380b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to this project are documented in this file following the [Keep a CHANGELOG](http://keepachangelog.com) conventions. +## 6.1.0 +### Changed +- Parent project version: 4.0.0 -> 4.1.1 => Changed dependency versions: + - Spring 4.3.4 -> 4.3.5, + - Saxon-HE 9.7.0-11 -> 9.7.0-14 +- authzforce-ce-core-pdp-api dependency version: 8.0.0 -> 8.2.0 + +### Fixed +- Security issues reported by Find Security Bugs plugin + + ## 6.0.0 ### Added - Extension mechanism to switch HashMap/HashSet implementation; default implementation is based on native JRE and Guava. @@ -25,6 +36,7 @@ All notable changes to this project are documented in this file following the [K - OW2 #AUTHZFORCE-23: enforcement of RuleId/PolicyId/PolicySetId uniqueness: - PolicyId (resp. PolicySetId) should be unique across all policies loaded by PDP so that PolicyIdReferences (resp. PolicySetIdReferences) in Responses' PolicyIdentifierList are absolute references to applicable policies (no ambiguity). - [RuleId should be unique within a policy](https://lists.oasis-open.org/archives/xacml/201310/msg00025.html) -> A rule is globally uniquely identified by the parent PolicyId and the RuleId. +- OW2 #AUTHZFORCE-25: NullPointerException when parsing Apply expressions using invalid/unsupported Function ID ## 5.0.2 diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml new file mode 100644 index 00000000..35806c2e --- /dev/null +++ b/findbugs-exclude-filter.xml @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 30341b53..495477c4 100644 --- a/pom.xml +++ b/pom.xml @@ -3,10 +3,10 @@ org.ow2.authzforce authzforce-ce-parent - 4.0.0 + 4.1.1 authzforce-ce-core - 6.0.0 + 6.1.0 ${project.groupId}:${project.artifactId} AuthZForce Community Edition - XACML-compliant Core Engine https://tuleap.ow2.org/projects/authzforce @@ -42,7 +42,7 @@ ${project.groupId} ${artifactId.prefix}-core-pdp-api - 8.0.0 + 8.2.0 @@ -102,6 +102,9 @@ org.codehaus.mojo findbugs-maven-plugin + + findbugs-exclude-filter.xml + verify diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/AllOfEvaluator.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/AllOfEvaluator.java index 094710ea..5680c89e 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/AllOfEvaluator.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/AllOfEvaluator.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/AnyOfEvaluator.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/AnyOfEvaluator.java index b29f6f49..180c142d 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/AnyOfEvaluator.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/AnyOfEvaluator.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/AttributeAssignmentExpressionEvaluator.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/AttributeAssignmentExpressionEvaluator.java index 5ecf0a3a..eefac56d 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/AttributeAssignmentExpressionEvaluator.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/AttributeAssignmentExpressionEvaluator.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/BasePdpExtensionRegistry.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/BasePdpExtensionRegistry.java index 05bc201e..48a2e539 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/BasePdpExtensionRegistry.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/BasePdpExtensionRegistry.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/BooleanEvaluator.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/BooleanEvaluator.java index 4d652f6b..7b2714d9 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/BooleanEvaluator.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/BooleanEvaluator.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/CloseableAttributeProvider.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/CloseableAttributeProvider.java index 7011f046..a6388c4d 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/CloseableAttributeProvider.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/CloseableAttributeProvider.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -190,13 +190,13 @@ public static CloseableAttributeProvider getInstance(final List filter(final List a final XdmNode newContentNode = categorySpecificAttributes.getExtraContent(); if (newContentNode != null) { - final XdmNode oldContentNode = extraContentsByCategory.put(categoryName, newContentNode); + final XdmNode duplicate = extraContentsByCategory.putIfAbsent(categoryName, newContentNode); /* * No support for Multiple Decision Profile -> no support for repeated categories as specified in Multiple Decision Profile. So we must check duplicate attribute categories. */ - if (oldContentNode != null) + if (duplicate != null) { throw new IndeterminateEvaluationException("Unsupported repetition of Attributes[@Category='" + categoryName + "'] (feature 'urn:oasis:names:tc:xacml:3.0:profile:multiple:repeated-attribute-categories' is not supported)", StatusHelper.STATUS_SYNTAX_ERROR); diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/ImmutablePdpExtensionRegistry.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/ImmutablePdpExtensionRegistry.java index 782f5525..e71e8072 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/ImmutablePdpExtensionRegistry.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/ImmutablePdpExtensionRegistry.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/IndividualDecisionRequestContext.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/IndividualDecisionRequestContext.java index 925d5805..1d51bd89 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/IndividualDecisionRequestContext.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/IndividualDecisionRequestContext.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -161,7 +161,8 @@ public Bag getAttributeDesignatorResult(final At @Override public boolean putAttributeDesignatorResultIfAbsent(final AttributeGUID id, final Bag result) { - if (namedAttributes.containsKey(id)) + final Bag duplicate = namedAttributes.putIfAbsent(id, result); + if (duplicate != null) { /* * This should never happen, as getAttributeDesignatorResult() should have been called first (for same id) and returned this oldResult, and no further call to @@ -175,7 +176,7 @@ public boolean putAttributeDesignatorResultIfAbsent(final AttributeGUID id, fina /* * Attribute value cannot change during evaluation context, so if old value already there, put it back */ - return namedAttributes.put(id, result) == null; + return true; } /** {@inheritDoc} */ @@ -210,13 +211,13 @@ public V getVariableValue(final String variableId, final Datat @Override public boolean putVariableIfAbsent(final String variableId, final Value value) { - if (varValsById.containsKey(variableId)) + if (varValsById.putIfAbsent(variableId, value) != null) { LOGGER.error("Attempt to override value of Variable '{}' already set in evaluation context. Overriding value: {}", variableId, value); return false; } - return varValsById.put(variableId, value) == null; + return true; } /** {@inheritDoc} */ @@ -257,13 +258,13 @@ public Bag getAttributeSelectorResult(final Attr @Override public boolean putAttributeSelectorResultIfAbsent(final AttributeSelectorId id, final Bag result) throws IndeterminateEvaluationException { - if (attributeSelectorResults.containsKey(id)) + if (attributeSelectorResults.putIfAbsent(id, result) != null) { LOGGER.error("Attempt to override value of AttributeSelector {} already set in evaluation context. Overriding value: {}", id, result); return false; } - return attributeSelectorResults.put(id, result) == null; + return true; } /** {@inheritDoc} */ diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/IndividualDecisionRequestEvaluator.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/IndividualDecisionRequestEvaluator.java index e51e4ec2..c3941480 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/IndividualDecisionRequestEvaluator.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/IndividualDecisionRequestEvaluator.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/MatchEvaluator.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/MatchEvaluator.java index 42b6df49..f9451463 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/MatchEvaluator.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/MatchEvaluator.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -86,7 +86,7 @@ public MatchEvaluator(final Match jaxbMatch, final XPathCompiler xPathCompiler, final FunctionExpression matchFunction = expFactory.getFunction(matchId); if (matchFunction == null) { - throw new IllegalArgumentException("Unsupported function for MatchId: " + matchId); + throw new IllegalArgumentException("Unsupported function for MatchId: '" + matchId + "'"); } // next, get the designator or selector being used, and the attribute diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/ModularAttributeProvider.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/ModularAttributeProvider.java index 08eaf6cb..dffa148d 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/ModularAttributeProvider.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/ModularAttributeProvider.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/MultiDecisionRequestFilter.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/MultiDecisionRequestFilter.java index a023f9da..ce868476 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/MultiDecisionRequestFilter.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/MultiDecisionRequestFilter.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/MutableIndividualDecisionRequest.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/MutableIndividualDecisionRequest.java index 869ef748..98fc7677 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/MutableIndividualDecisionRequest.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/MutableIndividualDecisionRequest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -109,8 +109,8 @@ public void put(final String categoryName, final SingleCategoryAttributes cat final XdmNode newContentNode = categorySpecificAttributes.getExtraContent(); if (newContentNode != null) { - final XdmNode oldContentNode = extraContentsByCategory.put(categoryName, newContentNode); - if (oldContentNode != null) + final XdmNode duplicate = extraContentsByCategory.putIfAbsent(categoryName, newContentNode); + if (duplicate != null) { throw new IllegalArgumentException("Duplicate Attributes[@Category] in Individual Decision Request (not allowed): " + categoryName); } diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/PDPImpl.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/PDPImpl.java index a92b24f5..21eb5f5b 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/PDPImpl.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/PDPImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpBean.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpBean.java index 5d0cc1a1..335ca6d8 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpBean.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpBean.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpConfigurationParser.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpConfigurationParser.java index a224fa71..068068e8 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpConfigurationParser.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpConfigurationParser.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpExtensionLoader.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpExtensionLoader.java index 0c8df6ea..5927b2c0 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpExtensionLoader.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpExtensionLoader.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -83,10 +83,10 @@ public final class PdpExtensionLoader if (extension instanceof JaxbBoundPdpExtension) { final JaxbBoundPdpExtension jaxbBoundExt = (JaxbBoundPdpExtension) extension; - final JaxbBoundPdpExtension conflictingExt = mutableJaxbBoundExtMapByClass.put(jaxbBoundExt.getJaxbClass(), jaxbBoundExt); - if (conflictingExt != null) + final JaxbBoundPdpExtension duplicate = mutableJaxbBoundExtMapByClass.putIfAbsent(jaxbBoundExt.getJaxbClass(), jaxbBoundExt); + if (duplicate != null) { - throw new IllegalArgumentException("Extension " + jaxbBoundExt + " (" + jaxbBoundExt.getClass() + ") is conflicting with " + conflictingExt + "(" + conflictingExt.getClass() + throw new IllegalArgumentException("Extension " + jaxbBoundExt + " (" + jaxbBoundExt.getClass() + ") is conflicting with " + duplicate + "(" + duplicate.getClass() + ") for the same XML/JAXB configuration class: " + jaxbBoundExt.getJaxbClass()); } @@ -98,10 +98,10 @@ public final class PdpExtensionLoader { if (extClass.isInstance(extension)) { - final PdpExtension conflictingExt = mutableNonJaxbBoundExtMapByClassAndId.put(extClass, extension.getId(), extension); - if (conflictingExt != null) + final PdpExtension duplicate = mutableNonJaxbBoundExtMapByClassAndId.put(extClass, extension.getId(), extension); + if (duplicate != null) { - throw new IllegalArgumentException("Extension " + extension + " is conflicting with " + conflictingExt + " registered with same ID: " + extension.getId()); + throw new IllegalArgumentException("Extension " + extension + " is conflicting with " + duplicate + " registered with same ID: " + extension.getId()); } isValidExt = true; diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpModelHandler.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpModelHandler.java index 9a00df41..c1ec48d5 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpModelHandler.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpModelHandler.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionExpression.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionExpression.java index 42eaf79e..fcf8949a 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionExpression.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionExpression.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionExpressions.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionExpressions.java index 06f95ef1..78af1042 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionExpressions.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionExpressions.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionFactories.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionFactories.java index 02054356..e64f04c6 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionFactories.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/PepActionFactories.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/SchemaHandler.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/SchemaHandler.java index 7140b3ad..f9b34d29 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/SchemaHandler.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/SchemaHandler.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -19,7 +19,6 @@ package org.ow2.authzforce.core.pdp.impl; import java.io.BufferedReader; -import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; @@ -28,6 +27,9 @@ import java.net.MalformedURLException; import java.net.URISyntaxException; import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.Set; @@ -55,8 +57,7 @@ /** * - * XML schema handler that can load schema file(s) from location(s) supported by {@link ResourceUtils} using any OASIS - * catalog at any location supported by {@link ResourceUtils} as well. + * XML schema handler that can load schema file(s) from location(s) supported by {@link ResourceUtils} using any OASIS catalog at any location supported by {@link ResourceUtils} as well. * * @version $Id: $ */ @@ -76,8 +77,7 @@ private XmlSchemaResourceResolver(final String catalogLocation, final OASISCatal } @Override - public LSInput resolveResource(final String type, final String namespaceURI, final String publicId, - final String systemId, final String baseURI) + public LSInput resolveResource(final String type, final String namespaceURI, final String publicId, final String systemId, final String baseURI) { try { @@ -94,8 +94,7 @@ public LSInput resolveResource(final String type, final String namespaceURI, fin resolvedLocation = catalogResolver.resolvePublic(publicId, systemId); if (_LOGGER.isDebugEnabled()) { - _LOGGER.debug("resolvePublic(publicId = {}, systemId = {}) -> {}", - new Object[] { publicId, systemId, resolvedLocation }); + _LOGGER.debug("resolvePublic(publicId = {}, systemId = {}) -> {}", publicId, systemId, resolvedLocation); } } if (resolvedLocation != null) @@ -109,9 +108,8 @@ public LSInput resolveResource(final String type, final String namespaceURI, fin } catch (final IOException ex) { - final String errMsg = "Unable to resolve schema-required entity with XML catalog (location='" - + catalogLocation + "'): type=" + type + ", namespaceURI=" + namespaceURI + ", publicId='" - + publicId + "', systemId='" + systemId + "', baseURI='" + baseURI + "'"; + final String errMsg = "Unable to resolve schema-required entity with XML catalog (location='" + catalogLocation + "'): type=" + type + ", namespaceURI=" + namespaceURI + + ", publicId='" + publicId + "', systemId='" + systemId + "', baseURI='" + baseURI + "'"; throw new RuntimeException(errMsg, ex); } @@ -142,10 +140,9 @@ public final void fatalError(final SAXParseException exception) throws SAXExcept }; /** - * This is quite similar to org.apache.cxf.catalog.OASISCatalogManager, except it is much simplified as we don't - * need as many features. We are not using CXF's OASISCatalogManager class directly because it is part of cxf-core - * which drags many classes and dependencies on CXF we don't need. It would make more sense if OASISCatalogManager - * was part of a cxf common utility package, but it is not the case as of writing (December 2014). + * This is quite similar to org.apache.cxf.catalog.OASISCatalogManager, except it is much simplified as we don't need as many features. We are not using CXF's OASISCatalogManager class directly + * because it is part of cxf-core which drags many classes and dependencies on CXF we don't need. It would make more sense if OASISCatalogManager was part of a cxf common utility package, but it + * is not the case as of writing (December 2014). *

* WARNING: this is not immutable since getCatalog() gives access to internal catalog which is mutable. *

@@ -188,9 +185,7 @@ public String getResolvedEntity(final String publicId, final String systemId) } catch (final IOException e) { - _LOGGER.warn( - "Error resolving resource needed by org.apache.xml.resolver.CatalogResolver for OASIS CatalogManager with URL: {}", - e); + _LOGGER.warn("Error resolving resource needed by org.apache.xml.resolver.CatalogResolver for OASIS CatalogManager with URL: {}", e); } } return s; @@ -228,10 +223,10 @@ private void loadCatalog(final URL catalogURL) throws IOException { try { - final File file = new File(catalogURL.toURI()); - if (!file.exists()) + final Path filePath = Paths.get(catalogURL.toURI()); + if (!Files.exists(filePath)) { - throw new FileNotFoundException(file.getAbsolutePath()); + throw new FileNotFoundException(filePath.toString()); } } catch (final URISyntaxException e) @@ -242,9 +237,7 @@ private void loadCatalog(final URL catalogURL) throws IOException if (catalog == null) { - _LOGGER.warn( - "Catalog found at {} but no org.apache.xml.resolver.CatalogManager was found. Check the classpatch for an xmlresolver jar.", - catalogURL); + _LOGGER.warn("Catalog found at {} but no org.apache.xml.resolver.CatalogManager was found. Check the classpatch for an xmlresolver jar.", catalogURL); } else { @@ -319,8 +312,7 @@ public String getPublicId() public Reader getCharacterStream() { /* - * No character stream, only byte streams are allowed. Do not throw exception, otherwise the resolution of - * the resource fails, even if byte stream OK + * No character stream, only byte streams are allowed. Do not throw exception, otherwise the resolution of the resource fails, even if byte stream OK */ return null; // throw new UnsupportedOperationException(); @@ -370,8 +362,7 @@ public void setPublicId(final String publicId) public String getBaseURI() { /* - * No base URI, only absolute URIs are allowed. Do not throw exception if no base URI, otherwise the - * resolution of the resource fails, even for absolute URIs + * No base URI, only absolute URIs are allowed. Do not throw exception if no base URI, otherwise the resolution of the resource fails, even for absolute URIs */ return null; // throw new UnsupportedOperationException(); @@ -387,8 +378,7 @@ public void setBaseURI(final String baseURI) public String getEncoding() { /* - * No encoding override, only absolute URIs are allowed. Do not throw exception if no base URI, otherwise - * the resolution of the resource fails, even if encoding specified in other way + * No encoding override, only absolute URIs are allowed. Do not throw exception if no base URI, otherwise the resolution of the resource fails, even if encoding specified in other way */ return null; // throw new UnsupportedOperationException(); @@ -461,11 +451,9 @@ public Schema getSchema() public static Schema createSchema(final List schemaLocations, final String catalogLocation) { /* - * This is mostly similar to org.apache.cxf.jaxrs.utils.schemas.SchemaHandler#createSchema(), except we are - * using Spring ResourceUtils class to get Resource URLs and we don't use any Bus object. We are not using CXF's - * SchemaHandler class directly because it is part of cxf-rt-frontend-jaxrs which drags many dependencies on CXF - * we don't need, the full CXF JAX-RS framework actually. It would make more sense if SchemaHandler was part of - * some cxf common utility package, but it is not the case as of writing (December 2014). + * This is mostly similar to org.apache.cxf.jaxrs.utils.schemas.SchemaHandler#createSchema(), except we are using Spring ResourceUtils class to get Resource URLs and we don't use any Bus + * object. We are not using CXF's SchemaHandler class directly because it is part of cxf-rt-frontend-jaxrs which drags many dependencies on CXF we don't need, the full CXF JAX-RS framework + * actually. It would make more sense if SchemaHandler was part of some cxf common utility package, but it is not the case as of writing (December 2014). */ final SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/StandardEnvironmentAttribute.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/StandardEnvironmentAttribute.java index de113492..9e914127 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/StandardEnvironmentAttribute.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/StandardEnvironmentAttribute.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/TargetEvaluators.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/TargetEvaluators.java index b1836e2c..db4db0cf 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/TargetEvaluators.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/TargetEvaluators.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/CombiningAlgEvaluators.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/CombiningAlgEvaluators.java index 1ff5ff1e..29bbc148 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/CombiningAlgEvaluators.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/CombiningAlgEvaluators.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/DPOverridesCombiningAlg.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/DPOverridesCombiningAlg.java index a2090306..3e0a48fe 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/DPOverridesCombiningAlg.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/DPOverridesCombiningAlg.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/DPUnlessPDCombiningAlg.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/DPUnlessPDCombiningAlg.java index d9fbaa8c..0757392a 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/DPUnlessPDCombiningAlg.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/DPUnlessPDCombiningAlg.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/FirstApplicableCombiningAlg.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/FirstApplicableCombiningAlg.java index 0778105d..c0914def 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/FirstApplicableCombiningAlg.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/FirstApplicableCombiningAlg.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/ImmutableCombiningAlgRegistry.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/ImmutableCombiningAlgRegistry.java index ddc283fd..e6ddedf0 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/ImmutableCombiningAlgRegistry.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/ImmutableCombiningAlgRegistry.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/LegacyDenyOverridesCombiningAlg.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/LegacyDenyOverridesCombiningAlg.java index c6ea9690..e2621a9e 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/LegacyDenyOverridesCombiningAlg.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/LegacyDenyOverridesCombiningAlg.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/LegacyPermitOverridesCombiningAlg.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/LegacyPermitOverridesCombiningAlg.java index 79f84918..5e7868ee 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/LegacyPermitOverridesCombiningAlg.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/LegacyPermitOverridesCombiningAlg.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/OnlyOneApplicableCombiningAlg.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/OnlyOneApplicableCombiningAlg.java index 5048c26c..dd60508c 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/OnlyOneApplicableCombiningAlg.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/OnlyOneApplicableCombiningAlg.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/StandardCombiningAlgorithm.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/StandardCombiningAlgorithm.java index 062047bc..afb37f74 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/StandardCombiningAlgorithm.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/combining/StandardCombiningAlgorithm.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/ApplyExpression.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/ApplyExpression.java index 05bc99fe..0f0d64df 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/ApplyExpression.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/ApplyExpression.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/AttributeDesignatorExpression.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/AttributeDesignatorExpression.java index 1a43b1a3..11d22a02 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/AttributeDesignatorExpression.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/AttributeDesignatorExpression.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/AttributeSelectorExpression.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/AttributeSelectorExpression.java index 4c71923c..fe017b4f 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/AttributeSelectorExpression.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/AttributeSelectorExpression.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/ExpressionFactoryImpl.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/ExpressionFactoryImpl.java index d909e82f..c66a3bdc 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/ExpressionFactoryImpl.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/expression/ExpressionFactoryImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -365,7 +365,6 @@ private static BaseVariableReference newVariableReference(f LOGGER.warn("Expression of Variable {} is constant '{}', therefore should be replaced with a equivalent AttributeValue.", variableId, constant); } - variableExpression.getReturnType(); return new ConstantVariableReference<>(variableId, constant, variableExpression.getReturnType(), longestVarRefChainInExpression); } @@ -422,7 +421,7 @@ public VariableReference addVariable(final VariableDefinition varDef, final X } final BaseVariableReference var = newVariableReference(varId, varExpr, longestVarRefChainInCurrentVarExpression); - return idToVariableMap.put(varId, var); + return idToVariableMap.putIfAbsent(varId, var); } /** {@inheritDoc} */ diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/ConstantResultFirstOrderFunctionCall.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/ConstantResultFirstOrderFunctionCall.java index 71dea7d1..03a8fd0c 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/ConstantResultFirstOrderFunctionCall.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/ConstantResultFirstOrderFunctionCall.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/FunctionRegistry.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/FunctionRegistry.java index e8b7a955..6ee1aa23 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/FunctionRegistry.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/FunctionRegistry.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/ImmutableFunctionRegistry.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/ImmutableFunctionRegistry.java index 634826e0..0ef3af22 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/ImmutableFunctionRegistry.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/ImmutableFunctionRegistry.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalAndFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalAndFunction.java index f16012c6..6ac098bc 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalAndFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalAndFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalNOfFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalNOfFunction.java index a8981ba2..0a1f4385 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalNOfFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalNOfFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalNotFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalNotFunction.java index b6a8d6e9..37bf1e13 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalNotFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalNotFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalOrFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalOrFunction.java index d591bcca..3502e188 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalOrFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/LogicalOrFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/MapFunctionFactory.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/MapFunctionFactory.java index 3522d161..ce916275 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/MapFunctionFactory.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/MapFunctionFactory.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/NumericArithmeticFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/NumericArithmeticFunction.java index 9ab3980a..1a6cfc8c 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/NumericArithmeticFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/NumericArithmeticFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/NumericArithmeticOperators.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/NumericArithmeticOperators.java index cde4006f..87bc8ba1 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/NumericArithmeticOperators.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/NumericArithmeticOperators.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardDatatypeConverters.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardDatatypeConverters.java index d18d1663..db7129d2 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardDatatypeConverters.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardDatatypeConverters.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardEqualTypeMatchers.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardEqualTypeMatchers.java index 2cc1e3d9..869a46e3 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardEqualTypeMatchers.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardEqualTypeMatchers.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardFunction.java index 228f1d0b..cd27d77a 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardHigherOrderBagFunctions.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardHigherOrderBagFunctions.java index 7f57e42e..403638bd 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardHigherOrderBagFunctions.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardHigherOrderBagFunctions.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardNonEqualTypeMatchers.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardNonEqualTypeMatchers.java index d89af41b..91b2b762 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardNonEqualTypeMatchers.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StandardNonEqualTypeMatchers.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StringConcatenateFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StringConcatenateFunction.java index 5642742d..ba44ac54 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StringConcatenateFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StringConcatenateFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StringN11nFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StringN11nFunction.java index 34c5cc8e..75d045a6 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StringN11nFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/StringN11nFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/SubstringFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/SubstringFunction.java index eb7796be..3b263dd6 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/SubstringFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/SubstringFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TemporalArithmeticFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TemporalArithmeticFunction.java index 39409fc8..1c250417 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TemporalArithmeticFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TemporalArithmeticFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TemporalArithmeticOperators.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TemporalArithmeticOperators.java index bd985a71..12aa6fcb 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TemporalArithmeticOperators.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TemporalArithmeticOperators.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TimeRangeComparisonFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TimeRangeComparisonFunction.java index cd82abf7..85f38e61 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TimeRangeComparisonFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/TimeRangeComparisonFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/XPathNodeCountFunction.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/XPathNodeCountFunction.java index ffe4295f..a74a9772 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/func/XPathNodeCountFunction.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/func/XPathNodeCountFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRefBasedRootPolicyProviderModule.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRefBasedRootPolicyProviderModule.java index 3c6160bd..b48e1dae 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRefBasedRootPolicyProviderModule.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRefBasedRootPolicyProviderModule.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -136,12 +136,12 @@ public CoreRefBasedRootPolicyProviderModul } catch (final IndeterminateEvaluationException e) { - throw new IllegalArgumentException("Failed to find a root PolicySet with id = " + policySetId + ", " + versionPatterns, e); + throw new IllegalArgumentException("Failed to find a root PolicySet with id = '" + policySetId + "', " + versionPatterns, e); } if (rootPolicy == null) { - throw new IllegalArgumentException("No policy found by the refPolicyProvider for the specified PolicySetIdReference: PolicySetId = " + policySetId + "; " + versionPatterns); + throw new IllegalArgumentException("No policy found by the refPolicyProvider for the specified PolicySetIdReference: PolicySetId = '" + policySetId + "'; " + versionPatterns); } } catch (final IOException e) diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRefPolicyProviderModule.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRefPolicyProviderModule.java index c8b5dc0c..8fe95673 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRefPolicyProviderModule.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRefPolicyProviderModule.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRootPolicyProviderModule.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRootPolicyProviderModule.java index 68a1aab1..4ea0c6bc 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRootPolicyProviderModule.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/CoreRootPolicyProviderModule.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyEvaluators.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyEvaluators.java index 4f99664a..133cbf40 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyEvaluators.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyEvaluators.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -1006,7 +1006,7 @@ private static void updateStaticRefPolicies(final String policyFriendlyId, final { assert staticRefPoliciesToUpdate != null && newRefPolicyId != null && newRefPolicyVersion != null; - final PolicyVersion otherVersion = staticRefPoliciesToUpdate.put(newRefPolicyId, newRefPolicyVersion); + final PolicyVersion otherVersion = staticRefPoliciesToUpdate.putIfAbsent(newRefPolicyId, newRefPolicyVersion); if (otherVersion != null && !otherVersion.equals(newRefPolicyVersion)) { throw new IllegalArgumentException(policyFriendlyId + ": policy references to same policy ID (" + newRefPolicyId + ") but different versions (" + otherVersion + " and " @@ -1631,7 +1631,7 @@ else if (policyChildElt instanceof Rule) throw new IllegalArgumentException(policyFriendlyId + ": Error parsing child #" + childIndex + " (Rule)", e); } - final RuleEvaluator conflictingRuleEvaluator = ruleEvaluatorsByRuleIdInOrderOfDeclaration.put(ruleEvaluator.getRuleId(), ruleEvaluator); + final RuleEvaluator conflictingRuleEvaluator = ruleEvaluatorsByRuleIdInOrderOfDeclaration.putIfAbsent(ruleEvaluator.getRuleId(), ruleEvaluator); if (conflictingRuleEvaluator != null) { /* @@ -2104,15 +2104,22 @@ else if (policyChildElt instanceof JAXBElement) final IdReferenceType idRef = (IdReferenceType) jaxbElt.getValue(); final COMBINED_EVALUATOR childEvaluator = policyEvaluatorFactory.getChildPolicyRefEvaluator(childIndex, TopLevelPolicyElementType.POLICY, idRef, null); combinedEvaluators.add(childEvaluator); - childPolicySetEvaluatorsByPolicySetId.put(childEvaluator.getPolicyId(), childEvaluator); - + final COMBINED_EVALUATOR duplicate = childPolicySetEvaluatorsByPolicySetId.putIfAbsent(childEvaluator.getPolicyId(), childEvaluator); + if (duplicate != null) + { + throw new IllegalArgumentException("Duplicate PolicyIdReference's id = " + childEvaluator.getPolicyId()); + } } else if (eltNameLocalPart.equals(XACMLNodeName.POLICYSET_ID_REFERENCE.value())) { final IdReferenceType idRef = (IdReferenceType) jaxbElt.getValue(); final COMBINED_EVALUATOR childEvaluator = policyEvaluatorFactory.getChildPolicyRefEvaluator(childIndex, TopLevelPolicyElementType.POLICY_SET, idRef, policySetRefChain); combinedEvaluators.add(childEvaluator); - childPolicySetEvaluatorsByPolicySetId.put(childEvaluator.getPolicyId(), childEvaluator); + final COMBINED_EVALUATOR duplicate = childPolicySetEvaluatorsByPolicySetId.put(childEvaluator.getPolicyId(), childEvaluator); + if (duplicate != null) + { + throw new IllegalArgumentException("Duplicate PolicySetIdReference's id = " + childEvaluator.getPolicyId()); + } } else if (eltNameLocalPart.equals(XACMLNodeName.COMBINER_PARAMETERS.value())) { @@ -2149,7 +2156,11 @@ else if (policyChildElt instanceof PolicySet) final COMBINED_EVALUATOR childEvaluator = policyEvaluatorFactory.getChildPolicySetEvaluator(childIndex, childPolicy, nonNullParsedPolicyIds, updatableParsedPolicySetIds, policySetRefChain); combinedEvaluators.add(childEvaluator); - childPolicySetEvaluatorsByPolicySetId.put(childPolicyId, childEvaluator); + final COMBINED_EVALUATOR duplicate = childPolicySetEvaluatorsByPolicySetId.putIfAbsent(childPolicyId, childEvaluator); + if (duplicate != null) + { + throw new IllegalArgumentException("Duplicate PolicySetId = " + childPolicyId); + } } else if (policyChildElt instanceof Policy) { @@ -2165,7 +2176,12 @@ else if (policyChildElt instanceof Policy) final COMBINED_EVALUATOR childEvaluator = policyEvaluatorFactory.getChildPolicyEvaluator(childIndex, childPolicy); combinedEvaluators.add(childEvaluator); - childPolicyEvaluatorsByPolicyId.put(childPolicyId, childEvaluator); + final COMBINED_EVALUATOR duplicate = childPolicyEvaluatorsByPolicyId.putIfAbsent(childPolicyId, childEvaluator); + if (duplicate != null) + { + throw new IllegalArgumentException("Duplicate PolicyId = " + childPolicyId); + } + } /* diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyMap.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyMap.java index 57839af2..39549538 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyMap.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyMap.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyVersions.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyVersions.java index f99303e4..c3d263cc 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyVersions.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/PolicyVersions.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/RootPolicyEvaluator.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/RootPolicyEvaluator.java index ea4bb6af..e72e8064 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/RootPolicyEvaluator.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/RootPolicyEvaluator.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/RootPolicyEvaluators.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/RootPolicyEvaluators.java index ab3ece8d..3039c3d0 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/RootPolicyEvaluators.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/RootPolicyEvaluators.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/StaticApplicablePolicyView.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/StaticApplicablePolicyView.java index 7de5a992..cf77436c 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/StaticApplicablePolicyView.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/policy/StaticApplicablePolicyView.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/rule/ConditionEvaluators.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/rule/ConditionEvaluators.java index bbdf73ca..60dcc166 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/rule/ConditionEvaluators.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/rule/ConditionEvaluators.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/rule/RuleEvaluator.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/rule/RuleEvaluator.java index cc1194f4..dc432727 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/rule/RuleEvaluator.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/rule/RuleEvaluator.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/value/ImmutableDatatypeFactoryRegistry.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/value/ImmutableDatatypeFactoryRegistry.java index 7089ed5e..96d984e9 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/value/ImmutableDatatypeFactoryRegistry.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/value/ImmutableDatatypeFactoryRegistry.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/main/java/org/ow2/authzforce/core/pdp/impl/value/StandardDatatypeFactoryRegistry.java b/src/main/java/org/ow2/authzforce/core/pdp/impl/value/StandardDatatypeFactoryRegistry.java index b485b72f..0a63c99e 100644 --- a/src/main/java/org/ow2/authzforce/core/pdp/impl/value/StandardDatatypeFactoryRegistry.java +++ b/src/main/java/org/ow2/authzforce/core/pdp/impl/value/StandardDatatypeFactoryRegistry.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/MainTest.java b/src/test/java/org/ow2/authzforce/core/test/MainTest.java index a88b9f17..78efc3a6 100644 --- a/src/test/java/org/ow2/authzforce/core/test/MainTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/MainTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/NonRegression.java b/src/test/java/org/ow2/authzforce/core/test/NonRegression.java index dadec0d6..7e8a98c0 100644 --- a/src/test/java/org/ow2/authzforce/core/test/NonRegression.java +++ b/src/test/java/org/ow2/authzforce/core/test/NonRegression.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2.java b/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2.java index 67be7a40..bde91c86 100644 --- a/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2.java +++ b/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -80,7 +80,7 @@ public class ConformanceV3FromV2 */ private static final Logger LOGGER = LoggerFactory.getLogger(ConformanceV3FromV2.class); - protected static void setUp(String testRootDirectoryLocation) throws Exception + protected static void setUp(final String testRootDirectoryLocation) throws Exception { LOGGER.debug("Launching conformance tests for features in directory: {}", testRootDirectoryLocation); } @@ -103,8 +103,8 @@ protected static void setUp(String testRootDirectoryLocation) throws Exception * PDP request filter ID to be used for the tests * @return test data */ - protected static Collection getTestData(String rootDirectoryPath, String testSubDirectoryName, String testFilenamePrefixBeforeNum, int startTestNum, int endTestNum, - String requestFilterId) + protected static Collection getTestData(final String rootDirectoryPath, final String testSubDirectoryName, final String testFilenamePrefixBeforeNum, final int startTestNum, + final int endTestNum, final String requestFilterId) { final Collection testData = new ArrayList<>(); for (int testNum = startTestNum; testNum <= endTestNum; testNum++) @@ -113,10 +113,12 @@ protected static Collection getTestData(String rootDirectory if (testNum < 10) { paddedTestNumber = "00" + testNum; - } else if (testNum < 100) + } + else if (testNum < 100) { paddedTestNumber = "0" + testNum; - } else + } + else { paddedTestNumber = Integer.toString(testNum); } @@ -135,7 +137,7 @@ protected static Collection getTestData(String rootDirectory private final String reqFilter; - public ConformanceV3FromV2(String filePathPrefix, boolean enableXPath, String requestFilter) + public ConformanceV3FromV2(final String filePathPrefix, final boolean enableXPath, final String requestFilter) { this.testFilePathPrefix = filePathPrefix; this.enableXPath = enableXPath; @@ -148,29 +150,33 @@ public void testConformance() throws Exception { LOGGER.debug("Starting conformance test with files '{}*.xml'", testFilePathPrefix); - NamespaceFilteringParser unmarshaller = xacmlParserFactory.getInstance(); + final NamespaceFilteringParser respUnmarshaller = xacmlParserFactory.getInstance(); Response expectedResponse = null; - String expectedRespFilepath = testFilePathPrefix + EXPECTED_RESPONSE_FILENAME_SUFFIX; + final String expectedRespFilepath = testFilePathPrefix + EXPECTED_RESPONSE_FILENAME_SUFFIX; try { - expectedResponse = TestUtils.createResponse(expectedRespFilepath, unmarshaller); - } catch (FileNotFoundException notFoundErr) + expectedResponse = TestUtils.createResponse(expectedRespFilepath, respUnmarshaller); + } + catch (final FileNotFoundException notFoundErr) { // do nothing except logging -> request = null LOGGER.debug("Response file '{}' does not exist -> Static Policy/Request syntax error check", expectedRespFilepath); } + final NamespaceFilteringParser reqUnmarshaller = xacmlParserFactory.getInstance(); Request request = null; // if no Request file, it is just a static policy syntax error check - String expectedReqFilepath = testFilePathPrefix + REQUEST_FILENAME_SUFFIX; + final String expectedReqFilepath = testFilePathPrefix + REQUEST_FILENAME_SUFFIX; try { - request = TestUtils.createRequest(expectedReqFilepath, unmarshaller); - } catch (FileNotFoundException notFoundErr) + request = TestUtils.createRequest(expectedReqFilepath, reqUnmarshaller); + } + catch (final FileNotFoundException notFoundErr) { // do nothing except logging -> request = null LOGGER.debug("Request file '{}' does not exist -> Static policy syntax error check (Request/Response ignored)", expectedReqFilepath); - } catch (JAXBException e) + } + catch (final JAXBException e) { // we found syntax error in request if (expectedResponse == null) @@ -185,11 +191,11 @@ public void testConformance() throws Exception throw e; } - String rootPolicyFilepath = testFilePathPrefix + ROOT_POLICY_FILENAME_SUFFIX; + final String rootPolicyFilepath = testFilePathPrefix + ROOT_POLICY_FILENAME_SUFFIX; // referenced policies if any - String refPoliciesDirLocation = testFilePathPrefix + REF_POLICIES_DIRNAME_SUFFIX; + final String refPoliciesDirLocation = testFilePathPrefix + REF_POLICIES_DIRNAME_SUFFIX; - String attributeProviderConfLocation = testFilePathPrefix + ATTRIBUTE_PROVIDER_FILENAME_SUFFIX; + final String attributeProviderConfLocation = testFilePathPrefix + ATTRIBUTE_PROVIDER_FILENAME_SUFFIX; PDPImpl pdp = null; try @@ -200,7 +206,8 @@ public void testConformance() throws Exception // this is a policy syntax error check and we didn't found the syntax error as // expected Assert.fail("Failed to find syntax error as expected in policy located at: " + rootPolicyFilepath); - } else if (expectedResponse == null) + } + else if (expectedResponse == null) { /* * No expected response, so it is not a PDP evaluation test, but request or policy syntax error check. We got here, so request and policy OK. This is unexpected. @@ -208,19 +215,21 @@ public void testConformance() throws Exception Assert.fail("Missing response file '" + expectedRespFilepath + "' or failed to find syntax error as expected in either request located at '" + expectedReqFilepath + "' or policy located at '" + rootPolicyFilepath + "'"); - } else + } + else { // this is an evaluation test with request/response (not a policy syntax check) LOGGER.debug("Request that is sent to the PDP: {}", request); - Response response = pdp.evaluate(request, unmarshaller.getNamespacePrefixUriMap()); + final Response actualResponse = pdp.evaluate(request, reqUnmarshaller.getNamespacePrefixUriMap()); if (LOGGER.isDebugEnabled()) { - LOGGER.debug("Response that is received from the PDP : {}", TestUtils.printResponse(response)); + LOGGER.debug("Response that is received from the PDP : {}", TestUtils.printResponse(actualResponse)); } - TestUtils.assertNormalizedEquals(testFilePathPrefix, expectedResponse, response); + TestUtils.assertNormalizedEquals(testFilePathPrefix, expectedResponse, actualResponse); } - } catch (IllegalArgumentException e) + } + catch (final IllegalArgumentException e) { // we found syntax error in policy if (request == null) @@ -233,7 +242,8 @@ public void testConformance() throws Exception // Unexpected error throw e; - } finally + } + finally { if (pdp != null) { diff --git a/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2Mandatory.java b/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2Mandatory.java index 265aa943..2e5f4c3c 100644 --- a/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2Mandatory.java +++ b/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2Mandatory.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2Optional.java b/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2Optional.java index cb240049..f169af26 100644 --- a/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2Optional.java +++ b/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3FromV2Optional.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3Others.java b/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3Others.java index 93fcaa96..2933bee1 100644 --- a/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3Others.java +++ b/src/test/java/org/ow2/authzforce/core/test/conformance/ConformanceV3Others.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/custom/CustomPdpTest.java b/src/test/java/org/ow2/authzforce/core/test/custom/CustomPdpTest.java index 792411a8..f6a78e0d 100644 --- a/src/test/java/org/ow2/authzforce/core/test/custom/CustomPdpTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/custom/CustomPdpTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/custom/TestAttributeProviderModule.java b/src/test/java/org/ow2/authzforce/core/test/custom/TestAttributeProviderModule.java index 416dd430..7aa2e5e0 100644 --- a/src/test/java/org/ow2/authzforce/core/test/custom/TestAttributeProviderModule.java +++ b/src/test/java/org/ow2/authzforce/core/test/custom/TestAttributeProviderModule.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/custom/TestCombinedDecisionResultFilter.java b/src/test/java/org/ow2/authzforce/core/test/custom/TestCombinedDecisionResultFilter.java index 4106cbf7..242104c3 100644 --- a/src/test/java/org/ow2/authzforce/core/test/custom/TestCombinedDecisionResultFilter.java +++ b/src/test/java/org/ow2/authzforce/core/test/custom/TestCombinedDecisionResultFilter.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/custom/TestDNSNameValueEqualFunction.java b/src/test/java/org/ow2/authzforce/core/test/custom/TestDNSNameValueEqualFunction.java index 33742cf6..10010150 100644 --- a/src/test/java/org/ow2/authzforce/core/test/custom/TestDNSNameValueEqualFunction.java +++ b/src/test/java/org/ow2/authzforce/core/test/custom/TestDNSNameValueEqualFunction.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/custom/TestDNSNameWithPortValue.java b/src/test/java/org/ow2/authzforce/core/test/custom/TestDNSNameWithPortValue.java index d7c91bc3..6ec8d920 100644 --- a/src/test/java/org/ow2/authzforce/core/test/custom/TestDNSNameWithPortValue.java +++ b/src/test/java/org/ow2/authzforce/core/test/custom/TestDNSNameWithPortValue.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/custom/TestOnPermitApplySecondCombiningAlg.java b/src/test/java/org/ow2/authzforce/core/test/custom/TestOnPermitApplySecondCombiningAlg.java index bf4b6c36..627c6255 100644 --- a/src/test/java/org/ow2/authzforce/core/test/custom/TestOnPermitApplySecondCombiningAlg.java +++ b/src/test/java/org/ow2/authzforce/core/test/custom/TestOnPermitApplySecondCombiningAlg.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/custom/TestPdpGetStaticApplicablePolicies.java b/src/test/java/org/ow2/authzforce/core/test/custom/TestPdpGetStaticApplicablePolicies.java index a340a875..6cb90c68 100644 --- a/src/test/java/org/ow2/authzforce/core/test/custom/TestPdpGetStaticApplicablePolicies.java +++ b/src/test/java/org/ow2/authzforce/core/test/custom/TestPdpGetStaticApplicablePolicies.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/custom/TestXACMLPolicyAttributeValue.java b/src/test/java/org/ow2/authzforce/core/test/custom/TestXACMLPolicyAttributeValue.java index 5cde0e99..1e885eaf 100644 --- a/src/test/java/org/ow2/authzforce/core/test/custom/TestXACMLPolicyAttributeValue.java +++ b/src/test/java/org/ow2/authzforce/core/test/custom/TestXACMLPolicyAttributeValue.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/BagFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/BagFunctionsTest.java index d6f7e814..45e7fd07 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/BagFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/BagFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/DateTimeArithmeticFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/DateTimeArithmeticFunctionsTest.java index 32cae799..04fb0993 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/DateTimeArithmeticFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/DateTimeArithmeticFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/EqualityFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/EqualityFunctionsTest.java index ff244a1e..1d058e94 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/EqualityFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/EqualityFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/HigherOrderFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/HigherOrderFunctionsTest.java index 9f8f423b..398aeaf2 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/HigherOrderFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/HigherOrderFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/LogicalFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/LogicalFunctionsTest.java index 255726ee..c4e123ca 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/LogicalFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/LogicalFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/NonNumericComparisonFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/NonNumericComparisonFunctionsTest.java index b54382fd..9c6234cc 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/NonNumericComparisonFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/NonNumericComparisonFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/NumericArithmeticFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/NumericArithmeticFunctionsTest.java index 368da9cf..4193f649 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/NumericArithmeticFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/NumericArithmeticFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/NumericComparisonFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/NumericComparisonFunctionsTest.java index b7ceaabf..802d2599 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/NumericComparisonFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/NumericComparisonFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/NumericConversionFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/NumericConversionFunctionsTest.java index 43f572fc..72c861fd 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/NumericConversionFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/NumericConversionFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/RegExpBasedFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/RegExpBasedFunctionsTest.java index ea4af3fd..aca23ce3 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/RegExpBasedFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/RegExpBasedFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/SetFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/SetFunctionsTest.java index a3065b45..519541f0 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/SetFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/SetFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/SpecialMatchFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/SpecialMatchFunctionsTest.java index b749971a..e1f6b946 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/SpecialMatchFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/SpecialMatchFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -39,7 +39,7 @@ public class SpecialMatchFunctionsTest extends FunctionTest { - public SpecialMatchFunctionsTest(String functionName, List inputs, Value expectedResult) + public SpecialMatchFunctionsTest(final String functionName, final List inputs, final Value expectedResult) { super(functionName, null, inputs, expectedResult); } @@ -51,33 +51,39 @@ public SpecialMatchFunctionsTest(String functionName, List inputs, Value public static Collection params() throws Exception { return Arrays.asList( - // urn:oasis:names:tc:xacml:1.0:function:x500Name-match - new Object[] { NAME_X500NAME_MATCH, - Arrays.asList(new X500NameValue("O=Medico Corp,C=US"), new X500NameValue("cn=John Smith,o=Medico Corp, c=US")), BooleanValue.TRUE }, - new Object[] { NAME_X500NAME_MATCH, - Arrays.asList(new X500NameValue("O=Another Corp,C=US"), new X500NameValue("cn=John Smith,o=Medico Corp, c=US")), BooleanValue.FALSE }, + // urn:oasis:names:tc:xacml:1.0:function:x500Name-match + new Object[] { NAME_X500NAME_MATCH, Arrays.asList(new X500NameValue("O=Medico Corp,C=US"), new X500NameValue("cn=John Smith,o=Medico Corp, c=US")), BooleanValue.TRUE }, + // + new Object[] { NAME_X500NAME_MATCH, Arrays.asList(new X500NameValue("O=Medico Corp,C=US"), new X500NameValue("cn=John Smith, o=Medico Corp, c=US")), BooleanValue.TRUE }, + // + new Object[] { NAME_X500NAME_MATCH, Arrays.asList(new X500NameValue("O=Medico Corp,C=US"), new X500NameValue("cn=John Smith\\,O=Medico Corp, c=US")), BooleanValue.FALSE }, + // + new Object[] { NAME_X500NAME_MATCH, Arrays.asList(new X500NameValue("O=Medico Corp,C=US"), new X500NameValue("cn=John Smith\\, O=Medico Corp, c=US")), BooleanValue.FALSE }, + // + new Object[] { NAME_X500NAME_MATCH, Arrays.asList(new X500NameValue("O=Another Corp,C=US"), new X500NameValue("cn=John Smith,o=Medico Corp, c=US")), BooleanValue.FALSE }, // urn:oasis:names:tc:xacml:1.0:function:rfc822Name-match - new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("Anderson@sun.com"), new RFC822NameValue("Anderson@sun.com")), - BooleanValue.TRUE }, - new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("Anderson@sun.com"), new RFC822NameValue("Anderson@SUN.COM")), - BooleanValue.TRUE }, - new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("Anderson@sun.com"), new RFC822NameValue("Anne.Anderson@sun.com")), - BooleanValue.FALSE }, - new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("Anderson@sun.com"), new RFC822NameValue("anderson@sun.com")), - BooleanValue.FALSE }, - new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("Anderson@sun.com"), new RFC822NameValue("Anderson@east.sun.com")), - BooleanValue.FALSE }, + new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("Anderson@sun.com"), new RFC822NameValue("Anderson@sun.com")), BooleanValue.TRUE }, + // + new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("Anderson@sun.com"), new RFC822NameValue("Anderson@SUN.COM")), BooleanValue.TRUE }, + // + new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("Anderson@sun.com"), new RFC822NameValue("Anne.Anderson@sun.com")), BooleanValue.FALSE }, + // + new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("Anderson@sun.com"), new RFC822NameValue("anderson@sun.com")), BooleanValue.FALSE }, + // + new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("Anderson@sun.com"), new RFC822NameValue("Anderson@east.sun.com")), BooleanValue.FALSE }, + // new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("sun.com"), new RFC822NameValue("Anderson@sun.com")), BooleanValue.TRUE }, + // new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("sun.com"), new RFC822NameValue("Baxter@SUN.COM")), BooleanValue.TRUE }, - new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("sun.com"), new RFC822NameValue("Anderson@east.sun.com")), - BooleanValue.FALSE }, - new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue(".east.sun.com"), new RFC822NameValue("Anderson@east.sun.com")), - BooleanValue.TRUE }, - new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue(".east.sun.com"), new RFC822NameValue("anne.anderson@ISRG.EAST.SUN.COM")), - BooleanValue.TRUE }, - new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue(".east.sun.com"), new RFC822NameValue("Anderson@sun.com")), - BooleanValue.FALSE }); + // + new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue("sun.com"), new RFC822NameValue("Anderson@east.sun.com")), BooleanValue.FALSE }, + // + new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue(".east.sun.com"), new RFC822NameValue("Anderson@east.sun.com")), BooleanValue.TRUE }, + // + new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue(".east.sun.com"), new RFC822NameValue("anne.anderson@ISRG.EAST.SUN.COM")), BooleanValue.TRUE }, + // + new Object[] { NAME_RFC822NAME_MATCH, Arrays.asList(new StringValue(".east.sun.com"), new RFC822NameValue("Anderson@sun.com")), BooleanValue.FALSE }); } } diff --git a/src/test/java/org/ow2/authzforce/core/test/func/StringConversionFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/StringConversionFunctionsTest.java index d72730e0..3735e5d6 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/StringConversionFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/StringConversionFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/func/StringFunctionsTest.java b/src/test/java/org/ow2/authzforce/core/test/func/StringFunctionsTest.java index ce5b5e70..364de793 100644 --- a/src/test/java/org/ow2/authzforce/core/test/func/StringFunctionsTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/func/StringFunctionsTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/utils/BagValueExpression.java b/src/test/java/org/ow2/authzforce/core/test/utils/BagValueExpression.java index ffb14b5c..1342c5ea 100644 --- a/src/test/java/org/ow2/authzforce/core/test/utils/BagValueExpression.java +++ b/src/test/java/org/ow2/authzforce/core/test/utils/BagValueExpression.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/utils/FunctionTest.java b/src/test/java/org/ow2/authzforce/core/test/utils/FunctionTest.java index c6c6ca92..95eb5d92 100644 --- a/src/test/java/org/ow2/authzforce/core/test/utils/FunctionTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/utils/FunctionTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/utils/NullValue.java b/src/test/java/org/ow2/authzforce/core/test/utils/NullValue.java index caea0b3d..ca604edb 100644 --- a/src/test/java/org/ow2/authzforce/core/test/utils/NullValue.java +++ b/src/test/java/org/ow2/authzforce/core/test/utils/NullValue.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/utils/PdpTest.java b/src/test/java/org/ow2/authzforce/core/test/utils/PdpTest.java index 6937fd27..0c8a5fd6 100644 --- a/src/test/java/org/ow2/authzforce/core/test/utils/PdpTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/utils/PdpTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * @@ -48,20 +48,16 @@ import org.springframework.util.ResourceUtils; /** - * PDP test class. There should be a folder for test data of each issue. Each test folder is expected to be in one of - * these two configurations: + * PDP test class. There should be a folder for test data of each issue. Each test folder is expected to be in one of these two configurations: *

* Configuration 1 for minimal/basic PDP configuration: *

    *
  • {@value #POLICY_FILENAME}: root policy filename used by the PDP
  • - *
  • {@value #REF_POLICIES_DIR_NAME}: (optional) directory containing files of XACML Policy(Set) that can be referred - * to from root policy {@value #POLICY_FILENAME} via Policy(Set)IdReference; required only if there is any - * Policy(Set)IdReference in {@value #POLICY_FILENAME} to resolve.
  • - *
  • {@value #REQUEST_FILENAME}: (optional) XACML request file sent to the PDP for evaluation. If not present, the - * test is considered as a static policy test, i.e. test for invalid policy detection, such as invalid syntax, circular - * reference, etc.
  • - *
  • {@value #EXPECTED_RESPONSE_FILENAME}: (optional) expected XACML response from the PDP, to be compared with the - * actual response. Required only if {@value #REQUEST_FILENAME} is present.
  • + *
  • {@value #REF_POLICIES_DIR_NAME}: (optional) directory containing files of XACML Policy(Set) that can be referred to from root policy {@value #POLICY_FILENAME} via Policy(Set)IdReference; + * required only if there is any Policy(Set)IdReference in {@value #POLICY_FILENAME} to resolve.
  • + *
  • {@value #REQUEST_FILENAME}: (optional) XACML request file sent to the PDP for evaluation. If not present, the test is considered as a static policy test, i.e. test for invalid policy detection, + * such as invalid syntax, circular reference, etc.
  • + *
  • {@value #EXPECTED_RESPONSE_FILENAME}: (optional) expected XACML response from the PDP, to be compared with the actual response. Required only if {@value #REQUEST_FILENAME} is present.
  • *
*

*

@@ -69,14 +65,11 @@ *

    *
  • {@value #PDP_CONF_FILENAME}: PDP configuration file
  • *
  • {@value #PDP_EXTENSION_XSD}: (optional) PDP extensions schema, required iff custom PDP extensions are required
  • - *
  • {@value #REQUEST_FILENAME}: (optional) XACML request file sent to the PDP for evaluation. If not present, the - * test is considered as a static policy test, i.e. test for invalid policy detection, such as invalid syntax, circular - * reference, etc.
  • - *
  • {@value #EXPECTED_RESPONSE_FILENAME}: (optional) expected XACML response from the PDP, to be compared with the - * actual response. Required only if {@value #REQUEST_FILENAME} is present.
  • - *
  • {@value #REF_POLICIES_DIR_NAME}: (optional) directory containing files of XACML Policy(Set) that can be referred - * to from root policy {@value #POLICY_FILENAME} via Policy(Set)IdReference; required only if there is any - * Policy(Set)IdReference in {@value #POLICY_FILENAME} to resolve.
  • + *
  • {@value #REQUEST_FILENAME}: (optional) XACML request file sent to the PDP for evaluation. If not present, the test is considered as a static policy test, i.e. test for invalid policy detection, + * such as invalid syntax, circular reference, etc.
  • + *
  • {@value #EXPECTED_RESPONSE_FILENAME}: (optional) expected XACML response from the PDP, to be compared with the actual response. Required only if {@value #REQUEST_FILENAME} is present.
  • + *
  • {@value #REF_POLICIES_DIR_NAME}: (optional) directory containing files of XACML Policy(Set) that can be referred to from root policy {@value #POLICY_FILENAME} via Policy(Set)IdReference; + * required only if there is any Policy(Set)IdReference in {@value #POLICY_FILENAME} to resolve.
  • *
  • Policy files matching locations defined in {@value #PDP_CONF_FILENAME}.
  • *
*

@@ -96,14 +89,12 @@ public abstract class PdpTest public final static String PDP_EXTENSION_XSD = "pdp-ext.xsd"; /** - * XACML policy filename used by default when no PDP configuration file found, i.e. no file named - * {@value #PDP_CONF_FILENAME} exists in the test directory + * XACML policy filename used by default when no PDP configuration file found, i.e. no file named {@value #PDP_CONF_FILENAME} exists in the test directory */ public final static String POLICY_FILENAME = "policy.xml"; /** - * Name of directory containing files of XACML Policy(Set) that can be referred to from root policy - * {@value #POLICY_FILENAME} via Policy(Set)IdReference + * Name of directory containing files of XACML Policy(Set) that can be referred to from root policy {@value #POLICY_FILENAME} via Policy(Set)IdReference */ public final static String REF_POLICIES_DIR_NAME = "refPolicies"; @@ -136,7 +127,7 @@ public abstract class PdpTest * @param testDir * directory where test data are located */ - public PdpTest(String testDir) + public PdpTest(final String testDir) { this.testDirPath = testDir; } @@ -145,25 +136,23 @@ public PdpTest(String testDir) * Initialize test parameters for each test. To be called by method with Parameters annotation in subclasses. * * @param testResourcesRootDirectory - * Spring-resolvable location (e.g. classpath:...) of root directory that contains test resources for - * each test + * Spring-resolvable location (e.g. classpath:...) of root directory that contains test resources for each test * * @return collection of test dataset * @throws URISyntaxException * @throws IOException */ - public static Collection params(String testResourcesRootDirectory) throws URISyntaxException, IOException + public static Collection params(final String testResourcesRootDirectory) throws URISyntaxException, IOException { final Collection testParams = new ArrayList<>(); /* - * Each sub-directory of the root directory is data for a specific test. So we configure a test for each - * directory + * Each sub-directory of the root directory is data for a specific test. So we configure a test for each directory */ final URL testRootDir = ResourceUtils.getURL(testResourcesRootDirectory); final Path testRootPath = Paths.get(testRootDir.toURI()); try (DirectoryStream stream = Files.newDirectoryStream(testRootPath)) { - for (Path path : stream) + for (final Path path : stream) { if (Files.isDirectory(path)) { @@ -178,7 +167,8 @@ public static Collection params(String testResourcesRootDirectory) thr testParams.add(new Object[] { testResourcesRootDirectory + "/" + lastPathElement.toString() }); } } - } catch (DirectoryIteratorException ex) + } + catch (final DirectoryIteratorException ex) { // I/O error encounted during the iteration, the cause is an IOException throw ex.getCause(); @@ -196,18 +186,17 @@ public void test() throws IllegalArgumentException, IOException, URISyntaxExcept // Parse request Request request = null; // if no Request file, it is just a static policy syntax error check - String reqFilepath = testResourceLocationPrefix + REQUEST_FILENAME; - NamespaceFilteringParser unmarshaller = XACML_PARSER_FACTORY.getInstance(); + final String reqFilepath = testResourceLocationPrefix + REQUEST_FILENAME; + final NamespaceFilteringParser unmarshaller = XACML_PARSER_FACTORY.getInstance(); try { request = TestUtils.createRequest(reqFilepath, unmarshaller); LOGGER.debug("XACML Request sent to the PDP: {}", request); - } catch (FileNotFoundException notFoundErr) + } + catch (final FileNotFoundException notFoundErr) { // do nothing except logging -> request = null - LOGGER.debug( - "Request file '{}' does not exist -> Static policy syntax error check (Request/Response ignored)", - reqFilepath); + LOGGER.debug("Request file '{}' does not exist -> Static policy syntax error check (Request/Response ignored)", reqFilepath); } // Create PDP @@ -217,11 +206,10 @@ public void test() throws IllegalArgumentException, IOException, URISyntaxExcept try { pdpConfFile = ResourceUtils.getFile(pdpConfLocation); - } catch (FileNotFoundException e) + } + catch (final FileNotFoundException e) { - LOGGER.debug( - "No PDP configuration file found at location: '{}'. Using minimal PDP instead (returned by TestUtils.getPDPNewInstance(policy) ).", - pdpConfLocation); + LOGGER.debug("No PDP configuration file found at location: '{}'. Using minimal PDP instead (returned by TestUtils.getPDPNewInstance(policy) ).", pdpConfLocation); } try @@ -229,13 +217,12 @@ public void test() throws IllegalArgumentException, IOException, URISyntaxExcept if (pdpConfFile == null) { /* - * PDP configuration filename NOT found in test directory -> create minimal PDP using - * TestUtils.getPDPNewInstance(policy) + * PDP configuration filename NOT found in test directory -> create minimal PDP using TestUtils.getPDPNewInstance(policy) */ - pdp = TestUtils.getPDPNewInstance(testResourceLocationPrefix + POLICY_FILENAME, - testResourceLocationPrefix + REF_POLICIES_DIR_NAME, false, null, null); + pdp = TestUtils.getPDPNewInstance(testResourceLocationPrefix + POLICY_FILENAME, testResourceLocationPrefix + REF_POLICIES_DIR_NAME, false, null, null); - } else + } + else { // PDP configuration filename found in test directory -> create PDP from it final String pdpExtXsdLocation = testResourceLocationPrefix + PDP_EXTENSION_XSD; @@ -243,40 +230,37 @@ public void test() throws IllegalArgumentException, IOException, URISyntaxExcept try { pdpExtXsdFile = ResourceUtils.getFile(pdpExtXsdLocation); - } catch (FileNotFoundException e) + } + catch (final FileNotFoundException e) { - LOGGER.debug( - "No PDP extension configuration file '{}' found -> JAXB-bound PDP extensions not allowed.", - pdpExtXsdLocation); + LOGGER.debug("No PDP extension configuration file '{}' found -> JAXB-bound PDP extensions not allowed.", pdpExtXsdLocation); } try { /* - * Load the PDP configuration from the configuration, and optionally, the PDP extension XSD if this - * file exists, and the XML catalog required to resolve these extension XSDs + * Load the PDP configuration from the configuration, and optionally, the PDP extension XSD if this file exists, and the XML catalog required to resolve these extension XSDs */ - pdp = pdpExtXsdFile == null ? PdpConfigurationParser.getPDP(pdpConfLocation) - : PdpConfigurationParser.getPDP(pdpConfFile, XML_CATALOG_LOCATION, pdpExtXsdLocation); - } catch (IOException e) + pdp = pdpExtXsdFile == null ? PdpConfigurationParser.getPDP(pdpConfLocation) : PdpConfigurationParser.getPDP(pdpConfFile, XML_CATALOG_LOCATION, pdpExtXsdLocation); + } + catch (final IOException e) { - throw new RuntimeException("Error parsing PDP configuration from file '" + pdpConfLocation - + "' with extension XSD '" + pdpExtXsdLocation + "' and XML catalog file '" + throw new RuntimeException("Error parsing PDP configuration from file '" + pdpConfLocation + "' with extension XSD '" + pdpExtXsdLocation + "' and XML catalog file '" + XML_CATALOG_LOCATION + "'", e); } } if (request == null) { - // this is a policy syntax error check and we didn't found the syntax error as - // expected - Assert.fail("Failed to find syntax error as expected in policy(ies) located in directory: " - + testDirPath); - } else + /* + * This is a policy syntax error check and we didn't found the syntax error as expected + */ + Assert.fail("Failed to find syntax error as expected in policy(ies) located in directory: " + testDirPath); + } + else { // Parse expected response - final Response expectedResponse = TestUtils.createResponse(testResourceLocationPrefix - + EXPECTED_RESPONSE_FILENAME, unmarshaller); + final Response expectedResponse = TestUtils.createResponse(testResourceLocationPrefix + EXPECTED_RESPONSE_FILENAME, unmarshaller); final Response response = pdp.evaluate(request, null); if (LOGGER.isDebugEnabled()) @@ -286,20 +270,22 @@ public void test() throws IllegalArgumentException, IOException, URISyntaxExcept TestUtils.assertNormalizedEquals(testResourceLocationPrefix, expectedResponse, response); LOGGER.debug("Finished PDP test of directory '{}'", testDirPath); } - } catch (IllegalArgumentException e) + } + catch (final IllegalArgumentException e) { // we found syntax error in policy if (request == null) { // this is a policy syntax error check and we found the syntax error as // expected -> success - LOGGER.debug("Successfully found syntax error as expected in policy(ies) located in directory: {}", - testDirPath, e); - } else + LOGGER.debug("Successfully found syntax error as expected in policy(ies) located in directory: {}", testDirPath, e); + } + else { throw e; } - } finally + } + finally { if (pdp != null) { diff --git a/src/test/java/org/ow2/authzforce/core/test/utils/TestUtils.java b/src/test/java/org/ow2/authzforce/core/test/utils/TestUtils.java index 4272ba26..d3e71ffe 100644 --- a/src/test/java/org/ow2/authzforce/core/test/utils/TestUtils.java +++ b/src/test/java/org/ow2/authzforce/core/test/utils/TestUtils.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/java/org/ow2/authzforce/core/test/value/AnyURIAttributeTest.java b/src/test/java/org/ow2/authzforce/core/test/value/AnyURIAttributeTest.java index ed7f1927..ab3b9c2b 100644 --- a/src/test/java/org/ow2/authzforce/core/test/value/AnyURIAttributeTest.java +++ b/src/test/java/org/ow2/authzforce/core/test/value/AnyURIAttributeTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2016 Thales Services SAS. + * Copyright (C) 2012-2017 Thales Services SAS. * * This file is part of AuthZForce CE. * diff --git a/src/test/resources/NonRegression/OW2-25.1/README.md b/src/test/resources/NonRegression/OW2-25.1/README.md new file mode 100644 index 00000000..dbf0bcd6 --- /dev/null +++ b/src/test/resources/NonRegression/OW2-25.1/README.md @@ -0,0 +1 @@ +PDP initialization must fail with IllegalArgumentException when using unknown/unsupported Function as Match function diff --git a/src/test/resources/NonRegression/OW2-25.1/pdp.xml b/src/test/resources/NonRegression/OW2-25.1/pdp.xml new file mode 100644 index 00000000..54f864f0 --- /dev/null +++ b/src/test/resources/NonRegression/OW2-25.1/pdp.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/test/resources/NonRegression/OW2-25.1/policy.xml b/src/test/resources/NonRegression/OW2-25.1/policy.xml new file mode 100644 index 00000000..005d1d92 --- /dev/null +++ b/src/test/resources/NonRegression/OW2-25.1/policy.xml @@ -0,0 +1,26 @@ + + + + + + + Rule using unknown Function as Match function: urn:oasis:names:tc:xacml:2.0:function:string-equal instead of urn:oasis:names:tc:xacml:1.0:function:string-equal + + + + + a + + + + + + + + \ No newline at end of file diff --git a/src/test/resources/NonRegression/OW2-25.2/README.md b/src/test/resources/NonRegression/OW2-25.2/README.md new file mode 100644 index 00000000..49a20c5a --- /dev/null +++ b/src/test/resources/NonRegression/OW2-25.2/README.md @@ -0,0 +1 @@ +PDP initialization must fail with IllegalArgumentException when using unknown/unsupported Function as Apply function diff --git a/src/test/resources/NonRegression/OW2-25.2/pdp.xml b/src/test/resources/NonRegression/OW2-25.2/pdp.xml new file mode 100644 index 00000000..54f864f0 --- /dev/null +++ b/src/test/resources/NonRegression/OW2-25.2/pdp.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/test/resources/NonRegression/OW2-25.2/policy.xml b/src/test/resources/NonRegression/OW2-25.2/policy.xml new file mode 100644 index 00000000..4c159273 --- /dev/null +++ b/src/test/resources/NonRegression/OW2-25.2/policy.xml @@ -0,0 +1,18 @@ + + + + + + + ule using unknown Function as Match function: urn:oasis:names:tc:xacml:2.0:function:string-equal instead of urn:oasis:names:tc:xacml:1.0:function:string-equal + + + + a + + + + + + \ No newline at end of file diff --git a/src/test/resources/NonRegression/README.md b/src/test/resources/NonRegression/README.md index a24de422..fa9d4018 100644 --- a/src/test/resources/NonRegression/README.md +++ b/src/test/resources/NonRegression/README.md @@ -3,8 +3,10 @@ This is the directory for all non-regression tests, where each subdirectory corr - `pdp.xml` (required) : PDP configuration file - `pdp-ext.xsd` (optional): XSD for loading PDP extensions such as the TestAttributeFinder, required only if such extensions are used in the PDP configuration file - `policy.xml` (required): XACML Policy(Set) file -- `request.xml` (required): XACML Request -- `response.xml` (required): expected response for the test to succeed +- `request.xml` (optional): XACML Request, absent if the test is only a PDP initialization test (e.g. policy validation) +- `response.xml` (optional): expected XACML Response for the above Request, absent if the test is only PDP initialization test (e.g. policy validation) - `README.md` (required): title and description of the test, mostly taken from the issue description and comments in the issue management system where the bug was reported. +If the test is a PDP intialization test only, typically a policy syntax validation, we expected an IllegalArgumentException as a result of the test. + If you implement or use a new PDP extension for testing, make sure there have a matching 'system' entry for the resolving the extension XSD location in the XML catalog file `src/test/resources/catalog.xml`, like the one for the TestAttributeFinder XSD. \ No newline at end of file diff --git a/src/test/resources/conformance/others/VariableId.Uniqueness/policy.xml b/src/test/resources/conformance/others/VariableId.Uniqueness/policy.xml new file mode 100644 index 00000000..f8a14db9 --- /dev/null +++ b/src/test/resources/conformance/others/VariableId.Uniqueness/policy.xml @@ -0,0 +1,17 @@ + + + + Purpose: Test detection of duplicate RuleId within Policy + + + + + + + + + 20 + + diff --git a/src/test/resources/conformance/xacml-3.0-from-2.0-ct/README.md b/src/test/resources/conformance/xacml-3.0-from-2.0-ct/README.md index fd152f19..917624f9 100644 --- a/src/test/resources/conformance/xacml-3.0-from-2.0-ct/README.md +++ b/src/test/resources/conformance/xacml-3.0-from-2.0-ct/README.md @@ -41,7 +41,9 @@ For a description of the tests, see file `ConformanceTests.html` which is the or 1. IIIG302 does not exist, but IIIG300 does. Fix: re-numbered 301 to 302, and 300 to 301. 1. IIIG301 and IIIG302: tests for ReturnPolicyIdList: the XACML specification is ambiguous about what is considered an "applicable" policy, and therefore what should be included in the PolicyIdentifierList. See the discussion here for more info: https://lists.oasis-open.org/archives/xacml-comment/201605/msg00004.html. In our (Authzforce definition), for instance, even if a policy evaluates to Indeterminate, it may still be considered applicable, which makes it different from what was intended in the original conformance tests. More generally, we define here an "applicable" policy as follows: a policy is "applicable" if and only if its evaluation result is different from NotApplicable (not NotApplicable means Applicable, shouldn't it?), and one of these two conditions is met: * The policy/policy reference has no enclosing policy, i.e. it is the root policy in PDP's evaluation. - * The policy has an enclosing policy and the enclosing policy is "applicable". (This definition is recursive.) + * The policy has an enclosing policy and the enclosing policy is "applicable". (This definition is recursive.) +1. These conformance tests do not include any test on VariableDefinitions/VariableReferences, such as VariableId uniqueness. We added our own in the parent directory. +1. These conformance tests do not include any test Policy(Set)Id/RuleId uniqueness. We added our own in the parent directory. **WARNING**: There are conformance tests which are intentionally not supported (in `unsupported` directory): diff --git a/src/test/resources/conformance/xacml-3.0-from-2.0-ct/optional/IIIG301/IIIG302Policy.xml b/src/test/resources/conformance/xacml-3.0-from-2.0-ct/optional/IIIG301/IIIG302Policy.xml index 5e6e11a9..a241e6ce 100644 --- a/src/test/resources/conformance/xacml-3.0-from-2.0-ct/optional/IIIG301/IIIG302Policy.xml +++ b/src/test/resources/conformance/xacml-3.0-from-2.0-ct/optional/IIIG301/IIIG302Policy.xml @@ -15,8 +15,7 @@ - %-4r [%t] [%d] %5p [%C:%M] \(%F:%L\) - %m%n + +