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

chore: further constraint RPC max message size #1222

Merged
merged 6 commits into from
Dec 11, 2023

Conversation

jon-whit
Copy link
Member

@jon-whit jon-whit commented Dec 8, 2023

Description

This sets stricter RPC message size limits on the OpenFGA gRPC server. Existing API definitions have strict limits on resource inputs and so the default 4MB gRPC message size limit is overly generous. Additionally, request context added for ABAC support is ultimately constrained by the RPC message size limit, and so setting a stricter limit on it is important to constrain the arbitrary request context that can be provided.

I've also bumped up to the most recent protobuf API changes that were made in openfga/api#125

References

#1192

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@jon-whit jon-whit requested a review from a team as a code owner December 8, 2023 22:31
@jon-whit
Copy link
Member Author

jon-whit commented Dec 8, 2023

  • todo: add a server level test for this

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c01b461) 82.26% compared to head (e0ff047) 82.29%.

❗ Current head e0ff047 differs from pull request most recent head a54ff4a. Consider uploading reports for the commit a54ff4a to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1222      +/-   ##
==========================================
+ Coverage   82.26%   82.29%   +0.04%     
==========================================
  Files          83       83              
  Lines        9555     9557       +2     
==========================================
+ Hits         7859     7864       +5     
+ Misses       1342     1340       -2     
+ Partials      354      353       -1     

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

@miparnisari miparnisari changed the title chore: further constrain RPC max message size chore: further constraint RPC max message size Dec 8, 2023
cmd/run/run_test.go Outdated Show resolved Hide resolved
@jon-whit jon-whit merged commit 96b9c61 into main Dec 11, 2023
11 of 12 checks passed
@jon-whit jon-whit deleted the constrain-rpc-max-msg-size branch December 11, 2023 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants