examples icon indicating copy to clipboard operation
examples copied to clipboard

Ory/Keto nested users/groups example

Open peturgeorgievv opened this issue 3 years ago • 4 comments

Preflight checklist

Describe your problem

I can't find any full working example with REST api's for Ory/Keto. I see with CLI how you do groups and stuff, but with REST it's very basic or just API's.

Describe your ideal solution

I would love to see REST API's for Ory/Keto in action. Meaning, open the docs and see an example of how to make Sample APP with Ory/Keto REST which would have some nested users/groups structure as this is very often used.

users (not sure do i even need this?)

  • user1, user2

roles

  • admin (user1,user2,user3) is able to controll all below
  • manager (user4,user5) is controlled by admin & controlls sub-managers
  • sub-manager (user6,user7)

directories

  • directory1 (has it's own admin, manager, submanagers)
  • directory2 (same as above)

It would be perfect if it is in React/Nextjs as i'd say it's the most used.

Workarounds or alternatives

I tried to read all the docs and examples for gRPC and others, but it's hard to understand how to make an REST Api call for let's say modify a whole group of users/directories etc

Version

Latest

Additional Context

No response

peturgeorgievv avatar May 10 '22 11:05 peturgeorgievv

Thank you for these ideas! Ory Keto is almost available on production as API-only. We are working towards a UI, and will also be adding REST documentation and guides around it.

/cc @tomekpapiernik @zepatrik @hperl

aeneasr avatar May 10 '22 11:05 aeneasr

Hello @peturgeorgievv . We have the following guides under review

  1. RBAC guide for Keto
  2. Keto SDK examples

They might help you understand how it works. However, I agree that a real-life example is missing right now.

gen1us2k avatar May 10 '22 12:05 gen1us2k

@gen1us2k Hello, i read those two which you pointed, but as mentioned it is only for gRPC or sdk use. In real life scenarios I think that mostly it would be used with REST (even though gRPC is popular with microservices). Even in the Keto SDK Examples there is a comment in the PR about configuration for REST, as it is not very clear... :)

peturgeorgievv avatar May 10 '22 13:05 peturgeorgievv

We have some examples for the SDK now, but as you pointed out not one with a fully fledged app with nested users/groups structure. I transferred the issue to ory/examples, I think it would be best to first add something here.

Also check out @gen1us2k ory full stack example. It is WIP atm but we will soon add it to this repository. It might also be helpful for your use case.

vinckr avatar Jun 20 '22 21:06 vinckr

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

  • open a PR referencing and resolving the issue;
  • leave a comment on it and discuss ideas on how you could contribute towards resolving it;
  • leave a comment and describe in detail why this issue is critical for your use case;
  • open a new issue with updated details and a plan for resolving the 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 🙏✌️

github-actions[bot] avatar Jun 26 '24 00:06 github-actions[bot]