Scenario 3: crossing policies
This scenario captures the case in which an action on a specific domain of targets must not be allowed to a general domain of subjects. However, a more specific domain of subjects are allowed to execute the same action on a general domain of targets. For an example, consider the domain structure shown below:
In more details, we have that nurses cannot access the patients in ic domain. However, nurses in emergency room (represented by the er domain) can have access to medical records for all the patients and in particular for patients in intensive care.
To execute this example the following command line must be used:
-auth allow -boot hospital/hdomain.p2 -boot hospital/scenario3/nurse-settings.p2 -boot hospital/scenario3/patient-settings.p2
If we send the request to Patient1 using Nurse1 then the operation will be not authorised. However, the same operation can be executed if we send the request (using the same nurse instance) to Patient2. The screenshot below shown this case:
On the other hand, using Nurse2 we can successfully send the request to both patient instances, as shown below:
