apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

Cannot use consumer_group_id type in customer-restriction plugin in Dashboard

Open Sebastian-Pietrzak opened this issue 1 year ago • 1 comments

Issue description

It's not possible to setup consumer-restriction plugin with consumer_group_id type in Dashbaord.

In API documentation it's in allowed values of type param and it works as expected in Admin API, although when creating such config through Dashboard, it rejects it with following error:

Invalid plugin data
/type should be equal to one of the allowed values: consumer_name, route_id, service_id

Expected behavior

It is possible to use customer-restriction plugin with consumer_group_id type as in Admin API

How to Reproduce

  1. Start creating route in Dashboard
  2. In plugins section enable consumer-restriction plugin and define following config:
{
  "type": "consumer_group_id",
  "whitelist": ["test"]
} 
  1. Submit

Screenshots

image

Environment

  • apisix version (cmd: apisix version): 3.6.0
  • OS (cmd: uname -a): Darwin Kernel Version 23.0.0
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run etcd --version): bitnami/etcd:3.5.9
  • apisix-dashboard version, if have: apache/apisix-dashboard:3.0.1-alpine
  • Browser version, if have: Chrome Version 119.0.6045.123 (Official Build) (arm64)

Additional context

No response

Sebastian-Pietrzak avatar Nov 14 '23 14:11 Sebastian-Pietrzak