We have a requirement in which we need to be able to accept any user defined cypher query, execute the user supplied query in an embedded Neo4j server but have every traversal be evaluated based on certain business logic in our server to determine if the user has access rights to current node for any given traversal.
After investigating the cypher query documentation, I haven't been able to find a way to add a traversal evaluator without using the traversal API. The issue with the traversal API is its used through Java API which we cannot expect users to write java to query data as it would be too complex to have users write an imperative query language.
For those that are familiar with Apache Tinkerpop, what we are trying to achieve is similar to executing a user defined gremlin script using GremlinExecutor.eval() function but at the same time adding a traversal strategy to do an access control check on every traversal step by adding a traversal strategy analogous to Neo4j traversal API evaluator using the GraphTraversalSource.withStrategies() function.
We are currently evaluating Neo4j to see whether it can serve as the underlying schema-less database for our products. This will be a deal breaker if there isn't a good way for us to do this.
Has anyone encountered this situation before? If so, how did you solve this issue? Or is there any other approach for us to solve our requirement?
Thanks so much,