Filtering by `<Selector> in ["<Value 1>", "<Value 2>", ...]`
I know it's possible to filter by "<Value>" in <Selector>, but is there a way to do the opposite?
Currently I'm doing the following, which is a bit tedious:
"/userinfo/email" == "[email protected]" or "/userinfo/email" == "[email protected]" or "/userinfo/email" == "[email protected]"
It would be a lot easier to be able to do something like:
"/userinfo/email" in ["[email protected]", "[email protected]", "[email protected]"]
Ref. https://www.boundaryproject.io/docs/concepts/filtering
You can use matches with a regex. Something like this should work:
"/userinfo/email" matches "(foo|bar|baz)@example.com"
Hi @zx8 , just following up on this issue and was wondering if @jefferai's suggestion worked for you?
@xingluw While it works, I feel it's a little error prone, given you have to be careful with escaping (e.g. \. vs .) or risk over-granting access. For now, I am sticking to the [...] or [...] or [...] syntax because it is safer.
I still think this is a valid request, but I'll leave it up to you to determine whether it's important enough to action. If not, feel free to close and I'll continue using or.
I think it's interesting...the grammar doesn't support that now, but could
Note: https://github.com/hashicorp/go-bexpr/pull/28
Will leave this open to see if there is more demand for implementing this new potential change
Closing as this is 2 years old without any movement.