[Feature] Support wildcards in model paths for '.fga' files
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 102
- Forks
- 49
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 16
Description
Problem statement
Currently, when working with multiple authorization model files (.fga), each file path must be explicitly defined. For projects with a large number of .fga files, this becomes cumbersome and difficult to manage. It requires more maintenance and is error-prone. Users must manage a large quantity of .fga files and would benefit from a more streamlined way to include them.
Proposed solution
Add support for wildcards or regular expressions in the file paths for authorization models. This would allow users to include multiple .fga files using a single pattern.
For example, with an fga.mod manifest file:
schema: '1.2'
contents:
- core.fga
- parent_directory/subdirectory_1/foo.fga
- parent_directory/subdirectory_1/bar.fga
- parent_directory/subdirectory_1/baz.fga
- parent_directory/subdirectory_2/foo.fga
- parent_directory/subdirectory_2/bar.fga
For example, instead of listing each file individually, a user could specify a path like parent_directory/subdirectory_1/*.fga to include all .fga files within that directory.
Alternatives and current workarounds
The only alternative is the current method of manually listing each file, which is not ideal for larger projects.
Addional context
This feature should be implemented in the OpenFGA CLI. Additionally, this functionality should be considered for the VS Code and JetBrains extensions, as they also parse .fga files and would benefit from this enhancement for a consistent user experience across tools.
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 with the OpenFGA CLI's parsing of the fga.mod manifest and its contents paths, focusing on how .fga model files are currently included. Define the wildcard or regular-expression behavior and verify that a pattern such as parent_directory/subdirectory_1/*.fga includes the intended files; consider the noted VS Code and JetBrains extension implications separately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authorization, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100