[jboss-cvs] JBossAS SVN: r86556 - in projects/security/security-xacml/trunk/jboss-xacml/src/test: java/org/jboss/test/security/xacml/interop/himss09 and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 31 18:20:22 EDT 2009


Author: anil.saldhana at jboss.com
Date: 2009-03-31 18:20:22 -0400 (Tue, 31 Mar 2009)
New Revision: 86556

Added:
   projects/security/security-xacml/trunk/jboss-xacml/src/test/java/org/jboss/test/security/xacml/interop/himss09/
   projects/security/security-xacml/trunk/jboss-xacml/src/test/java/org/jboss/test/security/xacml/interop/himss09/Himss09UnitTestCase.java
   projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/logging.properties
   projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/test/policies/interop/himss09/himss-policy-01.xml
   projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/test/requests/interop/himss09/
   projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/test/requests/interop/himss09/himss-request-01.xml
Log:
himss testcase

Added: projects/security/security-xacml/trunk/jboss-xacml/src/test/java/org/jboss/test/security/xacml/interop/himss09/Himss09UnitTestCase.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/test/java/org/jboss/test/security/xacml/interop/himss09/Himss09UnitTestCase.java	                        (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/test/java/org/jboss/test/security/xacml/interop/himss09/Himss09UnitTestCase.java	2009-03-31 22:20:22 UTC (rev 86556)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.security.xacml.interop.himss09;
+
+import java.io.InputStream;
+
+import org.jboss.security.xacml.core.JBossPDP;
+import org.jboss.security.xacml.interfaces.PolicyDecisionPoint;
+import org.jboss.security.xacml.interfaces.ResponseContext;
+import org.jboss.security.xacml.interfaces.XACMLConstants;
+import org.jboss.test.security.xacml.factories.util.XACMLTestUtil;
+
+import junit.framework.TestCase;
+
+/**
+ * Himss09 Unit Test Case
+ * @author Anil.Saldhana at redhat.com
+ * @since Mar 30, 2009
+ */
+public class Himss09UnitTestCase extends TestCase
+{
+   public void testPermit() throws Exception
+   {    
+      validateCase(getResponse("himss-request-01.xml"), 
+            XACMLConstants.DECISION_PERMIT); 
+   }
+
+   private PolicyDecisionPoint getPDP()
+   {
+      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+      InputStream is = tcl.getResourceAsStream("test/config/himss09-interop-config.xml");
+      assertNotNull("InputStream != null", is);
+
+      return new JBossPDP(is);
+   }
+   
+   private ResponseContext getResponse(String loc) throws Exception
+   {
+      loc = "test/requests/interop/himss09/" + loc;
+      return XACMLTestUtil.getResponse(getPDP(), loc);
+   }
+   
+   private void validateCase(ResponseContext response, int decisionval) throws Exception
+   {
+      int decision = response.getDecision();
+      
+      switch(decisionval)
+      {
+         case XACMLConstants.DECISION_PERMIT: 
+            assertEquals("PERMIT?", XACMLConstants.DECISION_PERMIT,decision);
+            break;
+         case XACMLConstants.DECISION_DENY:
+            assertEquals("DENY?", XACMLConstants.DECISION_DENY,decision);
+            break;
+         default: fail("wrong value");
+      }  
+   } 
+}
\ No newline at end of file

Added: projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/logging.properties
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/logging.properties	                        (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/logging.properties	2009-03-31 22:20:22 UTC (rev 86556)
@@ -0,0 +1,21 @@
+# Specify the handlers to create in the root logger
+# (all loggers are children of the root logger)
+# The following creates two handlers
+handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
+    
+# Set the default logging level for the root logger
+.level = ALL
+    
+# Set the default logging level for new ConsoleHandler instances
+java.util.logging.ConsoleHandler.level = ALL
+    
+# Set the default logging level for new FileHandler instances
+java.util.logging.FileHandler.level = ALL
+    
+# Set the default formatter for new ConsoleHandler instances
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
+
+# Set the default logging level for the logger named org.jboss
+org.jboss.security.xacml.sunxacml.level = FINEST
+com.sun.xml.bind.level = OFF

Added: projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/test/policies/interop/himss09/himss-policy-01.xml
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/test/policies/interop/himss09/himss-policy-01.xml	                        (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/test/policies/interop/himss09/himss-policy-01.xml	2009-03-31 22:20:22 UTC (rev 86556)
@@ -0,0 +1,601 @@
+<?xml version="1.0" encoding="utf-8"?>
+<PolicySet xmlns="urn:oasis:names:tc:xacml:2.0:policy:schema:os" 
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+           xsi:schemaLocation="urn:oasis:names:tc:xacml:2.0:policy:schema:os http://docs.oasis-open.org/xacml/access_control-xacml-2.0-policy-schema-os.xsd" 
+           PolicySetId="urn:oasis:names:tc:xspa:1.0" 
+           PolicyCombiningAlgId="urn:oasis:names:tc:xacml:1.0:policy-combining-algorithm:deny-overrides">
+  <Target />
+  <PolicySet PolicySetId="urn:oasis:names:tc:xspa:1.0:org" PolicyCombiningAlgId="urn:oasis:names:tc:xacml:1.0:policy-combining-algorithm:deny-overrides">
+    <Description>Contains all organizational policies which are evaluated on all requests.</Description>
+    <Target />    
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:org:allowed:organizations" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        The organization denies the request if the subject is attempting to access 
+        a resource and is not a member of the allowed organizations.
+      </Description>
+      <Target />
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:org:allowed:organizations:deny" Effect="Deny">
+        <Description>Evaluates the allowed-organizations (if available) against the subject's locality.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:allowed-organizations" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+                <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:subject:locality" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:allowed-organizations" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              </Apply>              
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+    </Policy>
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:org:hoursofoperations" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        The organization denies the request if the subject is attempting to access
+        the resource outside of the alloted time.
+      </Description>
+      <Target />
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:org:hoursofoperation:deny" Effect="Deny">
+        <Description>Evaluates the environment time against the hours of operation start and end.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:or">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-greater-than-or-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
+                  <EnvironmentAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" DataType="http://www.w3.org/2001/XMLSchema#time" />
+                </Apply>
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:hoursofoperation:start" DataType="http://www.w3.org/2001/XMLSchema#time" />
+                </Apply>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-less-than-or-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
+                  <EnvironmentAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" DataType="http://www.w3.org/2001/XMLSchema#time" />
+                </Apply>
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:hoursofoperation:end" DataType="http://www.w3.org/2001/XMLSchema#time" />
+                </Apply>
+              </Apply>
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+    </Policy>
+
+    <!-- SUBJECT.STRUCTURED-ROLE NOT IN ORG.REQUIRED-ROLES -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:org:required:roles" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        The organization denies the request if the subject is attempting to access 
+        a resource and they are not a member of the required role(s).
+      </Description>
+      <Target />
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:org:required:roles:deny" Effect="Deny">
+        <Description>Evaluates the organization roles (if available) against the subject's role.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">                
+                <!-- MAY NEED TO SWITCH ~~ Is this a one to many relationship?  Are all roles required or does the subject just need to be included? -->
+                <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:role" DataType="http://www.w3.org/2001/XMLSchema#string" />                
+              </Apply>
+            </Apply>            
+          </Apply>
+        </Condition>
+      </Rule>
+    </Policy>
+
+    <!-- SUBJECT.PERMISSIONS NOT IN ORG.RESOURCE.PERMISSIONS -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:org.resource.permissions" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        The organization denies the request if the subject does not have adequate
+        permissions to access the resource.
+      </Description>
+      <Target />
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:org:resource.permissions:deny" Effect="Deny">
+        <Description>Evaluates the required permissions (if available) against the subject's permissions.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:hl7:permission" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+                <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:hl7:permission" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:subject:hl7:permission" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              </Apply>                
+            </Apply>             
+          </Apply>
+        </Condition>
+      </Rule>
+    </Policy>
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:org.catch-all" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:permit-overrides">
+      <Description></Description>
+      <Target />
+      <Rule RuleId="" Effect="Permit"></Rule>
+    </Policy>
+  </PolicySet>
+
+  <PolicySet PolicySetId="urn:oasis:names:tc:xspa:1.0:patient" PolicyCombiningAlgId="urn:oasis:names:tc:xacml:1.0:policy-combining-algorithm:deny-overrides">
+    <Description>These policies are patient consent directives and are invoked on medical-record requests.</Description>
+    <Target />
+
+    <!-- (RESOURCE.RESOURCETYPE IN PATIENT.MASKEDOBJECT) AND (SUBJECT.ROLE IN PATIENT.MA.DISSENTING-ROLES) -->
+    <!-- PROBLEMS -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:problems:dissenting-roles" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request for problems from the subject if the NPI is not permitted by the patient.
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:problems:dissenting-roles:permit" Effect="Permit">
+        <Description>Evaluates the dissenting-roles for problems (if available) against the subject's role.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Problems:dissenting-role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+              <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Problems:dissenting-role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+      <Obligations>
+        <Obligation ObligationId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Problems:dissenting-role" FulfillOn="Permit"></Obligation>
+      </Obligations>
+    </Policy>
+    <!-- MEDICATIONS -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:medications:dissenting-roles" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request for medications from the subject if the NPI is not permitted by the patient.
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:medications:dissenting-roles:permit" Effect="Permit">
+        <Description>Evaluates the dissenting-roles for medications (if available) against the subject's role.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Medications:dissenting-role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+              <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Medications:dissenting-role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+      <Obligations>
+        <Obligation ObligationId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Medications:dissenting-role" FulfillOn="Permit"></Obligation>
+      </Obligations>
+    </Policy>
+    <!-- ALERTS -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:alerts:dissenting-roles" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request alerts from the subject if the NPI is not permitted by the patient.
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:alerts:dissenting-roles:permit" Effect="Permit">
+        <Description>Evaluates the dissenting-roles for alerts (if available) against the subject's role.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Alerts:dissenting-role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+              <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Alerts:dissenting-role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+      <Obligations>
+        <Obligation ObligationId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Alerts:dissenting-role" FulfillOn="Permit"></Obligation>
+      </Obligations>
+    </Policy>
+
+    <!-- IMMUNIZATIONS -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:immunizations:dissenting-roles" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request for immunizations from the subject if the NPI is not permitted by the patient.
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:immunizations:dissenting-roles:permit" Effect="Permit">
+        <Description>Evaluates the dissenting-roles for immunizations (if available) against the subject's role.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Immunizations:dissenting-role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+              <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Immunizations:dissenting-role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+      <Obligations>
+        <Obligation ObligationId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Immunizations:dissenting-role" FulfillOn="Permit"></Obligation>
+      </Obligations>
+    </Policy>
+
+    <!-- (RESOURCE.RESOURCETYPE IN PATIENT.MASKEDOBJECT) AND (SUBJECT.ROLE IN PATIENT.MA.DISSENTING-ROLES) -->
+    <!-- PROBLEMS -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:problems:dissenting-subject-ids" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request for problems from the subject if the NPI is not permitted by the patient.
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:problems:dissenting-subject-ids:permit" Effect="Permit">
+        <Description>Evaluates the dissenting-subject-id's for problems (if available) against the subject's NPI.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Problems:dissenting-subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+              <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:subject:npi" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Problems:dissenting-subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+      <Obligations>
+        <Obligation ObligationId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Problems:dissenting-subject-id" FulfillOn="Permit"></Obligation>
+      </Obligations>
+    </Policy>
+    <!-- MEDICATIONS -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:medications:dissenting-subject-ids" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request for medications from the subject if the NPI is not permitted by the patient.
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:medications:dissenting-subject-ids:permit" Effect="Permit">
+        <Description>Evaluates the dissenting-subject-id's for medications (if available) against the subject's NPI.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Medications:dissenting-subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+              <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:subject:npi" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Medications:dissenting-subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+      <Obligations>
+        <Obligation ObligationId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Medications:dissenting-subject-id" FulfillOn="Permit"></Obligation>
+      </Obligations>
+    </Policy>
+    <!-- ALERTS -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:alerts:dissenting-subject-ids" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request for alerts from the subject if the NPI is not permitted by the patient.
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:alerts:dissenting-subject-ids:permit" Effect="Permit">
+        <Description>Evaluates the dissenting-subject-id's for alerts (if available) against the subject's NPI.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Alerts:dissenting-subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+              <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:subject:npi" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Alerts:dissenting-subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+      <Obligations>
+        <Obligation ObligationId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Alerts:dissenting-subject-id" FulfillOn="Permit"></Obligation>
+      </Obligations>
+    </Policy>
+    <!-- IMMUNIZATIONS -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:immunizations:dissenting-subject-ids" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request for immunizations from the subject if the NPI is not permitted by the patient.
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:immunizations:dissenting-subject-ids:permit" Effect="Permit">
+        <Description>Evaluates the dissenting-subject-id's for immunizations (if available) against the subject's NPI.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Immunizations:dissenting-subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+              <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:subject:npi" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Immunizations:dissenting-subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>      
+      <Obligations>
+        <Obligation ObligationId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Immunizations:dissenting-subject-id" FulfillOn="Permit"></Obligation>
+      </Obligations>
+    </Policy>
+    
+    <!-- SUBJECT.LOCALITY NOT IN PATIENT.ALLOWED-ORGANIZATIONS -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:patient:allowed:organizations" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request from the subject if their locality is not permitted by the patient.
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:patient:allowed:organizations:deny" Effect="Deny">
+        <Description>Evaluates the allowed-organizations (if available) against the subject's locality.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:allowed-organizations" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+                <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:subject:locality" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:allowed-organizations" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              </Apply>
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+    </Policy>
+
+    <!-- SUBJECT.ROLE IN PATIENT.DISSENTING-ROLES -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:resource:patient:dissenting:role" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request from the subject if their role is not permitted by the patient.
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:patient:dissenting:roles:deny" Effect="Deny">
+        <Description>Evaluates the dissenting-role (if available) against the subject's role.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">                        
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+              <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:dissenting-role" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>            
+          </Apply>
+        </Condition>
+      </Rule>
+    </Policy>
+
+    <!-- SUBJECT.ID IN PATIENT.DISSENTING-ID -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0:resource:patient:dissenting-subject-ids" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request from the subject if the NPI is not permitted by the patient.
+      </Description>
+      <Target />
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:problems:dissenting-subject-ids:deny" Effect="Deny">
+        <Description>Evaluates the dissenting-subject-id (if available) against the subject's NPI.</Description>
+        <Target>
+          <Resources>
+            <Resource>
+              <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+                <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              </ResourceMatch>
+            </Resource>
+          </Resources>
+        </Target>
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag-size">
+                  <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:dissenting-subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" />
+                </Apply>
+                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">0</AttributeValue>
+              </Apply>
+            </Apply>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
+              <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:subject:npi" DataType="http://www.w3.org/2001/XMLSchema#string" />
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:dissenting-subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+    </Policy>
+
+    <!-- CONFIDENTIALITY -->
+    <Policy PolicyId="urn:oasis:names:tc:xspa:1.0.resource:patient:hl7:confidentiality-codes" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides">
+      <Description>
+        Denies the request from the subject if the confidentiality code is set to "Sensitive".  This policy
+        is acting as the "Catch-All".
+      </Description>
+      <Target>
+        <Resources>
+          <Resource>
+            <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </ResourceMatch>
+          </Resource>
+        </Resources>
+      </Target>
+      <Rule RuleId="urn:oasis:names:tc:xspa:1.0.resource:patient:hl7:confidentiality-code:deny" Effect="Deny">
+        <Description>Evaluates the HL7 confidentiality-code.</Description>
+        <Target />
+        <Condition>
+          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-is-in">
+              <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">S</AttributeValue>
+              <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xspa:1.0.resource:patient:hl7:confidentiality-code" DataType="http://www.w3.org/2001/XMLSchema#string" />
+            </Apply>
+          </Apply>
+        </Condition>
+      </Rule>
+    </Policy>
+  </PolicySet>
+</PolicySet>
\ No newline at end of file

Added: projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/test/requests/interop/himss09/himss-request-01.xml
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/test/requests/interop/himss09/himss-request-01.xml	                        (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/test/resources/test/requests/interop/himss09/himss-request-01.xml	2009-03-31 22:20:22 UTC (rev 86556)
@@ -0,0 +1,160 @@
+<xacml-context:Request xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os"
+	xmlns:xacml-context="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">
+
+	<xacml-context:Subject
+		SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xacml:2.0:subject:subject-id"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>Doctor,Bob
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute AttributeId="urn:oasis:names:tc:xspa:1.0:subject:npi"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>100035
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>codeSystem="1.2.840.1986.7"
+				codeSystemName="ISO" displayName="MD/Allopath"
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:subject:functional_role"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>physician
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:subject:purposeofuse"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>Healthcare Treatment
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:subject:hl7:permission"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-017"
+			</xacml-context:AttributeValue>
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-003"
+			</xacml-context:AttributeValue>
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-012"
+			</xacml-context:AttributeValue>
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-005"
+			</xacml-context:AttributeValue>
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-010"
+			</xacml-context:AttributeValue>
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-006"
+			</xacml-context:AttributeValue>
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-009"
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xacml:2.0:subject:locality" DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>Healthcare Domain A
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+	</xacml-context:Subject>
+	<xacml-context:Resource>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" 
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>
+				urn:oasis:names:tc:xspa:1.0:resource:hl7:type:medical-record
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:hoursofoperation:start"
+			DataType="http://www.w3.org/2001/XMLSchema#time">
+			<xacml-context:AttributeValue>00:00:00-08:00</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:hoursofoperation:end"
+			DataType="http://www.w3.org/2001/XMLSchema#time">
+			<xacml-context:AttributeValue>23:59:00-08:00</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:allowed-organizations"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>Healthcare Domain A
+			</xacml-context:AttributeValue>
+			<xacml-context:AttributeValue>DoD Healthcare Domain A
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:resource:org:hl7:permission"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-003"
+			</xacml-context:AttributeValue>
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-005"
+			</xacml-context:AttributeValue>
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-010"
+			</xacml-context:AttributeValue>
+			<xacml-context:AttributeValue>codeSystem="2.16.840.1.113883.13.27"
+				codeSystemName="HL7" displayName="PRD-012"
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:allowed-organizations"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>Healthcare Domain A
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0.resource:patient:hl7:confidentiality-code"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>UBA</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Alerts:dissenting-subject-id"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>100035
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Immunizations:dissenting-subject-id"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>100035
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Medications:dissenting-subject-id"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>100035
+			</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xspa:1.0:resource:patient:masked:Problems:dissenting-subject-id"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>100035
+			</xacml-context: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">
+			<xacml-context:AttributeValue>Read</xacml-context:AttributeValue>
+		</xacml-context:Attribute>
+	</xacml-context:Action>
+	<xacml-context:Environment>
+		<xacml-context:Attribute
+			AttributeId="urn:oasis:names:tc:xacml:2.0:resource:locality"
+			DataType="http://www.w3.org/2001/XMLSchema#string">
+			<xacml-context:AttributeValue>Healthcare Domain B
+			</xacml-context: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