Search code examples
pythonneo4jauthorizationgraph-databasespy2neo

Authorization (subgraph access control) in Neo4j with python driver


I have some employee data in which there are 3 different roles. Let's say CEO, Manager and Developer.

CEO can access the whole graph, managers can only access data of some people (their team) and developers can not access employee data.

How should I assign subgraph access to user roles and implement this using Python? There are good solutions and comprehensive libraries and documentations but only in Java!


Solution

  • At the moment it is not possible to write procedures for custom roles to implement subgraph access control using Python. It is only possible in Java.

    A workaround might be to indirektly implement it using phyton by adding properties to nodes and relationship storing the security levels for these nodes and relationships. Checking the secutiry level of a user it might be possible to use a phyton visualization that checks the properties to only display nodes and relationships that are in agreement with the user security level.