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: manager-api should not allow create consumers with two more auth plugin #2850

Closed
idbeta opened this issue Nov 25, 2020 · 2 comments · Fixed by #2898
Closed

bug: manager-api should not allow create consumers with two more auth plugin #2850

idbeta opened this issue Nov 25, 2020 · 2 comments · Fixed by #2898
Labels
bug Something isn't working

Comments

@idbeta
Copy link
Contributor

idbeta commented Nov 25, 2020

Bug report

Describe the bug

Same as adminAPI, manager-api should not allow create consumers with more than one auth plugins, but now it is allowed.

How to Reproduce

{
			caseDesc: "create consumers with two auth plugin",
			Object:   MangerApiExpect(t),
			Path:     "/apisix/admin/consumers",
			Method:   http.MethodPut,
			Body: `{
						"username": "case_11",
						"plugins": {
							"jwt-auth": {
								"key": "a36c3049b36249a3c9f8891cb127243c",
								"secret": "e71829c351aa4242c2719cbfbe671c09"
							},
							"key-auth": {
							"key": "auth-one"
							}
						}
			   }`,
			Headers:      map[string]string{"Authorization": token},
			ExpectStatus: http.StatusBadRequest,
			ExpectBody:   "scheme validate failed",
		},
idbeta referenced this issue in idbeta/apisix-dashboard Nov 25, 2020
@membphis
Copy link
Member

nice catch

@membphis
Copy link
Member

membphis commented Nov 25, 2020

after we talked right now, I think manager-api way is correct.

"allow one consumer to bind more than one auth plugins", that is the right way. I think the APISIX should support this case too.

@membphis membphis transferred this issue from apache/apisix-dashboard Nov 25, 2020
@membphis membphis added the bug Something isn't working label Nov 25, 2020
spacewander added a commit to spacewander/incubator-apisix that referenced this issue Nov 30, 2020
spacewander added a commit to spacewander/incubator-apisix that referenced this issue Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants