Skip to content

Conversation

@shreemaan-abhishek
Copy link
Contributor

Description

When using auth plugins with the multi auth plugin, if one of the authentication fails but other auth plugins succeed, the basic auth plugin will record a warning log, causing inconvenience to the user.

apisix/apisix/plugins/multi-auth.lua at master · apache/apisix The muti auth plugin does not record the error message returned by the plugin.

Solution:

When there are multiple plugins in muti auth, if the final verification is passed (that is, any plugin is verified), even if other plugins return errors, no error log needs to be recorded
If all plugins fail to verify, summarize the error messages of multiple plugins into a log for recording.

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)

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request plugin labels Nov 22, 2024
@shreemaan-abhishek shreemaan-abhishek merged commit a7524c0 into apache:master Nov 27, 2024
30 checks passed
@shreemaan-abhishek shreemaan-abhishek deleted the multi-auth-error-logs branch November 27, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request plugin size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants