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

Use Protobuf for DRT #488

Merged
merged 6 commits into from
Dec 10, 2024
Merged

Use Protobuf for DRT #488

merged 6 commits into from
Dec 10, 2024

Conversation

cdisselkoen
Copy link
Contributor

@cdisselkoen cdisselkoen commented Dec 9, 2024

  • Changes DRT to use Protobuf, rather than the undocumented JSON format, for communicating isAuthorized and validate requests from Rust to Lean.
  • Adds a new DRT target testing that various structures properly roundtrip from AST to Protobuf and back.
  • Updates the Lean Cli executable to expect Protobuf-encoded inputs for isAuthorized and validate (still expects JSON for other targets, like validateEntities and validateRequest).
  • Removes tests for the Lean Cli executable, which used hardcoded JSON inputs. Tests for protobuf functionality, with protobuf inputs, were added in Cedar protobuf structures #485 (although they don't test the Cli specifically).

Signed-off-by: Craig Disselkoen <[email protected]>
Signed-off-by: Craig Disselkoen <[email protected]>
Signed-off-by: Craig Disselkoen <[email protected]>
Signed-off-by: Craig Disselkoen <[email protected]>
Copy link
Contributor

@john-h-kastner-aws john-h-kastner-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though I can't vouch for the correctness of the FFI code

cedar-drt/set_env_vars.sh Show resolved Hide resolved
@cdisselkoen cdisselkoen linked an issue Dec 9, 2024 that may be closed by this pull request
3 tasks
Signed-off-by: Craig Disselkoen <[email protected]>
@cdisselkoen
Copy link
Contributor Author

Integration-tests CI failure is due (at least in part) to needing cedar-policy/cedar#1365

@cdisselkoen cdisselkoen merged commit 7f0c82b into main Dec 10, 2024
6 checks passed
@cdisselkoen cdisselkoen deleted the cdisselkoen/protobuf-drt branch December 10, 2024 14:22
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.

Support builds On Mac
3 participants