Add document explaining the use case of building your own DSL
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 51
- Forks
- 105
- Avg merge
- 10h 35m
- Merged PRs (30d)
- 17
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing OpenFGA documentation for authorization models and model IDs. Document the DSL/UI use cases described here, including changing rewrites per tenant while not adding permissions or assignable permissions, and explain how separate authorization model IDs support evaluation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100