-
Notifications
You must be signed in to change notification settings - Fork 11
Add is
operator
#5
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
(Aside: the issue of "input validation" brought up in [Use case 1](#use-case-1-input-validation) could also be addressed by performing validation against the schema for every input query, but that deserves its own RFC.) | ||
|
||
2. Another way to simulate `is` is to add an `entity_type` attribute to entities, and check the type of an entity using `resource.entity_type == "File"` (for example). | ||
However, this requires users to manually add an entity's type as an attribute, and leads to the possibility that an entity might be created with an attribute that doesn't actually match its type. |
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.
This alternative also does not allow for any short circuiting in the typechecker. Although, that short circuiting is what allow users to go against our best practices for actions, so it could be viewed as a feature of the alternative.
I move that we accept this RFC but with usage of |
Thanks for the feedback everyone! I am working on revising the initial draft -- hopefully I'll have it posted tomorrow. Here's a sneak peak of what I plan on changing:
|
One example I was working on is ability to define a policy to a specific entity like:
I agree that this can be implemented in the condition clause instead to prevent change of other operations like listing policies. It would have the representation:
While some mitigations would also solve the question at stake,
|
Revision (finally) posted! Based on in-person discussion, I decided to leave the proposal to include |
The md file for this RFC has a Typo. The text spells out
While the example above is:
Therefore the action should be |
Fixed the typo. Thanks @jeffsec-aws |
The final comment period (FCP) for this RFC is starting now, with intent to accept. The FCP will end 2023-07-28 at noon PT / 3pm ET / 7pm UTC. Please add comments, and especially any objections, if you have any. For more on the RFC process, see https://github.com/cedar-policy/rfcs. |
This RFC was migrated from cedar-policy/cedar#94
Rendered
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.