Skip to content
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

feat: extend boolean expressions to allow key-value and identifiers #8658

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

adrianbenavides
Copy link
Member

@adrianbenavides adrianbenavides commented Nov 20, 2024

The policies boolean expression now support key-value and identifiers:

  • a=b is transformed into (= subject.a "b")
  • a="the value" is transformed into (= subject.a "the value")
  • I228786ae is transformed into (= subject.identifier \"I228786ae\")

@adrianbenavides adrianbenavides requested a review from a team as a code owner November 20, 2024 15:54
@adrianbenavides adrianbenavides force-pushed the adrian/extend-policy-boolean-expressions branch from 43759ea to 9eb76a7 Compare November 20, 2024 15:57
etorreborre
etorreborre previously approved these changes Nov 20, 2024
Copy link
Member

@etorreborre etorreborre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm slightly uncomfortable with the ambiguity between Name and Identifier.
This PR means that I won't be able to use an identifier as an attribute name. I don't really see why a user would want to do that but people sometimes come with clever schemes.
I guess that this is ok, as long as we can revert to a more explicit policy description with (= subject.attribute_name attribute_value)

@adrianbenavides adrianbenavides force-pushed the adrian/extend-policy-boolean-expressions branch 3 times, most recently from dc91c36 to 6a89887 Compare November 21, 2024 07:54
@adrianbenavides adrianbenavides force-pushed the adrian/extend-policy-boolean-expressions branch from 6a89887 to 6e4595d Compare November 21, 2024 07:59
@etorreborre etorreborre self-requested a review November 21, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants