-
Notifications
You must be signed in to change notification settings - Fork 32
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
In and not-in operators for JSON pattern-matching #357
Comments
Hey @guicassolato, I'd like to work on this 😄 |
Hey @guicassolato, I thought about this and here's what I came up with.
WDYT? |
We can add
For the implementation (ignoring (2) above, thus thinking only case operatorIn:
for _, expectedValue := range rule.StaticList {
if expectedValue == obtainedValue.String() {
return true, nil
}
}
return false, nil
} |
@alexsnaps, I guess we can close this in favour of #475. WDYT? |
👍 |
It would be nice to have
in
andnot-in
operators amongst the ones supported by Authorino's JSON pattern-matching, so values fetched from the Authorization JSON can be checked if included/not included in a particular static list, without requiring an OPA policy for that.This is more or less the opposite of the
incl
andexcl
operations, which check if a list fetched from the Authorization JSON includes/does not include a particular static value.The text was updated successfully, but these errors were encountered: