diff --git a/openaz-pep/src/main/java/org/apache/openaz/pepapi/Action.java b/openaz-pep/src/main/java/org/apache/openaz/pepapi/Action.java
index efcf3d4..a4bdd0d 100644
--- a/openaz-pep/src/main/java/org/apache/openaz/pepapi/Action.java
+++ b/openaz-pep/src/main/java/org/apache/openaz/pepapi/Action.java
@@ -22,16 +22,12 @@
import org.apache.openaz.xacml.api.XACML3;
-;
-
/**
* Container class that maps attributes to predefined XACML Action category.
*/
public class Action extends CategoryContainer {
- public static final String ACTION_ID_KEY = "ACTION_ID_KEY";
-
- private String actionIdValue;
+ private String id;
private Action() {
super(XACML3.ID_ATTRIBUTE_CATEGORY_ACTION);
@@ -47,33 +43,33 @@ public static Action newInstance() {
}
/**
- * Create a new Action instance containing a single default attribute with the given value
+ * Creates a new Subject instance containing a single default attribute with the given String value.
*
- * @param actionIdValue
+ * @param id
* @return
*/
- public static Action newInstance(String actionIdValue) {
- Action a = new Action();
- a.actionIdValue = actionIdValue;
- a.addAttribute(ACTION_ID_KEY, actionIdValue);
- return a;
+ public static Action newInstance(String id) {
+ return newInstance().withId(id);
}
/**
- * Get the value for default attribute.
+ * Sets the Id of the action
*
+ * @param id
* @return
*/
- public String getActionIdValue() {
- return actionIdValue;
+ public Action withId(String id) {
+ this.id = id;
+ addAttribute(XACML3.ID_ACTION_ACTION_ID.stringValue(), id);
+ return this;
}
-
- @Override
- public String toString() {
- StringBuilder builder = new StringBuilder();
- builder.append("action-id value: " + actionIdValue);
- builder.append("\n");
- builder.append(super.toString());
- return builder.toString();
+/**
+ * Returns the value of the id
+ *
+ * @return
+ */
+ public String getId() {
+ return id;
}
+
}
diff --git a/openaz-pep/src/main/java/org/apache/openaz/pepapi/PepConfig.java b/openaz-pep/src/main/java/org/apache/openaz/pepapi/PepConfig.java
index e09f291..bafa19c 100644
--- a/openaz-pep/src/main/java/org/apache/openaz/pepapi/PepConfig.java
+++ b/openaz-pep/src/main/java/org/apache/openaz/pepapi/PepConfig.java
@@ -31,21 +31,6 @@ public interface PepConfig {
*/
String getIssuer();
- /**
- * @return
- */
- String getDefaultSubjectId();
-
- /**
- * @return
- */
- String getDefaultResourceId();
-
- /**
- * @return
- */
- String getDefaultActionId();
-
/**
* @return
*/
diff --git a/openaz-pep/src/main/java/org/apache/openaz/pepapi/Resource.java b/openaz-pep/src/main/java/org/apache/openaz/pepapi/Resource.java
index 8d7e1a4..8d8e379 100644
--- a/openaz-pep/src/main/java/org/apache/openaz/pepapi/Resource.java
+++ b/openaz-pep/src/main/java/org/apache/openaz/pepapi/Resource.java
@@ -20,19 +20,17 @@
package org.apache.openaz.pepapi;
-import java.net.URI;
-import java.util.Date;
-
import org.apache.openaz.xacml.api.XACML3;
+import java.net.URI;
+
/**
* Container class that maps attributes to predefined XACML Resource category.
*/
public final class Resource extends CategoryContainer {
- public static final String RESOURCE_ID_KEY = "RESOURCE_ID_KEY";
-
- private Object resourceIdValue;
+ private Object id; // only java.lang.String or java.net.URI
+ private URI location;
private Resource() {
super(XACML3.ID_ATTRIBUTE_CATEGORY_RESOURCE);
@@ -50,97 +48,75 @@ public static Resource newInstance() {
/**
* Creates a new Resource instance containing a single default attribute with the given String value.
*
- * @param resourceIdValue
+ * @param id
* @return
*/
- public static Resource newInstance(String resourceIdValue) {
- Resource r = new Resource();
- r.resourceIdValue = resourceIdValue;
- r.addAttribute(RESOURCE_ID_KEY, resourceIdValue);
- return r;
+ public static Resource newInstance(String id) {
+ return newInstance().withId(id);
}
/**
* Creates a new Resource instance containing a single default attribute with the given URI value.
*
- * @param resourceIdValue
+ * @param id
* @return
*/
- public static Resource newInstance(URI resourceIdValue) {
- Resource r = new Resource();
- r.resourceIdValue = resourceIdValue;
- r.addAttribute(RESOURCE_ID_KEY, resourceIdValue);
- return r;
+ public static Resource newInstance(URI id) {
+ return newInstance().withId(id);
}
/**
- * Creates a new Resource instance containing a single default attribute with the given Long value.
+ * Sets resource id value
*
- * @param resourceIdValue
- * @return
+ * @param id
+ * @return this
*/
- public static Resource newInstance(Long resourceIdValue) {
- Resource r = new Resource();
- r.resourceIdValue = resourceIdValue;
- r.addAttribute(RESOURCE_ID_KEY, resourceIdValue);
- return r;
+ public Resource withId(URI id) {
+ this.id = id;
+ addAttribute(XACML3.ID_RESOURCE_RESOURCE_ID.stringValue(), id);
+ return this;
}
/**
- * Creates a new Resource instance containing a single default attribute with the given Double value.
+ * Sets resource id value
*
- * @param resourceIdValue
- * @return
+ * @param id
+ * @return this
*/
- public static Resource newInstance(Double resourceIdValue) {
- Resource r = new Resource();
- r.resourceIdValue = resourceIdValue;
- r.addAttribute(RESOURCE_ID_KEY, resourceIdValue);
- return r;
+ public Resource withId(String id) {
+ this.id = id;
+ addAttribute(XACML3.ID_RESOURCE_RESOURCE_ID.stringValue(), id);
+ return this;
}
/**
- * Creates a new Resource instance containing a single default attribute with the given Boolean value.
+ * Sets resource location
*
- * @param resourceIdValue
- * @return
+ * @param location
+ * @return this
*/
- public static Resource newInstance(Boolean resourceIdValue) {
- Resource r = new Resource();
- r.resourceIdValue = resourceIdValue;
- r.addAttribute(RESOURCE_ID_KEY, resourceIdValue);
- return r;
+ public Resource withLocation(URI location) {
+ this.location = location;
+ addAttribute(XACML3.ID_RESOURCE_RESOURCE_LOCATION.stringValue(), location);
+ return this;
}
/**
- * Creates a new Resource instance containing a single default attribute with the given
- * java.util.Date
value.
+ * Returns the value of the id attribute
*
- * @param resourceIdValue
* @return
*/
- public static Resource newInstance(Date resourceIdValue) {
- Resource r = new Resource();
- r.resourceIdValue = resourceIdValue;
- r.addAttribute(RESOURCE_ID_KEY, resourceIdValue);
- return r;
+ public Object getId() {
+ return this.id;
}
/**
- * Returns the value of the default resourceIdValue attribute
+ * Returns the value of the location attribute
*
* @return
*/
- public Object getResourceIdValue() {
- return resourceIdValue;
+ public URI getLocation() {
+ return location;
}
- @Override
- public String toString() {
- StringBuilder builder = new StringBuilder();
- builder.append("resource-id value : " + resourceIdValue);
- builder.append("\n");
- builder.append(super.toString());
- return builder.toString();
- }
}
diff --git a/openaz-pep/src/main/java/org/apache/openaz/pepapi/Subject.java b/openaz-pep/src/main/java/org/apache/openaz/pepapi/Subject.java
index 1fedb4f..9f19a57 100644
--- a/openaz-pep/src/main/java/org/apache/openaz/pepapi/Subject.java
+++ b/openaz-pep/src/main/java/org/apache/openaz/pepapi/Subject.java
@@ -27,9 +27,7 @@
*/
public class Subject extends CategoryContainer {
- public static final String SUBJECT_ID_KEY = "SUBJECT_ID_KEY";
-
- private String subjectIdValue;
+ private String id;
private Subject() {
super(XACML3.ID_SUBJECT_CATEGORY_ACCESS_SUBJECT);
@@ -47,31 +45,32 @@ public static Subject newInstance() {
/**
* Creates a new Subject instance containing a single default attribute with the given String value.
*
- * @param subjectIdValue
+ * @param id
* @return
*/
- public static Subject newInstance(String subjectIdValue) {
- Subject s = new Subject();
- s.subjectIdValue = subjectIdValue;
- s.addAttribute(SUBJECT_ID_KEY, subjectIdValue);
- return s;
+ public static Subject newInstance(String id) {
+ return newInstance().withId(id);
}
/**
- * Returns the value of the default subjectIdValue attribute
+ * Sets the Id of the subject
*
+ * @param id
* @return
*/
- public String getSubjectIdValue() {
- return subjectIdValue;
+ public Subject withId(String id) {
+ this.id = id;
+ addAttribute(XACML3.ID_SUBJECT_SUBJECT_ID.stringValue(), id);
+ return this;
}
- @Override
- public String toString() {
- StringBuilder builder = new StringBuilder();
- builder.append("subject-id value : " + subjectIdValue);
- builder.append("\n");
- builder.append(super.toString());
- return builder.toString();
+ /**
+ * Returns the value of the id
+ *
+ * @return
+ */
+ public String getId() {
+ return id;
}
+
}
diff --git a/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/ActionMapper.java b/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/ActionMapper.java
index 347710a..41b8b2f 100644
--- a/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/ActionMapper.java
+++ b/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/ActionMapper.java
@@ -22,20 +22,9 @@
import org.apache.openaz.pepapi.Action;
-/**
- * Created by ajith on 12/11/14.
- */
public class ActionMapper extends CategoryContainerMapper {
public ActionMapper() {
super(Action.class);
}
-
- @Override
- protected String resolveAttributeId(String attributeId) {
- if (attributeId.equals(Action.ACTION_ID_KEY)) {
- return getPepConfig().getDefaultActionId();
- }
- return attributeId;
- }
}
diff --git a/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/ResourceMapper.java b/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/ResourceMapper.java
index 09efe01..ce7e436 100644
--- a/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/ResourceMapper.java
+++ b/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/ResourceMapper.java
@@ -22,20 +22,9 @@
import org.apache.openaz.pepapi.Resource;
-/**
- * Created by ajith on 12/11/14.
- */
public class ResourceMapper extends CategoryContainerMapper {
public ResourceMapper() {
super(Resource.class);
}
-
- @Override
- protected String resolveAttributeId(String attributeId) {
- if (attributeId.equals(Resource.RESOURCE_ID_KEY)) {
- return getPepConfig().getDefaultResourceId();
- }
- return attributeId;
- }
}
diff --git a/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/StdPepConfig.java b/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/StdPepConfig.java
index 94928d6..9debb7f 100644
--- a/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/StdPepConfig.java
+++ b/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/StdPepConfig.java
@@ -21,13 +21,11 @@
package org.apache.openaz.pepapi.std;
import com.google.common.base.Splitter;
-
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.openaz.pepapi.PepConfig;
import org.apache.openaz.pepapi.PepResponseBehavior;
-import org.apache.openaz.xacml.api.XACML3;
import java.util.ArrayList;
import java.util.Collections;
@@ -40,12 +38,6 @@ public final class StdPepConfig implements PepConfig {
private static final String PEP_ISSUER = "pep.issuer";
- private static final String PEP_DEFAULT_SUBJECT_ID = "pep.subject.id";
-
- private static final String PEP_DEFAULT_ACTION_ID = "pep.action.id";
-
- private static final String PEP_DEFAULT_RESOURCE_ID = "pep.resource.id";
-
private static final String PEP_INDETERMINATE_BEHAVIOR = "pep.indeterminate.behavior";
private static final String PEP_NOTAPPLICABLE_BEHAVIOR = "pep.notapplicable.behavior";
@@ -54,12 +46,6 @@ public final class StdPepConfig implements PepConfig {
private String issuer;
- private String subjectIdURI;
-
- private String actionIdURI;
-
- private String resourceIdURI;
-
private PepResponseBehavior indeterminateBehavior;
private PepResponseBehavior notApplicableBehavior;
@@ -68,9 +54,6 @@ public final class StdPepConfig implements PepConfig {
public StdPepConfig() {
// Defaults
- subjectIdURI = XACML3.ID_SUBJECT_SUBJECT_ID.stringValue();
- actionIdURI = XACML3.ID_ACTION_ACTION_ID.stringValue();
- resourceIdURI = XACML3.ID_RESOURCE_RESOURCE_ID.stringValue();
indeterminateBehavior = PepResponseBehavior.THROW_EXCEPTION;
notApplicableBehavior = PepResponseBehavior.RETURN_NO;
mapperClassNames = Collections.emptyList();
@@ -80,21 +63,6 @@ public StdPepConfig(Properties properties) {
this();
issuer = properties.getProperty(PEP_ISSUER);
- String subjectIdURI = properties.getProperty(PEP_DEFAULT_SUBJECT_ID);
- if (!StringUtils.isEmpty(subjectIdURI)) {
- this.subjectIdURI = subjectIdURI;
- }
-
- String actionIdURI = properties.getProperty(PEP_DEFAULT_ACTION_ID);
- if (!StringUtils.isEmpty(actionIdURI)) {
- this.actionIdURI = actionIdURI;
- }
-
- String resourceIdURI = properties.getProperty(PEP_DEFAULT_RESOURCE_ID);
- if (!StringUtils.isEmpty(resourceIdURI)) {
- this.resourceIdURI = resourceIdURI;
- }
-
String indeterminateString = properties.getProperty(PEP_INDETERMINATE_BEHAVIOR);
if (!StringUtils.isEmpty(indeterminateString)) {
PepResponseBehavior indeterminateBehavior = PepResponseBehavior.valueOf(indeterminateString);
@@ -119,7 +87,7 @@ public StdPepConfig(Properties properties) {
if (!StringUtils.isEmpty(mapperClassNameString)) {
List mapperClassNames = new ArrayList();
for (String className : Splitter.on(",").omitEmptyStrings().trimResults()
- .split(mapperClassNameString)) {
+ .split(mapperClassNameString)) {
mapperClassNames.add(className);
}
this.mapperClassNames = Collections.unmodifiableList(mapperClassNames);
@@ -132,21 +100,6 @@ public String getIssuer() {
return issuer;
}
- @Override
- public String getDefaultSubjectId() {
- return subjectIdURI;
- }
-
- @Override
- public String getDefaultResourceId() {
- return resourceIdURI;
- }
-
- @Override
- public String getDefaultActionId() {
- return actionIdURI;
- }
-
@Override
public PepResponseBehavior getIndeterminateBehavior() {
return indeterminateBehavior;
diff --git a/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/SubjectMapper.java b/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/SubjectMapper.java
index b2ace5f..e98b5a2 100644
--- a/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/SubjectMapper.java
+++ b/openaz-pep/src/main/java/org/apache/openaz/pepapi/std/SubjectMapper.java
@@ -22,20 +22,9 @@
import org.apache.openaz.pepapi.Subject;
-/**
- * Created by ajith on 12/11/14.
- */
public class SubjectMapper extends CategoryContainerMapper {
public SubjectMapper() {
super(Subject.class);
}
-
- @Override
- protected String resolveAttributeId(String attributeId) {
- if (attributeId.equals(Subject.SUBJECT_ID_KEY)) {
- return getPepConfig().getDefaultSubjectId();
- }
- return attributeId;
- }
-}
+}
\ No newline at end of file
diff --git a/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestAPI.java b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestAPI.java
index d6c96b4..9c16caf 100644
--- a/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestAPI.java
+++ b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestAPI.java
@@ -26,6 +26,7 @@
import org.junit.Before;
import org.junit.Test;
+import java.net.URI;
import java.util.ArrayList;
import java.util.List;
@@ -57,6 +58,34 @@ public void testPermit() {
Assert.assertEquals(true, response.allowed());
}
+ /**
+ *
+ */
+ @Test
+ public void testPermitWithLocationMatch() {
+ Subject subject = Subject.newInstance("Bob");
+ Action action = Action.newInstance("read");
+ Resource resource = Resource.newInstance(URI.create("/record/patient/Alice"))
+ .withLocation(URI.create("http://medical-records.com/"));
+ PepResponse response = getPepAgent().decide(subject, action, resource);
+ Assert.assertNotNull(response);
+ Assert.assertEquals(true, response.allowed());
+ }
+
+ /**
+ *
+ */
+ @Test
+ public void testPermitWithLocationMismatch() {
+ Subject subject = Subject.newInstance("Bob");
+ Action action = Action.newInstance("read");
+ Resource resource = Resource.newInstance(URI.create("/record/patient/Alice"))
+ .withLocation(URI.create("http://restricted-records.com/"));
+ PepResponse response = getPepAgent().decide(subject, action, resource);
+ Assert.assertNotNull(response);
+ Assert.assertEquals(false, response.allowed());
+ }
+
/**
*
*/
diff --git a/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestDataTypes.java b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestDataTypes.java
index 4276ea6..8b92958 100644
--- a/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestDataTypes.java
+++ b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestDataTypes.java
@@ -64,19 +64,6 @@ public void testPermitWithURIResource() {
Assert.assertEquals(true, response.allowed());
}
- /**
- *
- */
- @Test
- public void testPermitWithIntegerResource() {
- Subject subject = Subject.newInstance("John Smith");
- Action action = Action.newInstance("view");
- Resource resource = Resource.newInstance(101L);
- PepResponse response = getPepAgent().decide(subject, action, resource);
- Assert.assertNotNull(response);
- Assert.assertEquals(true, response.allowed());
- }
-
/**
*
*/
diff --git a/openaz-pep/src/test/resources/policies/TestPolicy001.xml b/openaz-pep/src/test/resources/policies/TestPolicy001.xml
deleted file mode 100755
index fff89f6..0000000
--- a/openaz-pep/src/test/resources/policies/TestPolicy001.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
- Julius Hibbert can read or write Bart Simpson's medical record.
-
-
-
-
-
- Julius Hibbert
-
-
-
-
-
-
-
- http://medico.com/record/patient/BartSimpson
-
-
-
-
-
-
-
- read
-
-
-
-
-
- write
-
-
-
-
-
-
-
diff --git a/openaz-pep/src/test/resources/policies/TestPolicy002.xml b/openaz-pep/src/test/resources/policies/TestPolicy002.xml
deleted file mode 100755
index 3867f77..0000000
--- a/openaz-pep/src/test/resources/policies/TestPolicy002.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-
-
-
- Policy for Conformance Test IIA001.
-
-
-
-
- Physicians can read or write Bart Simpson's medical record.
-
-
-
-
-
- Physician
-
-
-
-
-
-
-
- http://medico.com/record/patient/BartSimpson
-
-
-
-
-
-
-
- read
-
-
-
-
-
- write
-
-
-
-
-
-
-
-
- Patient is allowed to read his/her medical record.
-
-
-
-
-
- Patient
-
-
-
-
-
-
-
- http://medico.com/record/patient/BartSimpson
-
-
-
-
-
-
-
- read
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/openaz-pep/src/test/resources/policies/TestPolicy003.xml b/openaz-pep/src/test/resources/policies/TestPolicy003.xml
deleted file mode 100755
index edb75a4..0000000
--- a/openaz-pep/src/test/resources/policies/TestPolicy003.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- John Smith
-
-
-
-
-
-
-
- file://repository/classified/abc
-
-
-
-
-
-
-
- view
-
-
-
-
-
-
-
-
-
-
-
- John Smith
-
-
-
-
-
-
-
- file://repository/classified/xyz
-
-
-
-
-
-
-
- view
-
-
-
-
-
-
-
-
-
-
-
- John Smith
-
-
-
-
-
-
-
- 101
-
-
-
-
-
-
-
- view
-
-
-
-
-
-
-
diff --git a/openaz-pep/src/test/resources/policies/TestPolicy004.xml b/openaz-pep/src/test/resources/policies/TestPolicy004.xml
deleted file mode 100755
index b861425..0000000
--- a/openaz-pep/src/test/resources/policies/TestPolicy004.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- ROLE_DOCUMENT_WRITER
-
-
-
-
-
-
-
- Document
-
-
-
-
-
-
-
- write
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ROLE_DOCUMENT_READER
-
-
-
-
-
-
-
- Document
-
-
-
-
-
-
-
- read
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/openaz-pep/src/test/resources/policies/TestPolicy005.xml b/openaz-pep/src/test/resources/policies/TestPolicy005.xml
deleted file mode 100755
index 88c51f0..0000000
--- a/openaz-pep/src/test/resources/policies/TestPolicy005.xml
+++ /dev/null
@@ -1,207 +0,0 @@
-
-
-
-
-
- PolicySet for Test 005.
-
-
-
-
- Policy for Test 005.
-
-
-
-
-
-
-
- Physician
-
-
-
-
-
-
-
- PatientMedicalRecord
-
-
-
-
-
-
-
- read
-
-
-
-
-
-
-
-
- EVAL_SUBJECT_ATTRIBUTE
-
-
-
-
-
- Policy for Test 005.
-
-
-
-
-
-
-
- Patient
-
-
-
-
-
-
-
- PatientMedicalRecord
-
-
-
-
-
-
-
- read
-
-
-
-
-
-
-
-
- EVAL_SUBJECT_ATTRIBUTE
-
-
-
-
-
-
- Policy for Test 005.
-
-
-
-
-
-
-
- InsuranceAgent
-
-
-
-
-
-
-
- PatientMedicalRecord
-
-
-
-
-
-
-
- read
-
-
-
-
-
-
-
-
- EVAL_RESOURCE_ATTRIBUTE
- EVAL_SUBJECT_ATTRIBUTE
-
-
-
-
diff --git a/openaz-pep/src/test/resources/policies/TestPolicy006.xml b/openaz-pep/src/test/resources/policies/TestPolicy006.xml
deleted file mode 100755
index f739f2d..0000000
--- a/openaz-pep/src/test/resources/policies/TestPolicy006.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
- PolicySet for Test 005.
-
-
-
-
- Policy for Test 005.
-
-
-
-
-
-
-
- John Smith
-
-
-
-
-
-
-
- resource1
-
-
-
-
-
-
-
- view
-
-
-
-
-
-
-
-
- Filtering
- EVAL_SUBJECT_ATTRIBUTE
-
-
- EVAL_SUBJECT_ATTRIBUTE
-
-
-
-
diff --git a/openaz-pep/src/test/resources/policies/testapi.xml b/openaz-pep/src/test/resources/policies/testapi.xml
new file mode 100755
index 0000000..1aa5ce7
--- /dev/null
+++ b/openaz-pep/src/test/resources/policies/testapi.xml
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+ Julius Hibbert can read or write Bart Simpson's medical record.
+
+
+
+
+
+ Julius Hibbert
+
+
+
+
+
+
+
+ http://medico.com/record/patient/BartSimpson
+
+
+
+
+
+
+
+ read
+
+
+
+
+
+ write
+
+
+
+
+
+
+
+
+
+
+
+
+ Bob
+
+
+
+
+
+
+
+ /record/patient/Alice
+
+
+
+
+
+
+
+ http://medical-records.com/
+
+
+
+
+
+
+
+ read
+
+
+
+
+
+
+
diff --git a/openaz-pep/src/test/resources/policies/testdatatypes.xml b/openaz-pep/src/test/resources/policies/testdatatypes.xml
new file mode 100755
index 0000000..7465988
--- /dev/null
+++ b/openaz-pep/src/test/resources/policies/testdatatypes.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+ John Smith
+
+
+
+
+
+
+
+ file://repository/classified/abc
+
+
+
+
+
+
+
+ view
+
+
+
+
+
+
+
+
+
+
+
+ John Smith
+
+
+
+
+
+
+
+ file://repository/classified/xyz
+
+
+
+
+
+
+
+ view
+
+
+
+
+
+
+
+
+
+
+
+ John Smith
+
+
+
+
+
+
+
+ 101
+
+
+
+
+
+
+
+ view
+
+
+
+
+
+
+
diff --git a/openaz-pep/src/test/resources/policies/testmapper.xml b/openaz-pep/src/test/resources/policies/testmapper.xml
new file mode 100755
index 0000000..e964a02
--- /dev/null
+++ b/openaz-pep/src/test/resources/policies/testmapper.xml
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+ ROLE_DOCUMENT_WRITER
+
+
+
+
+
+
+
+ Document
+
+
+
+
+
+
+
+ write
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ROLE_DOCUMENT_READER
+
+
+
+
+
+
+
+ Document
+
+
+
+
+
+
+
+ read
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/openaz-pep/src/test/resources/properties/testapi.xacml.properties b/openaz-pep/src/test/resources/properties/testapi.xacml.properties
index 7ba87d7..8b9098a 100755
--- a/openaz-pep/src/test/resources/properties/testapi.xacml.properties
+++ b/openaz-pep/src/test/resources/properties/testapi.xacml.properties
@@ -14,7 +14,7 @@ xacml.openaz.functionDefinitionFactory=org.apache.openaz.xacml.pdp.std.StdFuncti
xacml.openaz.policyFinderFactory=org.apache.openaz.xacml.pdp.std.StdPolicyFinderFactory
xacml.rootPolicies=testPolicy
-testPolicy.file=src/test/resources/policies/TestPolicy001.xml
+testPolicy.file=src/test/resources/policies/testapi.xml
# If there is a standard policy for the engine:
# xacml.att.stdPolicyFinderFactory.rootPolicyFile=/etc/stdpolicyset.xml
diff --git a/openaz-pep/src/test/resources/properties/testdatatypes.xacml.properties b/openaz-pep/src/test/resources/properties/testdatatypes.xacml.properties
index c4e8ef5..90cc014 100755
--- a/openaz-pep/src/test/resources/properties/testdatatypes.xacml.properties
+++ b/openaz-pep/src/test/resources/properties/testdatatypes.xacml.properties
@@ -14,7 +14,7 @@ xacml.openaz.functionDefinitionFactory=org.apache.openaz.xacml.pdp.std.StdFuncti
xacml.openaz.policyFinderFactory=org.apache.openaz.xacml.pdp.std.StdPolicyFinderFactory
xacml.rootPolicies=testPolicy
-testPolicy.file=src/test/resources/policies/TestPolicy003.xml
+testPolicy.file=src/test/resources/policies/testdatatypes.xml
# If there is a standard policy for the engine:
# xacml.att.stdPolicyFinderFactory.rootPolicyFile=/etc/stdpolicyset.xml
diff --git a/openaz-pep/src/test/resources/properties/testmapper.xacml.properties b/openaz-pep/src/test/resources/properties/testmapper.xacml.properties
index 22c67a3..10b0f02 100755
--- a/openaz-pep/src/test/resources/properties/testmapper.xacml.properties
+++ b/openaz-pep/src/test/resources/properties/testmapper.xacml.properties
@@ -14,7 +14,7 @@ xacml.openaz.functionDefinitionFactory=org.apache.openaz.xacml.pdp.std.StdFuncti
xacml.openaz.policyFinderFactory=org.apache.openaz.xacml.pdp.std.StdPolicyFinderFactory
xacml.rootPolicies=testPolicy
-testPolicy.file=src/test/resources/policies/TestPolicy004.xml
+testPolicy.file=src/test/resources/policies/testmapper.xml
#pep properties
pep.issuer=test