cedar-policy / cedar-docs

Documentation for Cedar policy language
https://docs.cedarpolicy.com
Apache License 2.0
22 stars 19 forks source link

[Cedar Doc Issue] Examples for more advanced use wanted #69

Open per-oestergaard opened 9 months ago

per-oestergaard commented 9 months ago

What were you trying to do?

Cedar is great; however, I struggle to see how it is used in more advanced setups. Let take a group chat as an example. A user can see all messages in the groups they belong to and post new ones to the same groups. In this case, users are many and groups are many, say at least a million of each. How would I solve that in a way that scales? I cannot load all messages from the backed (like this example) and check them with is_authorized() before returning them to the use. So do I dynamically create/delete policy rules pr. group when a chat group room is created or deleted e.g. keep policy rules in sync with my database? Or?

What is wrong and why? Current examples and documentation only covers basic, more static, examples.

What do we need to do to fix this?

I would like to have an example of this or a similar setup, solving the same challenges.

AMZ-brandon commented 8 months ago

I'll look into this, thanks!