Skip to content

feat: plugins in multi-auth returns error instead of logging it#11775

Merged
shreemaan-abhishek merged 8 commits into
apache:masterfrom
shreemaan-abhishek:multi-auth-error-logs
Nov 27, 2024
Merged

feat: plugins in multi-auth returns error instead of logging it#11775
shreemaan-abhishek merged 8 commits into
apache:masterfrom
shreemaan-abhishek:multi-auth-error-logs

Conversation

@shreemaan-abhishek

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