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

bug: when setting the plugin in codemirror, an error is prompted.

Open idbeta opened this issue 5 years ago • 13 comments

Bug report

Describe the bug

when create route or setting plugin in Plugin List, after setting the plugin in codemirror, submit it, an error is prompted. image

idbeta avatar Dec 31 '20 08:12 idbeta

@liuxiran @nic-chen Hello, please take a look at this issue. This issue happened due to a different schema for Route and Consumer.

juzhiyuan avatar Jan 04 '21 01:01 juzhiyuan

the authentication plugins should be only shown with a switch to enabled/disabled in route or service module.

According to https://github.com/apache/apisix-dashboard/issues/529 .

I think we should not config the auth plugins in route, service or global rule.

nic-chen avatar Jan 04 '21 01:01 nic-chen

the authentication plugins should be only shown with a switch to enabled/disabled in route or service module.

According to #529 .

I think we should not config the auth plugins in route, service or global rule.

but the Plugin List page is not global rule, can’t enable auth plugins in it, will make others strange.

idbeta avatar Jan 04 '21 02:01 idbeta

the authentication plugins should be only shown with a switch to enabled/disabled in route or service module.

According to #529 .

I think we should not config the auth plugins in route, service or global rule.

then how to bind Consumer with Route?

juzhiyuan avatar Jan 04 '21 03:01 juzhiyuan

image

Got it, then for Route, Service and Global Rule, we only need to enable/disable Auth plugins without any configurations, right?

juzhiyuan avatar Jan 04 '21 03:01 juzhiyuan

we only need to add some tips in the frontend, tells users just enable or disable.

juzhiyuan avatar Jan 04 '21 03:01 juzhiyuan

the authentication plugins should be only shown with a switch to enabled/disabled in route or service module.

According to #529 .

I think we should not config the auth plugins in route, service or global rule.

Yep, only enable/disable auth plugins in Route Service module is engough ^_^ but for the global rule, I'm not sure if we only enable a auth plugin, what will happen in Consumer module? @nic-chen

liuxiran avatar Jan 04 '21 03:01 liuxiran

the authentication plugins should be only shown with a switch to enabled/disabled in route or service module.

According to #529 . I think we should not config the auth plugins in route, service or global rule.

Yep, only enable/disable auth plugins in Route Service module is engough ^_^ but for the global rule, I'm not sure if we only enable a auth plugin, what will happen in Consumer module? @nic-chen

global rule acts like enable plugins for routes. So it's same as enable plugins in routes.

nic-chen avatar Jan 04 '21 03:01 nic-chen

A little strange 🤔 If we need to create a global rule with auth plugins, we should:

  1. Create a Consumer with Auth plugins;
  2. Create a global rule and enable at least 1 auth plugin;

cc @membphis @spacewander May I know what's your opinion?

juzhiyuan avatar Jan 04 '21 04:01 juzhiyuan

ping

nic-chen avatar Jan 05 '21 08:01 nic-chen

The auth plugin is all for selecting a consumer. It is a noop if we don't have any consumer. Also the route configuration for auth plugin is usually empty.

spacewander avatar Jan 05 '21 09:01 spacewander

fine, then for Route, Service, and GlobalRule, we only disable/enable auth plugins, right? 🤔

juzhiyuan avatar Jan 05 '21 09:01 juzhiyuan

fine, then for Route, Service, and GlobalRule, we only disable/enable auth plugins, right? 🤔

yes, you are right. @juzhiyuan

membphis avatar Jan 05 '21 15:01 membphis