From e034d785a227815f66138d1f83f49624c402aa97 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Mon, 8 Apr 2019 08:47:38 -0400 Subject: Test decision from main entry Tests a decision upon startup. This also updates the use of ToscaPolicyTypeIdentifier for all the applications. Very basic packaging for applications and their properties. Added cleaning of unused imports to remove sonar issues. Added production persistence.xml file to guard application. Not sure if we need a copy in the application/common resource directory. Issue-ID: POLICY-1440 Change-Id: If96eef5a9e0a7c6cc5461c0bdb6f0cd708cc41bb Signed-off-by: Pamela Dragosh --- .../src/main/resources/apps/guard/xacml.properties | 46 ++++++++++++++++++++++ .../apps/monitoring/RootMonitoringPolicy.xml | 32 +++++++++++++++ .../resources/apps/monitoring/xacml.properties | 26 ++++++++++++ .../resources/apps/optimization/xacml.properties | 31 +++++++++++++++ .../src/main/resources/etc/defaultConfig.json | 3 +- 5 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties create mode 100644 packages/policy-xacmlpdp-tarball/src/main/resources/apps/monitoring/RootMonitoringPolicy.xml create mode 100644 packages/policy-xacmlpdp-tarball/src/main/resources/apps/monitoring/xacml.properties create mode 100644 packages/policy-xacmlpdp-tarball/src/main/resources/apps/optimization/xacml.properties (limited to 'packages/policy-xacmlpdp-tarball') 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 new file mode 100644 index 00000000..e3ef3ebc --- /dev/null +++ b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties @@ -0,0 +1,46 @@ +# +# 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:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-unless-deny + +xacml.pip.engines=historydb + +# +# PIP Engine Definition +# +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 + +# +# Database persistence for PIP +# +historydb.persistenceunit=OperationsHistoryPU + +# Policies to load +# +#xacml.rootPolicies=guard +#guard.file=src/main/resources/RootGuardPolicy.xml + diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/apps/monitoring/RootMonitoringPolicy.xml b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/monitoring/RootMonitoringPolicy.xml new file mode 100644 index 00000000..5578fda9 --- /dev/null +++ b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/monitoring/RootMonitoringPolicy.xml @@ -0,0 +1,32 @@ + + + The root policy for supporting in-memory onap.Monitoring policy-type policies. + + + + + DCAE + + + + configure + + + + + + + + Default is to allow a permit - returning 0 obligations + + + + + + \ No newline at end of file diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/apps/monitoring/xacml.properties b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/monitoring/xacml.properties new file mode 100644 index 00000000..8ad5152d --- /dev/null +++ b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/monitoring/xacml.properties @@ -0,0 +1,26 @@ +# +# 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 + +# Policies to load +# +xacml.rootPolicies=monitoring +monitoring.file=/opt/app/policy/pdpx/apps/monitoring/RootMonitoringPolicy.xml + diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/apps/optimization/xacml.properties b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/optimization/xacml.properties new file mode 100644 index 00000000..5ea247cf --- /dev/null +++ b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/optimization/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 diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/etc/defaultConfig.json b/packages/policy-xacmlpdp-tarball/src/main/resources/etc/defaultConfig.json index 561574a2..cc13e5b3 100644 --- a/packages/policy-xacmlpdp-tarball/src/main/resources/etc/defaultConfig.json +++ b/packages/policy-xacmlpdp-tarball/src/main/resources/etc/defaultConfig.json @@ -7,5 +7,6 @@ "password": "zb!XztG34", "https": true, "aaf": false - } + }, + "applicationPath": "/opt/app/policy/pdpx/apps" } -- cgit 1.2.3-korg