2

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!

2 Answers2

1

The enterprise edition of neo4j has built-in procedures for managing users and roles that you access using Cypher queries. So, you just need to know how to perform Cypher queries in Python. You should also be aware that in a neo4j cluster, user and role assignments are not propagated automatically.

There are a set of built in native roles with specific access privileges, but you can also create your own custom roles. You will probably want to create custom roles for your scenario.

Managing subgraph access control requires modifying the neo4j configuration file. That is not something you can do programmatically.

cybersam
  • 63,203
  • 6
  • 53
  • 76
  • I know about user and role management and yes, I probably want to create custom roles. The new custom roles have no rights but in the neo4j configuration fie I can assign procedures to them that they are allowed to call. I think that was what you were saying. Now, my question is how I write the procedures for the subgraph access control and if that is only possible in java or if it is also possible in python. Thank you for your help. – user7400000 Jan 30 '17 at 10:13
1

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.