[jboss-cvs] JBossAS SVN: r71746 - in projects/security/security-xacml/trunk/jboss-xacml/src/tests: resources/test/requests/interop/rsaconf08 and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Apr 5 07:28:56 EDT 2008


Author: anil.saldhana at jboss.com
Date: 2008-04-05 07:28:55 -0400 (Sat, 05 Apr 2008)
New Revision: 71746

Added:
   projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access.xml
   projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access_deny.xml
Modified:
   projects/security/security-xacml/trunk/jboss-xacml/src/tests/java/org/jboss/test/security/xacml/interop/rsaconf/PhysicianUnitTestCase.java
   projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/patient_search.xml
Log:
add emergency access usecases

Modified: projects/security/security-xacml/trunk/jboss-xacml/src/tests/java/org/jboss/test/security/xacml/interop/rsaconf/PhysicianUnitTestCase.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/tests/java/org/jboss/test/security/xacml/interop/rsaconf/PhysicianUnitTestCase.java	2008-04-05 09:11:00 UTC (rev 71745)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/tests/java/org/jboss/test/security/xacml/interop/rsaconf/PhysicianUnitTestCase.java	2008-04-05 11:28:55 UTC (rev 71746)
@@ -205,6 +205,26 @@
       validateCase("patient_search.xml", XACMLConstants.DECISION_PERMIT); 
    }
    
+   public void testEmergencyAccess() throws Exception
+   {
+      /**
+       * The request contains the “pea-001” attribute, which, combined with the 
+       * absence of the “env:locality” turns on emergency override.
+       * If you remove the “pea” from the request, it should turn into a “deny”. 
+       */
+      validateCase("emergency_access.xml", XACMLConstants.DECISION_PERMIT); 
+   }
+   
+   public void testEmergencyAccessDeny() throws Exception
+   {
+      /**
+       * The request contains the “pea-001” attribute, which, combined with the 
+       * absence of the “env:locality” turns on emergency override.
+       * If you remove the “pea” from the request, it should turn into a “deny”. 
+       */
+      validateCase("emergency_access_deny.xml", XACMLConstants.DECISION_DENY); 
+   }
+   
    private PolicyDecisionPoint getPDP()
    {
       ClassLoader tcl = Thread.currentThread().getContextClassLoader();

Added: projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access.xml
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access.xml	                        (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access.xml	2008-04-05 11:28:55 UTC (rev 71746)
@@ -0,0 +1,57 @@
+<xacml-context:Request  xmlns:xacml-context="urn:oasis:names:tc:xacml:2.0:context:schema:os">
+<xacml-context:Subject 
+SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
+<xacml-context:Attribute 
+AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" 
+DataType="http://www.w3.org/2001/XMLSchema#string" >
+<AttributeValue>Doctor, Charlie I</AttributeValue>
+</xacml-context:Attribute>
+<xacml-context:Attribute 
+AttributeId="urn:va:xacml:2.0:interop:rsa8:subject:role" 
+DataType="http://www.w3.org/2001/XMLSchema#string">
+<AttributeValue>Emergency Access</AttributeValue>
+<AttributeValue>physician</AttributeValue>
+</xacml-context:Attribute>
+<xacml-context:Attribute 
+AttributeId="urn:va:xacml:2.0:interop:rsa8:subject:hl7:permission" 
+DataType="http://www.w3.org/2001/XMLSchema#string">
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-010</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-012</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-017</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-005</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:pea-001</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-003</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-009</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-006</AttributeValue>
+</xacml-context:Attribute>
+<xacml-context:Attribute 
+AttributeId="urn:oasis:names:tc:xacml:1.0:subject:locality" 
+DataType="http://www.w3.org/2001/XMLSchema#string"> 
+<AttributeValue>Facility B</AttributeValue>
+</xacml-context:Attribute>
+</xacml-context:Subject>
+<xacml-context:Resource>
+<xacml-context:Attribute 
+AttributeId="urn:va:xacml:2.0:interop:rsa8:resource:hl7:type" 
+DataType="http://www.w3.org/2001/XMLSchema#string" > 
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:resource:hl7:patientsearch</AttributeValue>
+</xacml-context:Attribute>
+<xacml-context:Attribute 
+AttributeId="urn:va:xacml:2.0:interop:rsa8:resource:hl7:permission" 
+DataType="http://www.w3.org/2001/XMLSchema#string" >
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-006</AttributeValue>
+</xacml-context:Attribute>
+</xacml-context:Resource>
+<xacml-context:Action>
+<xacml-context:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" 
+DataType="http://www.w3.org/2001/XMLSchema#string" > 
+<AttributeValue>execute</AttributeValue>
+</xacml-context:Attribute>
+</xacml-context:Action>
+<xacml-context:Environment>
+<xacml-context:Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:environment:locality" 
+DataType="http://www.w3.org/2001/XMLSchema#string" > 
+<AttributeValue>Facility A</AttributeValue>
+</xacml-context:Attribute>
+</xacml-context:Environment>
+</xacml-context:Request>
\ No newline at end of file

Added: projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access_deny.xml
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access_deny.xml	                        (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access_deny.xml	2008-04-05 11:28:55 UTC (rev 71746)
@@ -0,0 +1,56 @@
+<xacml-context:Request  xmlns:xacml-context="urn:oasis:names:tc:xacml:2.0:context:schema:os">
+<xacml-context:Subject 
+SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
+<xacml-context:Attribute 
+AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" 
+DataType="http://www.w3.org/2001/XMLSchema#string" >
+<AttributeValue>Doctor, Charlie I</AttributeValue>
+</xacml-context:Attribute>
+<xacml-context:Attribute 
+AttributeId="urn:va:xacml:2.0:interop:rsa8:subject:role" 
+DataType="http://www.w3.org/2001/XMLSchema#string">
+<AttributeValue>Emergency Access</AttributeValue>
+<AttributeValue>physician</AttributeValue>
+</xacml-context:Attribute>
+<xacml-context:Attribute 
+AttributeId="urn:va:xacml:2.0:interop:rsa8:subject:hl7:permission" 
+DataType="http://www.w3.org/2001/XMLSchema#string">
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-010</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-012</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-017</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-005</AttributeValue> 
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-003</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-009</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-006</AttributeValue>
+</xacml-context:Attribute>
+<xacml-context:Attribute 
+AttributeId="urn:oasis:names:tc:xacml:1.0:subject:locality" 
+DataType="http://www.w3.org/2001/XMLSchema#string"> 
+<AttributeValue>Facility B</AttributeValue>
+</xacml-context:Attribute>
+</xacml-context:Subject>
+<xacml-context:Resource>
+<xacml-context:Attribute 
+AttributeId="urn:va:xacml:2.0:interop:rsa8:resource:hl7:type" 
+DataType="http://www.w3.org/2001/XMLSchema#string" > 
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:resource:hl7:patientsearch</AttributeValue>
+</xacml-context:Attribute>
+<xacml-context:Attribute 
+AttributeId="urn:va:xacml:2.0:interop:rsa8:resource:hl7:permission" 
+DataType="http://www.w3.org/2001/XMLSchema#string" >
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-006</AttributeValue>
+</xacml-context:Attribute>
+</xacml-context:Resource>
+<xacml-context:Action>
+<xacml-context:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" 
+DataType="http://www.w3.org/2001/XMLSchema#string" > 
+<AttributeValue>execute</AttributeValue>
+</xacml-context:Attribute>
+</xacml-context:Action>
+<xacml-context:Environment>
+<xacml-context:Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:environment:locality" 
+DataType="http://www.w3.org/2001/XMLSchema#string" > 
+<AttributeValue>Facility A</AttributeValue>
+</xacml-context:Attribute>
+</xacml-context:Environment>
+</xacml-context:Request>
\ No newline at end of file

Modified: projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/patient_search.xml
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/patient_search.xml	2008-04-05 09:11:00 UTC (rev 71745)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/patient_search.xml	2008-04-05 11:28:55 UTC (rev 71746)
@@ -1,21 +1,12 @@
-<Request
-    xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-    xsi:schemaLocation="urn:oasis:names:tc:xacml:2.0:context:schema:os 
-      http://docs.oasis-open.org/xacml/access_control-xacml-2.0-context-schema-os.xsd">
-<Subject 
-SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
-<Attribute 
-AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" 
-DataType="http://www.w3.org/2001/XMLSchema#string" >
-<AttributeValue>Doctor, Bob</AttributeValue>
-</Attribute>
-<Attribute AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role" 
-DataType="http://www.w3.org/2001/XMLSchema#string" >
-<AttributeValue>urn:va:xacml:2.0:interop:rsa8:role:hl7:physician</AttributeValue>
-</Attribute>
-<Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:subject:hl7:permission" 
-DataType="http://www.w3.org/2001/XMLSchema#string" >
+<xacml-context:Request  xmlns:xacml-context="urn:oasis:names:tc:xacml:2.0:context:schema:os">
+<xacml-context:Subject SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
+<xacml-context:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" >
+<AttributeValue>Doctor, Bob R</AttributeValue>
+</xacml-context:Attribute>
+<xacml-context:Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string" >
+<AttributeValue>physician</AttributeValue>
+</xacml-context:Attribute>
+<xacml-context:Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:subject:hl7:permission" DataType="http://www.w3.org/2001/XMLSchema#string" >
 <AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-010</AttributeValue>
 <AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-012</AttributeValue>
 <AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-017</AttributeValue>
@@ -23,27 +14,27 @@
 <AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-003</AttributeValue>
 <AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-009</AttributeValue>
 <AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-006</AttributeValue>
-</Attribute>
-<Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:subject:locality" 
-DataType="http://www.w3.org/2001/XMLSchema#string" >
+</xacml-context:Attribute>
+<xacml-context:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:subject:locality" DataType="http://www.w3.org/2001/XMLSchema#string" >
 <AttributeValue>Facility A</AttributeValue>
-</Attribute>
-</Subject>
-<Resource>
-<Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:resource:hl7:type" 
-DataType="http://www.w3.org/2001/XMLSchema#string" >
+</xacml-context:Attribute>
+</xacml-context:Subject>
+<xacml-context:Resource>
+<xacml-context:Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" >
 <AttributeValue>urn:va:xacml:2.0:interop:rsa8:resource:hl7:patientsearch</AttributeValue>
-</Attribute>
-<Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:resource:hl7:permission" 
-DataType="http://www.w3.org/2001/XMLSchema#string" >
+</xacml-context:Attribute>
+<xacml-context:Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:resource:hl7:permission" DataType="http://www.w3.org/2001/XMLSchema#string" >
 <AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-006</AttributeValue>
-</Attribute>
-</Resource>
-<Action>
-<Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" 
-DataType="http://www.w3.org/2001/XMLSchema#string" >
+</xacml-context:Attribute>
+</xacml-context:Resource>
+<xacml-context:Action>
+<xacml-context:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" >
 <AttributeValue>execute</AttributeValue>
-</Attribute>
-</Action>
-<Environment></Environment>
-</Request>
\ No newline at end of file
+</xacml-context:Attribute>
+</xacml-context:Action>
+<xacml-context:Environment>
+<xacml-context:Attribute AttributeId="urn:va:xacml:2.0:interop:rsa8:environment:locality" DataType="http://www.w3.org/2001/XMLSchema#string" >
+<AttributeValue>Facility A</AttributeValue>
+</xacml-context:Attribute>
+</xacml-context:Environment>
+</xacml-context:Request>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list