From f8d2c21bb589303febc11024f3cd667946f44459 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Mon, 24 Aug 2020 15:50:31 -0400 Subject: Add new Match application to XACML Add new generic match application to XACML PDP. This app will allow ONAP users to design their own matchable policy types and use StdMatchableTranslator out-of-the box without any modification. Fills the gap left behind since "configure" via the Monitoring can support StdCombinedResultsTranslator, but the Optimization policy types have a specific "closest match" algorithm tied to them. Gives flexibility. removed unused import Issue-ID: POLICY-2596 Change-Id: I0aebae706fb9634e7bb13d78eff0ccc1ae4d752f Signed-off-by: Pamela Dragosh --- main/pom.xml | 5 ++++ .../main/rest/XacmlPdpApplicationManagerTest.java | 4 +-- .../src/test/resources/apps/match/xacml.properties | 31 ++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 main/src/test/resources/apps/match/xacml.properties (limited to 'main') diff --git a/main/pom.xml b/main/pom.xml index d16db20a..9382938e 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -93,6 +93,11 @@ native ${project.version} + + org.onap.policy.xacml-pdp.applications + match + ${project.version} + org.onap.policy.models policy-models-pdp diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManagerTest.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManagerTest.java index 668d875c..4670e785 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManagerTest.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManagerTest.java @@ -142,10 +142,10 @@ public class XacmlPdpApplicationManagerTest { // assertThat(manager).isNotNull(); assertThat(manager.getPolicyCount()).isZero(); - assertThat(manager.getPolicyTypeCount()).isEqualTo(17); + assertThat(manager.getPolicyTypeCount()).isEqualTo(18); assertThat(manager.getToscaPolicies()).isEmpty(); assertThat(manager.getToscaPolicyIdentifiers()).isEmpty(); - assertThat(manager.getToscaPolicyTypeIdents()).hasSize(17); + assertThat(manager.getToscaPolicyTypeIdents()).hasSize(18); assertThat(manager.findNativeApplication()).isInstanceOf(NativePdpApplication.class); diff --git a/main/src/test/resources/apps/match/xacml.properties b/main/src/test/resources/apps/match/xacml.properties new file mode 100644 index 00000000..5ea247cf --- /dev/null +++ b/main/src/test/resources/apps/match/xacml.properties @@ -0,0 +1,31 @@ +# +# Properties that the embedded PDP engine uses to configure and load +# +# Standard API Factories +# +xacml.dataTypeFactory=com.att.research.xacml.std.StdDataTypeFactory +xacml.pdpEngineFactory=com.att.research.xacmlatt.pdp.ATTPDPEngineFactory +xacml.pepEngineFactory=com.att.research.xacml.std.pep.StdEngineFactory +xacml.pipFinderFactory=com.att.research.xacml.std.pip.StdPIPFinderFactory +xacml.traceEngineFactory=com.att.research.xacml.std.trace.LoggingTraceEngineFactory +# +# AT&T PDP Implementation Factories +# +xacml.att.evaluationContextFactory=com.att.research.xacmlatt.pdp.std.StdEvaluationContextFactory +xacml.att.combiningAlgorithmFactory=com.att.research.xacmlatt.pdp.std.StdCombiningAlgorithmFactory +xacml.att.functionDefinitionFactory=com.att.research.xacmlatt.pdp.std.StdFunctionDefinitionFactory +# +# ONAP PDP Implementation Factories +# +xacml.att.policyFinderFactory=org.onap.policy.pdp.xacml.application.common.OnapPolicyFinderFactory + +# +# Use a root combining algorithm +# +xacml.att.policyFinderFactory.combineRootPolicies=urn:com:att:xacml:3.0:policy-combining-algorithm:combined-permit-overrides + +# +# Policies to load +# +xacml.rootPolicies= +xacml.referencedPolicies= \ No newline at end of file -- cgit 1.2.3-korg