rond-authz/rond

`undefined` field in request body cannot be deserialized

Closed this issue · 1 comments

Describe the bug

When an endpoint covered by rond gets called with a JSON object having a field set to undefined, an error is returned as following:

{"error":"RBAC input creation failed","message":"Internal server error, please try again later","statusCode":500}

And logs the following:

{"foundBindingsLength":3,"foundRolesLength":2,"level":10,"msg":"found bindings and roles"}
{"error":{"message":"failed request body deserialization: invalid character 'u' looking for beginning of value"},"level":50,"msg":"failed rego query input creation"}

Replication info

  • Rönd version: main
  • Running mode: sidecar

Hi @mattia-fumo an undefined value makes the JSON invalid so the error is correct