-
Notifications
You must be signed in to change notification settings - Fork 377
Description
Is your feature request related to a problem? Please describe.
ABAC rules can not be added simply with relation tuples as the attributes have to be checked.
Describe the solution you'd like
In general, the database will not be the only source of relation tuples.
For subject set rewrites we will have to dynamically generate relation tuples that are used for evaluation of requests.
ABAC rules can be added dynamically the same way depending on the actual attributes of the request context.
An example ABAC rule: allow write access to repository form sub net 192.168.2.0/24
This would translate to the following relation tuples (omitting namespaces):
repository#write@<192.168.2.0/24#accessing-from> <- fixed tuple always present
192.168.2.0/24#accessing-from@user <- dynamic tuple added based on attributes of the requests
These dynamic tuples only have to be computed initially on request. It would be best to have the client define them so that Keto does not have to support parsing 1000 different data formats and queries on them.
In essence, the client would translate any attributes it likes into relation tuples that then are used by keto for evaluation.
In general, the client can add relation tuples dynamically only for single requests.
The check/expand API would have to get an additional parameter for dynamic relation tuples.
Describe alternatives you've considered
Keto should not support a complex language with an even more complex engine like OPA. Any other idea for implementing ABAC should be collected in this issue.