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

fix: multi-auth raise 500 error when use default conf #11145

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

yuweizzz
Copy link
Contributor

@yuweizzz yuweizzz commented Apr 11, 2024

Description

Fixes: #11156
Related: #9893

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@shreemaan-abhishek
Copy link
Contributor

please also add test cases

@yuweizzz
Copy link
Contributor Author

done, pls check again.

@shreemaan-abhishek
Copy link
Contributor

@yuweizzz thanks for your PR but I guess it solves only this off topic problem, which seems completely unrelated from the issue author's problem. If yes, then please create an issue that describes the problem this PR solves.

@yuweizzz
Copy link
Contributor Author

yes, I cannot reproduce the first question in #9893, and this pr will fix the second question in #9893, I will create a new one.

@@ -54,6 +54,10 @@ function _M.check_schema(conf)
if auth.type ~= 'auth' then
return false, auth_plugin_name .. " plugin is not supported"
end
local ok, err = auth.check_schema(auth_plugin_conf, auth.schema)
if not ok then
return false, "plugin " .. auth_plugin_name .. " check schema failed: " .. err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also add a test case which shows this error would be raised if any auth_plugin has wrong configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect, really appreciate it <3. I will re-review once the CI has completed running.

@moonming moonming merged commit 987d33d into apache:master Apr 24, 2024
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: multi-auth raise 500 error when use default conf
4 participants