Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can we add resource and its sub-resources? #248

Open
riyazatsdgt opened this issue Aug 18, 2017 · 2 comments
Open

how can we add resource and its sub-resources? #248

riyazatsdgt opened this issue Aug 18, 2017 · 2 comments

Comments

@riyazatsdgt
Copy link

I want to implement resource hierarchy. anyone can help?

@john-osullivan
Copy link

Based on my understanding of this library, resources is essentially a flat list. Maybe try recasting the problem such that you can build it into a role hierarchy? Suppose you have parentResources and childResources, and a user gets the parentResource-1/READ role which gives them permission to read that given parentResource. You could make that role the child of the childResource-1/READ role such that they'd also get read permission on the given childResource.

Combining a resource hierarchy with the role hierarchy seems like it would lead to confusing questions about what permissions you're actually granting when you give a role permissions on a resource.

@wparad
Copy link

wparad commented Jun 25, 2020

Surprised that this question is still open, the truth is it isn't very difficult and there are already a number of available solutions which do this, it just isn't supported in this library.

The lack of funcitonality here is exactly why solutions like PolicyServer and Authress exist which do handle wildcard middleware and dynamic resource hierarchies.

Usually these don't cause problems, but instead resolve the issues with authorization and policy access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants