data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

[Enhancement] : Allow role level query depth limits

Open sajeetharan opened this issue 1 year ago • 1 comments

With this feature https://github.com/Azure/data-api-builder/issues/1577 coming in place, we should also have a way to define this at role level.

"runtime": {

    "rest": {
      "enabled": false,
      "path": "/api",
      "request-body-strict": true
    },
    "graphql": {
      "enabled": true,
      "path": "/graphql",
      "allow-introspection": true
      "depth-limit": 1
    },

and the above configuration should also be applicable to specific role.

  "permissions": [
        {
          "role": "anonymous",
          "depth-limit": 2
          "actions": [
            {
              "action": "*"
            }
          ]
        }
      ]

sajeetharan avatar Jun 10 '24 15:06 sajeetharan

Also, we don't want to skip this:

dab update Books --permissions-depth-limit anonymous:2

JerryNixon avatar Jun 10 '24 16:06 JerryNixon