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

Add document explaining the use case of building your own DSL #698

Open
aaguiarz opened this issue Mar 22, 2024 · 0 comments
Open

Add document explaining the use case of building your own DSL #698

aaguiarz opened this issue Mar 22, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@aaguiarz
Copy link
Member

The fact that our model is a JSON enables interesting use cases where OpenFGA adopter can create their own DSLs / UIs to create models. We should document this better.

A few use cases:

  • Automatically adding permissions for setting relations (e.g. 'can_set_viewer_relation')

  • In a multi-tenant app, enable each B2B customer to redefine permissions with different rewrites, e.g. the model would have:

define can_view : reader or reader from parent

A specific customer could want to change that definition, to:

define can_view : reader or reader from parent or support_engineer from organization

Note that they should not add new permissions, or add new assignable permissions. Just change the rewrites.

Each customer would end up with a different authorization model ID that can be used to evaluate permissions. This would also show the benefits of having multiple authorization models for a specific store.

@rhamzeh rhamzeh added the documentation Improvements or additions to documentation label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants