I’d like to create some custom authorization system which is introduced below. Is there something (like nuget/framework/standalone service) for ASP.NET that fulfill those requirements? Or maybe someone have some tips for implementation?
Description of the authorization sytem:
Assume that we have resources which must be protected. Those resource are, for example: Resource_1, Resource_2, Resource_3, Resource_4.
We have also users like presented on a diagram below.
I’d like to build (or use solution already available) authorization system in which:
- There are groups of users
- There is superuser which can give admin permissions to other users
- I can have few types of users. For example those types of users can be: Admin, Member, New.
- New users don’t have any permissions
- Admin can receive subset or all of permissions from Admin from higher level in hierarchy and then he can give subset or all of his permissions to other users in his group
- Admins can give Admin permissions to users from lower levels in hierarchy
- Admin can manage groups from lower level (with their descendants) and in which they exist (they can’t manage neighbouring groups and groups from higher level).
- Admin decides about permissions in his (and descendants) group. Admin_1 can say, for example, that:
— Member_3_1 has Read permission to Resource_1, Resource_2, Resource_3, Edit permission to Resource_2 and Read, Edit and Delete permissions for Resource_4
— Member_2 has Write and Read permissions to Resource_1
Simple diagram may look like below:
--------------
| Group_5 |
|------------|
| Admin_5 |
| Member_5_1 |
--------------
/
/
--------------
| Group_4 |
|------------|
| Admin_4 |
| Member_4_1 |
| Member_4_2 |
--------------
/
/
---------------
| Group_2 |
|-------------|
| Admin_2 |
| Member_2 |
| New_2 |
---------------
/
/
| Group_1 |
|———|
| Admin_1 |
-----------------
| Group_3 |
|---------------|
| Member_3_1 |
| Member_3_2 |
| New_3_1 |
| New_3_2 |
-----------------
Looking at above diagram we can see that, for example:
- Admin_1 is super user,
- Admin_2 gave subset or all of his permissions to Admin_4
- Admin_4 could give subset of all of his permissions to Member_4_1 and Member_4_2
I’ve done basic research to check if such system already exists. I haven’t found anything suitable. The question is if it must be built from scratch or maybe someone here knows something similar.