-
Notifications
You must be signed in to change notification settings - Fork 80
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
Make parse_policy_or_template_to_est
error for CST that aren't valid AST
#952
Conversation
The EST conversion does not apply the checks that we apply CST to EST conversion, and we don't want to duplicate all of them. For example, this function succeeded for expression using extension function with an incorrect call style like `"1".ip()` (cedar-policy/cedar-spec#341). Effects `policy_text_to_json` in the WASM bindings. Signed-off-by: John Kastner <[email protected]>
Signed-off-by: John Kastner <[email protected]>
|
||
### Changed | ||
|
||
- Update `policyTextToJson` so that it reliably errors for all policies that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these quoted names functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're the JS binding function names from annotations like #[wasm_bindgen(js_name = "checkParseTemplate")]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Craig Disselkoen <[email protected]>
The EST conversion does not apply the checks that we apply CST to EST conversion, and we don't want to duplicate all of them. For example, this function succeeded for expression using extension function with an incorrect call style like
"1".ip()
(cedar-policy/cedar-spec#341).Effects
policy_text_to_json
in the WASM bindings.Description of changes
Issue #, if available
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):
I confirm that this PR (choose one, and delete the other options):
I confirm that
cedar-spec
(choose one, and delete the other options):