Azure / data-api-builder

Data API builder provides modern REST and GraphQL endpoints to your Azure Databases and on-prem stores.

Home Page:https://aka.ms/dab/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Enhancement] : Allow role level query depth limits

sajeetharan opened this issue · comments

With this feature #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": "*"
            }
          ]
        }
      ]

Also, we don't want to skip this:

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