Skip to content

Level validation Rust implementation (RFC 76)#1146

Merged
andrewmwells-amazon merged 17 commits intomainfrom
andrewmwells/level_validation
Oct 3, 2024
Merged

Level validation Rust implementation (RFC 76)#1146
andrewmwells-amazon merged 17 commits intomainfrom
andrewmwells/level_validation

Conversation

@andrewmwells-amazon
Copy link
Contributor

@andrewmwells-amazon andrewmwells-amazon commented Aug 16, 2024

Description of changes

Rust implementation of Level validation (RFC 76: cedar-policy/rfcs#76)

@aaronjeline is working on Lean changes.

Example error messages:
Screenshot 2024-08-16 at 3 23 47 PM

Issue #, if available

RFC 76 (cedar-policy/rfcs#76)

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A backwards-compatible change requiring a minor version bump to cedar-policy (e.g., addition of a new API).

I confirm that this PR (choose one, and delete the other options):

  • Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).

I confirm that cedar-spec (choose one, and delete the other options):

  • Requires updates, and I have made / will make these updates myself. (Please include in your description a timeline or link to the relevant PR in cedar-spec, and how you have tested that your updates are correct.)

Signed-off-by: Andrew Wells <anmwells@amazon.com>
@andrewmwells-amazon andrewmwells-amazon force-pushed the andrewmwells/level_validation branch from a3049c7 to 3daa6b3 Compare September 30, 2024 20:57
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Copy link
Contributor

@aaronjeline aaronjeline left a comment

Choose a reason for hiding this comment

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

This is slightly different the lean impl. In the lean impl Level 0 is the level that can't be de-referenced. I think they should align on that. Otherwise, looks good. Very different algorithm to the lean, but I think you said that was so you can get better error messages.

Signed-off-by: Andrew Wells <anmwells@amazon.com>
@andrewmwells-amazon
Copy link
Contributor Author

This is slightly different the lean impl. In the lean impl Level 0 is the level that can't be de-referenced. I think they should align on that.

That's my understanding too. Each node's level gives the number of allowable dereferences. 0 means no dereferences are allowed. A negative number means we've already done more dereferences than allowed. None means infinite dereferences allowed. Is there a place where I'm not following this?

Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
@andrewmwells-amazon andrewmwells-amazon merged commit 2de6db8 into main Oct 3, 2024
@andrewmwells-amazon andrewmwells-amazon deleted the andrewmwells/level_validation branch October 3, 2024 16:39
benelser pushed a commit to benelser/cedar that referenced this pull request Jan 16, 2026
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants