-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] Producer/Consumer should call allowTopicOperationAsync #20142
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
Conversation
|
#20068 is the correct implementation, I don't suggest we revert that. I suggest we just update the BTW, the |
What is the purpose of changing the implementation of an abstraction that we are deprecating? |
The logic has been there for a long time. It's likely extensions built on top of those methods already account for the short coming, which is why I said that solution could have unintended consequences. The problem described by #20066 is that the
That's a fair point. I will break this PR into two PRs to make the discussion clearer. |
…ache#20068)"" This reverts commit bc3346a.
nodece
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
|
@nodece - I'll open a PR to deprecate those methods. |
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.
I rethought this PR, if the custom authorization provider didn't handle the TopicOperation, which introduces unintended consequences.
@nodece - by that same logic, #20068 is invalid. The default for the provider is to fail, so it is a safe change: Lines 344 to 351 in efb251c
Further, the |
I know we've been using If we allow for this change, I think #20068 is also safe, is it right? |
My concern for #20068 is not with the |
nodece
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.
Codecov Report
@@ Coverage Diff @@
## master #20142 +/- ##
=============================================
+ Coverage 33.17% 72.96% +39.78%
- Complexity 12236 31927 +19691
=============================================
Files 1499 1868 +369
Lines 114413 138402 +23989
Branches 12431 15236 +2805
=============================================
+ Hits 37962 100986 +63024
+ Misses 71499 29397 -42102
- Partials 4952 8019 +3067
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…#20143) This reverts commit fc17c1d. ### Motivation In #20068 we changed the way that the `AuthorizationService` is implemented. I think this approach could have unintended consequences. Instead, I think we should change the `Consumer` and the `Producer` logic to call the correct `AuthorizationService` method. I propose an update to the `Consumer` and `Producer` logic here #20142. Given that our goal is to deprecate the `AuthorizationService` methods for `canProduce` and `canConsume`, I think we should not change their implementations. ### Modifications * Revert #20068 ### Verifying this change This change is trivial. It removes certain test changes that were only made to make the previous PR work. ### Documentation - [x] `doc-not-needed` ### Matching PR in forked repository PR in forked repository: Skipping PR as I ran tests locally.
|
To avoid conflicts, I cherry-picked all three patches into branch |
…20142) Fixes: #20066 ### Motivation In #20068 we changed the way that the `AuthorizationService` is implemented. I think we should change the `Consumer` and the `Producer` logic to call the correct `AuthorizationService` method. Given that our goal is to deprecate the `AuthorizationService` methods for `canProduce` and `canConsume`, this change helps us move in the right direction. ### Modifications * Update `Producer` and `Consumer` in broker to call the `AuthorizationService#allowTopicOperationAsync` method. ### Verifying this change This change is trivial. ### Documentation - [x] `doc-not-needed` ### Matching PR in forked repository PR in forked repository: Skipping PR as I ran tests locally. (cherry picked from commit dc5e497)
…#20143) This reverts commit fc17c1d. ### Motivation In #20068 we changed the way that the `AuthorizationService` is implemented. I think this approach could have unintended consequences. Instead, I think we should change the `Consumer` and the `Producer` logic to call the correct `AuthorizationService` method. I propose an update to the `Consumer` and `Producer` logic here #20142. Given that our goal is to deprecate the `AuthorizationService` methods for `canProduce` and `canConsume`, I think we should not change their implementations. ### Modifications * Revert #20068 ### Verifying this change This change is trivial. It removes certain test changes that were only made to make the previous PR work. ### Documentation - [x] `doc-not-needed` ### Matching PR in forked repository PR in forked repository: Skipping PR as I ran tests locally. (cherry picked from commit 00dc7a0)
Similar to: #20142 ### Motivation In #20142 we changed the `Consumer` and the `Producer` logic to call the correct `AuthorizationService` method. Our goal is to deprecate the `AuthorizationService` methods for `canProduce` and `canConsume`, 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 the `AuthorizationService` ### Modifications * Update `ProducerHandler`, `ConsumerHandler`, and `ReaderHander` in the WebSocket Proxy to call the `AuthorizationService#allowTopicOperationAsync` method. ### Verifying this change This change is trivial. ### Documentation - [x] `doc-not-needed` ### Matching PR in forked repository PR in forked repository: Skipping PR as I ran tests locally.
Fixes: #20066
Motivation
In #20068 we changed the way that the
AuthorizationServiceis implemented. I think we should change theConsumerand theProducerlogic to call the correctAuthorizationServicemethod.Given that our goal is to deprecate the
AuthorizationServicemethods forcanProduceandcanConsume, this change helps us move in the right direction.Modifications
ProducerandConsumerin broker 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.