Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

With ABAC/XACML how do you protect resources in reports/large result sets?

How have folks used an abac approach when running reports or even just selecting multiple records from a DB?

For instance, if you have a policy that states:

Doctors can only view patients in their hospital

Obviously the efficient way to implement this is to include a filter in your query (where hospital = XXX), but this seems to break with the principal of ABAC as it bakes the rule into the SQL itself.

I know Axiomatics offers a reverse query mechanism that apparently generates filters for you based on rules-- but my system has a lot of complex sql that would have to be refactored quite a bit to work with this.

How have other folks handle this problem?

like image 885
jbd Avatar asked Apr 26 '16 19:04

jbd


1 Answers

There are essentially three ways to address this:

  1. Via a reverse query mechanism as you alluded to. This is indeed only supported by Axiomatics at the moment. The idea behind a reverse query is that instead of specifying a full-blown question e.g. "Can Alice view document #123?", you can specify an open-ended question e.g. "Which documents can Alice view?".
  2. Via the the Multiple Decision Profile of XACML 3.0 which allows you to ask multiple questions in one go e.g. "Can Alice view Doc #1, #2, #3?". The MDP is practical for hundreds of items at most. You could combine it with a pagination strategy. You can read more on MDP here.
  3. Via the use of obligations. You could write a policy that says that as a whole a doctor has the right to view medical records + obligation to execute a filter SQL statement. The issue with this approach is that it puts authorization semantics inside the obligation rather than inside the policy. Also, what if multiple obligations are triggered?
like image 168
David Brossard Avatar answered Sep 25 '22 06:09

David Brossard