-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][broker] Continue using the next provider for authentication if one fails #23797
Conversation
…one fails Signed-off-by: Zixuan Liu <nodeces@gmail.com>
/pulsarbot rerun-failure-checks |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23797 +/- ##
=============================================
- Coverage 73.57% 39.38% -34.20%
+ Complexity 32624 13104 -19520
=============================================
Files 1877 1796 -81
Lines 139502 139415 -87
Branches 15299 15822 +523
=============================================
- Hits 102638 54906 -47732
- Misses 28908 77315 +48407
+ Partials 7956 7194 -762
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/pulsarbot rerun-failure-checks |
…one fails (apache#23797) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 7619e2f) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 62170e7)
…one fails (apache#23797) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 7619e2f) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 62170e7)
This PR only fixes pulsar chain authentication, not HTTP authentication. The HTTP authentication has some issues, please see #23842. |
Motivation
When using Pulsar admin version 2.10.x with JWT authentication and a broker running 3.0.x (forked from Apache Pulsar) configured with both Kerberos and JWT authentication providers.
When a request is without the authentication method name, the broker iterates through each authentication provider to authenticate the request, if authentication data is valid, the broker acts on the request. In this scenario, I ensured that the JWT provider was configured correctly and the token was valid. However, I still encountered an authentication error.
The root cause is that the
AuthenticationProviderList
only catches theAuthenticationException
exception, If an authentication provider throws an exception of a different type, the authentication process will be terminated.Modifications
AuthenticationProviderList
catches theException
exception, and then uses theAuthenticationException
to wrap the original exception.Documentation
doc
doc-required
doc-not-needed
doc-complete