by cryptos · 2y ago · 0 comments
I understand why restricting the possibilities with an external DSL might be a good idea, but I consider Rego to be to restricted. I mean, in the the a policy is just a function saying basically "yes" or "no" (I know, it's not that simple with OPA, but it boils down to access yes/no, anyway).
package play
import rego.v1
default allow := false
allow if {
user := input.id
user in data.groups.A
user in data.groups.B
not user in data.groups.C
}
[0] https://play.openpolicyagent.org/p/adMo9TE9bS