[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
Bug Category
Cedar Parser
Describe the bug
Parsing the policy permit(principal, action, resource) when { principal is "User" }; gives the error
[jkastner@dev-dsk-jkastner-1a-3309db3b cedar]$ cargo run -q check-parse <<<'permit(principal, action, resource)
when { principal is "User" };'
× failed to parse policy set
╰─▶ right hand side of an `is` expression must be an entity type name, but got `User`
╭────
1 │ permit(principal, action, resource) when { principal is "User" };
· ──────
╰────
help: try using `==` to test for equality
This error should be more useful:
In the message text User should be rendered as a string "User"
The try using `==` to test equality help text is not so useful because in this case it's just a likely that they meant to drop the quotes for principal is User.
Before opening, please confirm:
Bug Category
Cedar Parser
Describe the bug
Parsing the policy
permit(principal, action, resource) when { principal is "User" };
gives the errorThis error should be more useful:
User
should be rendered as a string"User"
try using `==` to test equality
help text is not so useful because in this case it's just a likely that they meant to drop the quotes forprincipal is User
.Expected behavior
.
Reproduction steps
.
Code Snippet
Log output
Additional configuration
No response
Operating System
No response
Additional information and screenshots
No response