apache / apisix-dashboard

Dashboard for Apache APISIX
https://apisix.apache.org/
Apache License 2.0
1.01k stars 527 forks source link

Cannot use consumer_group_id type in customer-restriction plugin in Dashboard #2883

Open Sebastian-Pietrzak opened 1 year ago

Sebastian-Pietrzak commented 1 year ago

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"]
    } 
  3. Submit

Screenshots

image

Environment

Additional context

No response

junjzhang commented 9 months ago

It seems that "consumer_group_id" should be added into this enum at this file

image