Re: Access control that can be applied to vertices, edges and vertex properties
mikel...@...
Thank you very much for the replies. I haven't done it yet, but I intend to get in touch with the Tinkerpop developers and get some advice. My prototype was pretty crude and simple. Along the same lines as the GeoShape data type, I added another one which is an AccessControl. The interface contains a single method that returns true or false depending on whether a supplied Principal (an object representing a user's privileges and constructed under some scheme) is allowed to access it. I then added a predicate which can perform this check as part of a traversal. On the surface, it just checks whether an AccessControl property is accessible by a Principal, but with Gremlin, you can roll it into a 'where' step so that vertices, edges, or vertex properties will be returned if accessible by the Principal. The follow-on, which was what I was most interested in, was putting this check in a Strategy so that a query would contain the filter implicitly. I'm pretty amateur and so I haven't look into the overall performance considerations, or how this approach scales for larger numbers of vertices or more complex traversals. The main idea is that anyone that wants to use JanusGraph to support part of their application could easily supply a scheme for how privilege and access is constructed, which could be based on some other external source of truth. On Friday, 27 December 2019 03:23:46 UTC+13, Lakshay Rastogi wrote:
|
|