Access control in DGraph

I wanted to get a discussion going on the options for exposing access control. My opinion is that controlling access to graphs (labels) is considerably more useful and flexible than any of the other options. I note that it contains support for controlling access by subject or predicate as one may set the label equal to the subject/predicate in their data set. Personally, I don’t have any use for these schemes but they make sense for some people. Generally I feel that the access control should not be tied to the “content” of the data (i.e. S/P/O).

Think of the use case of a social network with permissions set by the user. By default, each user’s profile would be stored as its own graph (i.e. all triples associated with a particular user’s profile have the same label) and the user can control who has access to their profile. This works well on its own but it’s also easy to support more fine-grained permissions by partitioning the data into sub-graphs with different labels so that, for e.g., a user can have different access settings for their contact info than their list of friends and so on. You can even support controlling access to a single statement (edge) by putting in in its own sub-graph with a unique label.

This idea of sub-graphs does rely on a mechanism for indicating that certain labels are sub-labels of other labels and querying a particular label should automatically include any sub labels. I understand this may be out of scope for the out-of-the-box ACL implementation. However, it would be relatively straightforward to implement support for this model at the application level if we had the ability to apply performant filtering of queries by a list of labels.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.