[jboss-cvs] JBossAS SVN: r71766 - 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
Mon Apr 7 10:26:13 EDT 2008


Author: anil.saldhana at jboss.com
Date: 2008-04-07 10:26:13 -0400 (Mon, 07 Apr 2008)
New Revision: 71766

Added:
   projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/charliefacilityB_patientA_deny_request.xml
   projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/charliefacilityB_patientA_emergency_request.xml
Modified:
   projects/security/security-xacml/trunk/jboss-xacml/src/tests/java/org/jboss/test/security/xacml/interop/rsaconf/InteropUseCasesUnitTestCase.java
   projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access_deny.xml
Log:
update emergency access usecases

Modified: projects/security/security-xacml/trunk/jboss-xacml/src/tests/java/org/jboss/test/security/xacml/interop/rsaconf/InteropUseCasesUnitTestCase.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/tests/java/org/jboss/test/security/xacml/interop/rsaconf/InteropUseCasesUnitTestCase.java	2008-04-07 14:19:17 UTC (rev 71765)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/tests/java/org/jboss/test/security/xacml/interop/rsaconf/InteropUseCasesUnitTestCase.java	2008-04-07 14:26:13 UTC (rev 71766)
@@ -225,6 +225,31 @@
       validateCase("emergency_access_deny.xml", XACMLConstants.DECISION_DENY); 
    }
    
+   public void testDrCharlieFromFacilityBAccessPatientFromFacilityADeny() 
+   throws Exception
+   {
+      /**
+       * Deny case
+       * Dr.Charlie from FacilityB tries to access the chart of a patient
+       * from Facility A. Should be deny
+       */
+      validateCase("charliefacilityB_patientA_deny_request.xml", 
+            XACMLConstants.DECISION_DENY);
+   }
+   
+   public void testDrCharlieFromFacilityBAccessPatientFromFacilityA_EmergencyAccess() 
+   throws Exception
+   {
+      /**
+       * Permit case
+       * Dr.Charlie from FacilityB tries to access the chart of a patient
+       * from Facility A. There is an emergency access attribute in the subject
+       * "pea-001"
+       */
+      validateCase("charliefacilityB_patientA_emergency_request.xml", 
+            XACMLConstants.DECISION_PERMIT);
+   }
+   
    private PolicyDecisionPoint getPDP()
    {
       ClassLoader tcl = Thread.currentThread().getContextClassLoader();

Added: projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/charliefacilityB_patientA_deny_request.xml
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/charliefacilityB_patientA_deny_request.xml	                        (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/charliefacilityB_patientA_deny_request.xml	2008-04-07 14:26:13 UTC (rev 71766)
@@ -0,0 +1,68 @@
+<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 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>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:medical-record</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-010</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-012</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>
+</xacml-context:Attribute>
+<xacml-context:Attribute 
+AttributeId="urn:va:xacml:2.0:interop:rsa8:resource:hl7:confidentiality-code" 
+DataType="http://www.w3.org/2001/XMLSchema#string" >
+<AttributeValue>UBA</AttributeValue>
+<AttributeValue>MA</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>read</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/charliefacilityB_patientA_emergency_request.xml
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/charliefacilityB_patientA_emergency_request.xml	                        (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/charliefacilityB_patientA_emergency_request.xml	2008-04-07 14:26:13 UTC (rev 71766)
@@ -0,0 +1,69 @@
+<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 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>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:medical-record</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-010</AttributeValue>
+<AttributeValue>urn:va:xacml:2.0:interop:rsa8:hl7:prd-012</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>
+</xacml-context:Attribute>
+<xacml-context:Attribute 
+AttributeId="urn:va:xacml:2.0:interop:rsa8:resource:hl7:confidentiality-code" 
+DataType="http://www.w3.org/2001/XMLSchema#string" >
+<AttributeValue>UBA</AttributeValue>
+<AttributeValue>MA</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>read</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/emergency_access_deny.xml
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access_deny.xml	2008-04-07 14:19:17 UTC (rev 71765)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/tests/resources/test/requests/interop/rsaconf08/emergency_access_deny.xml	2008-04-07 14:26:13 UTC (rev 71766)
@@ -1,4 +1,5 @@
-<xacml-context:Request  xmlns:xacml-context="urn:oasis:names:tc:xacml:2.0:context:schema:os">
+<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 




More information about the jboss-cvs-commits mailing list