Skip to content

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

@idbeta

Description

@idbeta

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",
		},

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions