We use XACML resource data labeling to provide access control to data. There are limits to what can/should be put in the data labels which use basic logic for each attribute type (anyinall or allinall).
There is a need to provide additional restrictions beyond the data labeling that can include explicit lists of subjects that have access. In this case, we want to extend the restrictions in the data labels with an explicit list of subjects (AND the data labeling permit to those in the list).
How would we write this in an XACML policy where (a) not only do we identify the subject but (b) can perform additional resource.attributes to subject.attribute comparisons.
We have used entitlements to represent membership in a "list", which is entitlement management intensive. The entitlement also has limited complex logic (e.g. combination of ANDs and ORs) of resources attributes to the subject id attributes.
Data labeling uses rules that include anyinall or allinall to bags of attributes (i.e. resource.classification:"private" allinall subject.classification:"private")
I expect the Permit to include:
- all data labels are permitted based on subject.attributes
- the subjectID is included in a "list"
- the subjectID meets complex logic comparisions of ANDs and ORs rules for resource.attributes to subjectID.attributes
Each section would permit or deny and any deny will fail the overall policy
You can easily do that in XACML (and ALFA - the more lightweight syntax of XACML). First of all, you stated that:
To do so, you will use a Policy for each section that uses the
deny-unless-permitcombining algorithm. This means that either the policy will grant access if the conditions are met or it will deny access. You might remember that by default, if conditions are not met, the usual decision isNotApplicable. Usingdeny-unless-permitwill prevent that.Once you have written each policy using
deny-unless-permit, you will combine them all into a parent policy set which will use adeny-overridescombining algorithm. This means that if there is any deny decision, then that decision will trump all other decisions.This gives us the following structure:
ALFA
Equivalent in XACML
Other Checks
In addition to your policy structure, you mention that you would to control access based on attributes (e.g. a user can view a document they own) and also based on explicit access control (a user can view a document if they are on the list for that document). You can absolutely implement discretionary access control (DAC) in XACML in addition to attribute-based access. Here is an example: