-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve][ws] Use allowTopicOperationAsync for authz checks #20299
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
[improve][ws] Use allowTopicOperationAsync for authz checks #20299
Conversation
lhotari
left a comment
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.
LGTM
pulsar-websocket/src/main/java/org/apache/pulsar/websocket/ConsumerHandler.java
Show resolved
Hide resolved
pulsar-websocket/src/main/java/org/apache/pulsar/websocket/ProducerHandler.java
Show resolved
Hide resolved
|
@michaeljmarshall build must be retried in 3 days until completion. After that, it's necessary to rebuild all |
Codecov Report
@@ Coverage Diff @@
## master #20299 +/- ##
=============================================
+ Coverage 34.48% 72.22% +37.74%
+ Complexity 12528 4327 -8201
=============================================
Files 1614 1869 +255
Lines 126177 141439 +15262
Branches 13772 15999 +2227
=============================================
+ Hits 43508 102157 +58649
+ Misses 77051 31094 -45957
- Partials 5618 8188 +2570
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Thanks @lhotari. I forgot to follow up on this PR. |
|
/pulsarbot rerun-failure-checks |
1 similar comment
|
/pulsarbot rerun-failure-checks |
|
The pulsar io phase failed on the upload step: |
|
/pulsarbot rerun-failure-checks |
Relates to: #20299 ### Motivation We have several catch blocks that are dedicated to providing meaningful logs about timeouts. As such, we should catch the `TimeoutException`, not the `InterruptedException`, in order to ensure accurate logs. ### Modifications * Replace `InterruptedException` with `TimeoutException` ### Verifying this change This change is a trivial rework / code cleanup without any test coverage. ### Documentation - [x] `doc-not-needed`
Similar to: #20142
Motivation
In #20142 we changed the
Consumerand theProducerlogic to call the correctAuthorizationServicemethod.Our goal is to deprecate the
AuthorizationServicemethods forcanProduceandcanConsume, so this change helps us move in the right direction.This PR follows the same logic and updates the WebSocket proxy to remove all calls to the
can*methods in theAuthorizationServiceModifications
ProducerHandler,ConsumerHandler, andReaderHanderin the WebSocket Proxy to call theAuthorizationService#allowTopicOperationAsyncmethod.Verifying this change
This change is trivial.
Documentation
doc-not-neededMatching PR in forked repository
PR in forked repository: Skipping PR as I ran tests locally.