rond-authz/rond

Adding print of resource will cause the policy not to generate the query

Closed this issue · 1 comments

Epado commented

Describe the bug

I wrote a policy where i add:

resource := data.resources[_]
print(resource)

Expected behavior

I expect the resource object to be printed, and in any case te policy to log something if it will somehow 'fail'

Replication info

  • Rönd version: 1.6.4
  • Running mode: sidecar
  • policy type: acl rows

Additional context

Here is the log of the rbac sidecar

[1678727860000] DEBUG: policy evaluation completed
    allowed: true
    evaluationTimeMicroseconds: 11368
    matchedPath: "/users/"
    method: "GET"
    partialEval: true
    policyName: "filter_by_clinic"
    reqId: "849eee886adb5e9a8aacc64e59d3303d"
    requestedPath: "/users/"
[1678727860001] TRACE: policy results and query
    allowed: true
    query: null
    reqId: "849eee886adb5e9a8aacc64e59d3303d"s

Hi @Epado sorry for the delay; I tried adding an integration test on this flow but it seems to me that it is working as expected 🤔

allow {
resource := data.resources[_]
print(resource)
}