From 70736cfbf6ad1a068f8ee53adddd4faa3b6fa8a8 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Fri, 12 Apr 2019 11:03:44 -0400 Subject: Add statistics and sonar cleanup and blacklist * Adding in the statistics for decisions and errors. * Cleaned up sonar issues and added code coverage. * Sped up JUnit tests * Fix JUnit issues with not finding application path * Fix TestDecision not finding persistence.xml * Fix for lingering statistics from previous runs. That needs to be addressed at a later time. * Changed persistence to use properties for configuration of database rather than hard coding the persistence.xml * Fix for Josh's comment to use else-if * Changed to use apache Pair * Added blacklist guard policy Issue-ID: POLICY-1440 Change-Id: I56af8c3dcc82463f7381f1eaea7f1440b76200bd Signed-off-by: Pamela Dragosh --- .../src/main/resources/apps/guard/xacml.properties | 35 +++++++++++++--------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'packages/policy-xacmlpdp-tarball/src') diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties index e3ef3ebc..fea5da23 100644 --- a/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties +++ b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties @@ -22,25 +22,32 @@ xacml.att.policyFinderFactory=org.onap.policy.pdp.xacml.application.common.OnapP # # Use a root combining algorithm # -xacml.att.policyFinderFactory.combineRootPolicies=urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-unless-deny - -xacml.pip.engines=historydb +xacml.att.policyFinderFactory.combineRootPolicies=urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-overrides # -# PIP Engine Definition +# PIP Engine Definitions # -historydb.classname=org.onap.policy.pdp.xacml.application.common.OnapOperationsHistoryPipEngine -historydb.issuer=urn:org:onap:xacml:guard:historydb -historydb.name=operationHistoryDB -historydb.description=Returns operation counts based on time window +count-recent-operations.classname=org.onap.policy.pdp.xacml.application.common.operationshistory.CountRecentOperationsPip +count-recent-operations.issuer=urn:org:onap:xacml:guard:count-recent-operations +count-recent-operations.name=CountRecentOperations +count-recent-operations.description=Returns operation counts based on time window +count-recent-operations.persistenceunit=OperationsHistoryPU + +get-operation-outcome.classname=org.onap.policy.pdp.xacml.application.common.operationshistory.GetOperationOutcomePip +get-operation-outcome.issuer=urn:org:onap:xacml:guard:get-operation-outcome +get-operation-outcome.name=GetOperationOutcome +get-operation-outcome.description=Returns operation outcome +get-operation-outcome.persistenceunit=OperationsHistoryPU # -# Database persistence for PIP +# Make pips available to finder # -historydb.persistenceunit=OperationsHistoryPU +xacml.pip.engines=count-recent-operations,get-operation-outcome -# Policies to load # -#xacml.rootPolicies=guard -#guard.file=src/main/resources/RootGuardPolicy.xml - +# JPA Properties +# +javax.persistence.jdbc.driver=org.mariadb.jdbc.Driver +javax.persistence.jdbc.url=jdbc:mariadb://mariadb:3306/operationshistory +javax.persistence.jdbc.user=policy_user +javax.persistence.jdbc.password=cG9saWN5X3VzZXI= -- cgit 1.2.3-korg