I have written a sample rego code
default allow = false
allow {
some username
input.method = "GET"
input.path =["example", username]
input.user = username
}
allow {
some username
input.method = "GET"
input.path = ["example", username]
input.user != username
}
When I try to validate the policy using http://localhost:8181/v1/data/http/authz/allow API with Parameters
{
"input": {
"method": "GET",
"path": ["example", "sara"],
"user": "sara"
}
}
and
{
"input": {
"method": "GET",
"path": ["example", "sara"],
"user": "notsara"
}
}
I get the response : {"decision_id":"xxxxx","result":true}
Is this the expected result? Shouldn't there be an error if conflicting policies exist?