-
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]Fixed produce and consume when anonymousUserRole enabled #21237
[fix][broker]Fixed produce and consume when anonymousUserRole enabled #21237
Conversation
@tuteng Please add the following content to your PR description and select a checkbox:
|
Will update test and comment later |
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test for it. :)
Fixed |
Codecov Report
@@ Coverage Diff @@
## master #21237 +/- ##
=============================================
+ Coverage 34.63% 73.19% +38.55%
- Complexity 12097 32484 +20387
=============================================
Files 1698 1887 +189
Lines 130451 140142 +9691
Branches 14252 15428 +1176
=============================================
+ Hits 45187 102576 +57389
+ Misses 79262 29475 -49787
- Partials 6002 8091 +2089
Flags with carried forward coverage won't be shown. Click here to find out more.
|
My repo pr AmateurEvents#36
Fixes #xyz
Main Issue: #xyz
PIP: #xyz
Motivation
Implement the same logic as here https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java#L1010
When anonymousUserRole is enabled, pulsar-admin can successfully fetch cluster resources without authenticationProvider, but pulsar-client can't produce and consume data, this pr fixes that behavior, If the cluster is configured with anonymousUserRole, it should skip the authenticationProvider's checks
Modifications
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: