summaryrefslogtreecommitdiffstats
path: root/applications/common/src/test/resources
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-03-10 16:17:36 -0400
committerPamela Dragosh <pdragosh@research.att.com>2020-03-10 16:17:41 -0400
commitc48d65afeecfe1fd5cd735708107aa7c3bc87d17 (patch)
treee88bceda045169fea04ce1c144009ec1cf008640 /applications/common/src/test/resources
parentef1c07eb976ff4d8145f40ce4db092591bb78047 (diff)
Misc XACML code coverage
Removed duplicate code from operations history classes. added code coverage to other classes. cleared sonar in main for args Issue-ID: POLICY-2242 Change-Id: Ief548c96a180c132a3f17681d9cbc018c62e42ac Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/common/src/test/resources')
-rw-r--r--applications/common/src/test/resources/finder.test.properties32
-rw-r--r--applications/common/src/test/resources/finder.xml39
2 files changed, 71 insertions, 0 deletions
diff --git a/applications/common/src/test/resources/finder.test.properties b/applications/common/src/test/resources/finder.test.properties
new file mode 100644
index 00000000..73201fdd
--- /dev/null
+++ b/applications/common/src/test/resources/finder.test.properties
@@ -0,0 +1,32 @@
+#
+# 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
+#
+#
+#
+xacml.rootPolicies=rootstart,noexist
+rootstart.file=src/test/resources/finder.xml
+noexist.file=src/test/resources/idonotexist.xml
+
+xacml.referencedPolicies=refstart1,refstart2,refstart3,refstart4
+refstart1.file=src/test/resources/ref1.xml
+refstart2.file=src/test/resources/ref2.xml
+refstart3.file=src/test/resources/ref3.xml
+refstart4.file=src/test/resources/ref4.xml
diff --git a/applications/common/src/test/resources/finder.xml b/applications/common/src/test/resources/finder.xml
new file mode 100644
index 00000000..dc69d99a
--- /dev/null
+++ b/applications/common/src/test/resources/finder.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Policy
+ xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17
+ http://docs.oasis-open.org/xacml/3.0/xacml-core-v3-schema-wd-17.xsd"
+ PolicyId="urn:oasis:names:tc:xacml:3.0:example:SimplePolicy1"
+ Version="1.0"
+ RuleCombiningAlgId="identifier:rule-combining-algorithm:deny-overrides">
+ <Description>
+ Medi Corp access control policy
+ </Description>
+ <Target/>
+ <Rule
+ RuleId= "urn:oasis:names:tc:xacml:3.0:example:SimpleRule1"
+ Effect="Permit">
+ <Description>
+ Any subject with an e-mail name in the med.example.com domain
+ can perform any action on any resource.
+ </Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match
+ MatchId="urn:oasis:names:tc:xacml:1.0:function:rfc822Name-match">
+ <AttributeValue
+ DataType="http://www.w3.org/2001/XMLSchema#string"
+ >med.example.com</AttributeValue>
+ <AttributeDesignator
+ MustBePresent="false"
+ Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
+ AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id"
+ DataType="urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+</Policy> \ No newline at end of file