Open stonelgh opened 1 year ago
When we introduce the Role concept as a set of permissions, and instead bind roles and users together in policies, we can easily achieve that and new role objects can be freely created without the change of namespace definitions with the help of string parameters. Otherwise, we probably have to specify every effective role in the policies and make lengthy checks in each permit definition, and end up with more and more complex namespace definitions. Discussion https://github.com/ory/keto/discussions/1122 contains a complete sample.
So the use-case is defining new roles/policies/... without the need to update the namespace definitions. The role would then be created by defining tuples similar to
Role:admin#has_perm@Perm:create
and then adding users to that role:
Role:admin#member@User:foo
correct?
OK, I see that you gave that example in the discussion :+1:
Yes, the discussion demonstrates a basic role/permission/policy model use-case.
@zepatrik We have a similar use case, is there a way to represent Policy/Role/User or Parametrized RBAC using the OPL ?
Hello contributors!
I am marking this issue as stale as it has not received any engagement from the community or maintainers for a year. That does not imply that the issue has no merit! If you feel strongly about this issue
Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.
Unfortunately, burnout has become a topic of concern amongst open-source projects.
It can lead to severe personal and health issues as well as opening catastrophic attack vectors.
The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.
If this issue was marked as stale erroneously you can exempt it by adding the backlog
label, assigning someone, or setting a milestone for it.
Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!
Thank you 🙏✌️
Preflight checklist
Describe your problem
I want to implement a flexible permissions-and-users bindings. It can easily grant users a batch of permissions by specifying a set of permissions and a set of users in a policy. And then we can attach a set of policies to a resource.
Currently, a possible implementation could be like this:
We end up with one Policy class per Resource type and each Policy has a set of similar relations.
Describe your ideal solution
With the supposed solution, there is only one Policy and clear permission literals.
Workarounds or alternatives
-
Version
v0.10.0-alpha.0
Additional Context
No response