diff options
Diffstat (limited to 'tutorials/tutorial-xacml-application/src/test/resources')
4 files changed, 109 insertions, 0 deletions
diff --git a/tutorials/tutorial-xacml-application/src/test/resources/tutorial-decision-request.json b/tutorials/tutorial-xacml-application/src/test/resources/tutorial-decision-request.json new file mode 100644 index 00000000..f3a7f9a2 --- /dev/null +++ b/tutorials/tutorial-xacml-application/src/test/resources/tutorial-decision-request.json @@ -0,0 +1,12 @@ +{ + "ONAPName": "TutorialPEP", + "ONAPComponent": "TutorialPEPComponent", + "ONAPInstance": "TutorialPEPInstance", + "requestId": "unique-request-id-tutorial", + "action": "authorize", + "resource": { + "user": "demo", + "entity": "foo", + "permission" : "write" + } +} diff --git a/tutorials/tutorial-xacml-application/src/test/resources/tutorial-policies.yaml b/tutorials/tutorial-xacml-application/src/test/resources/tutorial-policies.yaml new file mode 100644 index 00000000..fa353653 --- /dev/null +++ b/tutorials/tutorial-xacml-application/src/test/resources/tutorial-policies.yaml @@ -0,0 +1,34 @@ +tosca_definitions_version: tosca_simple_yaml_1_1_0 +topology_template: + policies: + - + onap.policy.tutorial.demo: + type: onap.policies.Authorization + type_version: 1.0.0 + version: 1.0.0 + metadata: + policy-id: onap.policy.tutorial.demo + policy-version: 1 + properties: + user: demo + permissions: + - + entity: foo + permission: read + - + entity: foo + permission: write + - + onap.policy.tutorial.audit: + type: onap.policies.Authorization + version: 1.0.0 + type_version: 1.0.0 + metadata: + policy-id: onap.policy.tutorial.bar + policy-version: 1 + properties: + user: audit + permissions: + - + entity: foo + permission: read diff --git a/tutorials/tutorial-xacml-application/src/test/resources/tutorial-policy-type.yaml b/tutorials/tutorial-xacml-application/src/test/resources/tutorial-policy-type.yaml new file mode 100644 index 00000000..7948bd28 --- /dev/null +++ b/tutorials/tutorial-xacml-application/src/test/resources/tutorial-policy-type.yaml @@ -0,0 +1,32 @@ +tosca_definitions_version: tosca_simple_yaml_1_1_0 +policy_types: + onap.policies.Authorization: + derived_from: tosca.policies.Root + version: 1.0.0 + description: Example tutorial policy type for doing user authorization + properties: + user: + type: string + required: true + description: The unique user name + permissions: + type: list + required: true + description: A list of resource permissions + entry_schema: + type: onap.datatypes.Tutorial +data_types: + onap.datatypes.Tutorial: + derived_from: tosca.datatypes.Root + version: 1.0.0 + properties: + entity: + type: string + required: true + description: The resource + permission: + type: string + required: true + description: The permission level + constraints: + - valid_values: [read, write, delete] diff --git a/tutorials/tutorial-xacml-application/src/test/resources/xacml.properties b/tutorials/tutorial-xacml-application/src/test/resources/xacml.properties new file mode 100644 index 00000000..277b098e --- /dev/null +++ b/tutorials/tutorial-xacml-application/src/test/resources/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:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-overrides + +# +# Policies to load +# +xacml.rootPolicies= +xacml.referencedPolicies=
\ No newline at end of file |