Spring Security / Java EE solutions for hierarchy tree roles -


I know spring security is good for standard roles and permission based authorization. I'm not sure this is the scenario:

The system has managed 10,000 employees, employees have organized into an organization chart (a tree which reports in all departments). Some of these employees are users. These users are allowed to enter their responsibility of employees (branches in their tree / descendants of their staff) only.

So I wonder how modern Java EE (or other) systems manage these checks? Can Spring Security (ACL) do this and how can it be prepared?

Our old implementation (many years ago) occurs when a user reaches an employee. We can check whether the requested staff will have a tree again. But this is not the ideal solution and we want to use a new solution.

As I have done working on this subject for a month now, Can answer, though there may be a better answer.
There is something in the role of hierarchy in the spring security and if you use ROLE_A & gt; ROLE_B then the ROLE_A will have all the authorizations which are ROLE_B.
So here are two options:

1 There is a couple of roles for every user and his descendants. For user ROLE_USERi and its descendants ROLE_USERiDESC you have ROLE_USERi & gt; ROLE_USERiDESC
But (as you do not know your organ chart) it can be insufficient because many of these can be added! If your tree has two or three levels (ROLE_USER is one of the two or more offspring) it is anyway suitable, because this role is high, more officers will have it.

2. In my project (which is so similar to the accident) I made another alternative. I have some basic roles for some basic tasks and I have a "care group" in which a carer can see his descendants Could.
Why should I do this? Because I have roles for some actions (such as edit, delete, some sensitive data and ...) and to observe the carers' groups.
If AB is a carer, then he can see B's data, but A can not do anything with its officials.

BTW, it has not been thoroughly tested yet and you can come to another potential solution.

Also view:



Comments