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 draft OpenFGA client #10504

Draft
wants to merge 2 commits into
base: lva/roles-openfga-edition
Choose a base branch
from

Conversation

leovalais
Copy link
Contributor

@leovalais leovalais commented Jan 23, 2025

Important

Not to be merged into dev directly

Draft OpenFGA client.

  • Will be moved into editoast's workspace when ready (it's currently outside for dev comfort)
  • Only a few operations have been implemented
  • Meant to remain a new sub-crate which will be included in editoast_authz (in which we'll map the authorization model, define our objects, their conversion, relations, etc.)
  • The fga binary is necessary to run unit tests for now: https://github.com/openfga/cli

TODO:

  • Implement all the operations we'll need
  • Keep an authorization_model_id in the client to forward it to requests—as advised by OpenFGA
  • Improve tests utils
  • Documentation (for real this time 👀)

Signed-off-by: Leo Valais <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 201 lines in your changes missing coverage. Please review.

Project coverage is 81.41%. Comparing base (fd288d3) to head (45880f6).

Files with missing lines Patch % Lines
fga/src/client.rs 0.00% 201 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                      Coverage Diff                      @@
##           lva/roles-openfga-edition   #10504      +/-   ##
=============================================================
- Coverage                      81.80%   81.41%   -0.39%     
=============================================================
  Files                           1073     1074       +1     
  Lines                         106716   107105     +389     
  Branches                         730      730              
=============================================================
- Hits                           87300    87202      -98     
- Misses                         19377    19864     +487     
  Partials                          39       39              
Flag Coverage Δ
editoast 74.26% <ø> (-0.03%) ⬇️
front 89.34% <ø> (ø)
gateway 2.18% <ø> (ø)
osrdyne 2.98% <0.00%> (-0.31%) ⬇️
railjson_generator 87.50% <ø> (ø)
tests 87.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants