-
Notifications
You must be signed in to change notification settings - Fork 107
Allow annotation keys to be Cedar reserved words #634
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
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 seems reasonable, but introduces another flavor of inconsistency in how we handle reserved identifiers.
Eliminating reserved identifiers as much as possible in other locations could be a good path towards consistency here. Probably worth discussing further.
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.
Looks fine to me. I don't see a problem with allowing reserved words to be identifiers.
Edit: Agreed with @john-h-kastner-aws's comment above that it might be nice to use AnyId
in other places where we currently use Id
(not sure exactly where those places are, since I haven't looked at the code too recently). File an issue?
Opened #635 for the follow-up. Unless @john-h-kastner-aws thinks this is important to address now (before merging)? |
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.
I think we can merge this now
Description of changes
Allows annotation keys to be Cedar reserved words. Tests that this works both for human-format and JSON-format (EST) policies. Fixes #623.
Issue #, if available
#623
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):
cedar-policy
.I confirm that this PR (choose one, and delete the other options):
I confirm that
cedar-spec
(choose one, and delete the other options):(is that right?)
Disclaimer
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.