-
Couldn't load subscription status.
- Fork 109
Move ImpossiblePolicy from error to warning
#716
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
Conversation
5a45b0e to
0b22686
Compare
Signed-off-by: Kesha Hietala <[email protected]>
Signed-off-by: Kesha Hietala <[email protected]>
Signed-off-by: Craig Disselkoen <[email protected]>
Signed-off-by: John Kastner <[email protected]> Signed-off-by: Kesha Hietala <[email protected]>
Signed-off-by: John Kastner <[email protected]>
Signed-off-by: Saurav Sharma <[email protected]> Signed-off-by: Kesha Hietala <[email protected]>
#715) Signed-off-by: Saurav Sharma <[email protected]>
Signed-off-by: Kesha Hietala <[email protected]>
0b22686 to
b2e34e8
Compare
Signed-off-by: Kesha Hietala <[email protected]>
Signed-off-by: Kesha Hietala <[email protected]>
|
Note: the corpus test failure is expected since the tests were generated when we expected "impossible policy" to be an error (and thus the test says that the policy should not validate) |
cedar-policy-validator/src/typecheck/test_optional_attributes.rs
Outdated
Show resolved
Hide resolved
Signed-off-by: Kesha Hietala <[email protected]>
Signed-off-by: Kesha Hietala <[email protected]>
Signed-off-by: Kesha Hietala <[email protected]>
Signed-off-by: Kesha Hietala <[email protected]>
Signed-off-by: Kesha Hietala <[email protected]>
|
Fyi: this PR will be on hold temporarily since I'll be OOTO until next Wednesday. I'm holding off on merging for now because I don't want to leave the corpus tests in a broken state. |
|
I've pulled in the latest changes from |
Signed-off-by: Kesha Hietala <[email protected]>
Signed-off-by: Kesha Hietala <[email protected]>
Description of changes
TypeErrorKind::ImpossiblePolicyValidationWarningKind::ImpossiblePolicy⬅️ this requires a minor version bumpValidationWarningtovalidation_results.rsAs discussed in #539,
ImpossiblePolicyis different from our other errors because it does not signal a potential authorization-time error. Instead, it indicates a policy that will not apply for any valid request.As we increase the precision of the Cedar typechecker,
ImpossiblePolicyerrors will occur in more cases (a breaking change), while other types of errors will occur in fewer cases (a non-breaking change). So to make potential changes easier going forward, we've decided to demoteImpossiblePolicyto a warning. We consider this a non-breaking change because all policies that previously validated will continue to validate.Issue #, if available
#539
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):
cedar-policy(e.g., addition of a new API).I confirm that this PR (choose one, and delete the other options):
I confirm that
cedar-spec(choose one, and delete the other options):cedar-spec, and how you have tested that your updates are correct.)Disclaimer
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.