aboutsummaryrefslogtreecommitdiffstats
path: root/packages/policy-xacmlpdp-tarball/src/main
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-04-12 11:03:44 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-04-12 20:28:17 -0400
commit70736cfbf6ad1a068f8ee53adddd4faa3b6fa8a8 (patch)
tree6f883bb4cf79cd18eaac33c46446ac86a42934ce /packages/policy-xacmlpdp-tarball/src/main
parenta5b035d9bb633cf5d520a62c451250db4b018a13 (diff)
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 <pdragosh@research.att.com>
Diffstat (limited to 'packages/policy-xacmlpdp-tarball/src/main')
-rw-r--r--packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties35
1 files changed, 21 insertions, 14 deletions
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=