glob.match function does not default delimiter like the docs describe #2039
Closed
Description
Expected Behavior
Queries for a particular document should return the same result both with and without the partial
parameter as detailed here.
Using the policy and request given below we would expect the following response:
{
"result": true
}
Actual Behavior
We receive expected response when querying the document without the partial
parameter. However when we add it we instead get the following response:
{
"result": false
}
Steps to Reproduce the Problem
- Start OPA with the policy file given in the gist below using the following command:
opa run -s authz.rego
- Verify that we get the expected response without the
partial
parameter:
curl "http://localhost:8181/v1/data/authz/allow" -d '{"input": {"user": {"name": "bob", "groups": ["admins"]}, "resource": {"name": "foo"}, "operation": "foo.read"}}'
- Send the same request but this time with the
partial
parameter
curl "http://localhost:8181/v1/data/authz/allow?partial" -d '{"input": {"user": {"name": "bob", "groups": ["admins"]}, "resource": {"name": "foo"}, "operation": "foo.read"}}'
Additional Info
Use the following request body when calling the data API:
{
"input": {
"user": {
"name": "bob",
"groups": ["admins"]
},
"resource": {
"name": "foo"
},
"operation": "foo.read"
}
}
You can find example code of the issue in this gist.
Metadata
Assignees
Type
Projects
Status
Done