Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
idbeta opened this issue Dec 31, 2020 · 13 comments · Fixed by #1219
Closed

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

idbeta opened this issue Dec 31, 2020 · 13 comments · Fixed by #1219
Assignees
Labels
Milestone

Comments

@idbeta
Copy link
Contributor

idbeta commented Dec 31, 2020

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 idbeta added the bug Something isn't working label Dec 31, 2020
@juzhiyuan juzhiyuan added this to the 2.3 milestone Jan 4, 2021
@juzhiyuan
Copy link
Member

juzhiyuan commented Jan 4, 2021

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

@nic-chen
Copy link
Member

nic-chen commented Jan 4, 2021

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.

@idbeta
Copy link
Contributor Author

idbeta commented Jan 4, 2021

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.

@juzhiyuan
Copy link
Member

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
Copy link
Member

image

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

@juzhiyuan
Copy link
Member

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

@liuxiran
Copy link
Contributor

liuxiran commented Jan 4, 2021

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

@nic-chen
Copy link
Member

nic-chen commented Jan 4, 2021

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.

@juzhiyuan
Copy link
Member

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?

@nic-chen
Copy link
Member

nic-chen commented Jan 5, 2021

ping

@spacewander
Copy link
Member

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.

@juzhiyuan
Copy link
Member

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

@membphis
Copy link
Member

membphis commented Jan 5, 2021

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

yes, you are right. @juzhiyuan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
7 participants